Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/canvas_interactive_voxelpainter.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@

switch ( event.keyCode ) {

case 16: isShiftDown = true; break;
case 16: isShiftDown = true;
break;

}

Expand All @@ -175,7 +176,8 @@

switch ( event.keyCode ) {

case 16: isShiftDown = false; break;
case 16: isShiftDown = false;
break;

}

Expand Down
4 changes: 2 additions & 2 deletions examples/misc_animation_authoring.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

}

});
} );

window.addEventListener( 'keyup', function ( event ) {

Expand All @@ -132,7 +132,7 @@

}

});
} );

var trackInfo = [

Expand Down
10 changes: 5 additions & 5 deletions examples/misc_controls_fly.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@

var MARGIN = 0;
var SCREEN_HEIGHT = window.innerHeight - MARGIN * 2;
var SCREEN_WIDTH = window.innerWidth;
var SCREEN_WIDTH = window.innerWidth;

var camera, controls, scene, renderer, stats;
var geometry, meshPlanet, meshClouds, meshMoon;
var dirLight, pointLight, ambientLight;
var dirLight;

var composer;

Expand All @@ -100,7 +100,7 @@
scene.fog = new THREE.FogExp2( 0x000000, 0.00000025 );

dirLight = new THREE.DirectionalLight( 0xffffff );
dirLight.position.set( -1, 0, 1 ).normalize();
dirLight.position.set( - 1, 0, 1 ).normalize();
scene.add( dirLight );

var materialNormalMap = new THREE.MeshPhongMaterial( {
Expand Down Expand Up @@ -246,10 +246,10 @@

}

function onWindowResize( event ) {
function onWindowResize() {

SCREEN_HEIGHT = window.innerHeight;
SCREEN_WIDTH = window.innerWidth;
SCREEN_WIDTH = window.innerWidth;

renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );

Expand Down
5 changes: 3 additions & 2 deletions examples/misc_controls_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@
window.addEventListener( 'resize', onWindowResize, false );


var gui = new dat.GUI();
var gui = new dat.GUI();

gui.add( controls, 'screenSpacePanning' );

gui.add(controls, 'screenSpacePanning');
}

function onWindowResize() {
Expand Down
11 changes: 6 additions & 5 deletions examples/misc_controls_pointerlock.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,20 @@
var blocker = document.getElementById( 'blocker' );
var instructions = document.getElementById( 'instructions' );

instructions.addEventListener( 'click', function ( event ) {
instructions.addEventListener( 'click', function () {

controls.lock();

}, false );

controls.addEventListener( 'lock', function() {
controls.addEventListener( 'lock', function () {

instructions.style.display = 'none';
blocker.style.display = 'none';

} );

controls.addEventListener( 'unlock', function() {
controls.addEventListener( 'unlock', function () {

blocker.style.display = 'block';
instructions.style.display = '';
Expand All @@ -145,7 +145,8 @@

case 37: // left
case 65: // a
moveLeft = true; break;
moveLeft = true;
break;

case 40: // down
case 83: // s
Expand All @@ -168,7 +169,7 @@

var onKeyUp = function ( event ) {

switch( event.keyCode ) {
switch ( event.keyCode ) {

case 38: // up
case 87: // w
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_controls_trackball.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
scene.add( light );

var light = new THREE.DirectionalLight( 0x002288 );
light.position.set( -1, -1, -1 );
light.position.set( - 1, - 1, - 1 );
scene.add( light );

var light = new THREE.AmbientLight( 0x222222 );
Expand Down
18 changes: 10 additions & 8 deletions examples/misc_controls_transform.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,17 @@
var geometry = new THREE.BoxBufferGeometry( 200, 200, 200 );
var material = new THREE.MeshLambertMaterial( { map: texture } );

orbit = new THREE.OrbitControls(camera, renderer.domElement);
orbit = new THREE.OrbitControls( camera, renderer.domElement );
orbit.update();
orbit.addEventListener( 'change', render );

control = new THREE.TransformControls( camera, renderer.domElement );
control.addEventListener( 'change', render );

control.addEventListener( 'dragging-changed', function ( event ) {
orbit.enabled = !event.value;

orbit.enabled = ! event.value;

} );

var mesh = new THREE.Mesh( geometry, material );
Expand Down Expand Up @@ -133,24 +135,24 @@
break;

case 88: // X
control.showX = !control.showX;
control.showX = ! control.showX;
break;

case 89: // Y
control.showY = !control.showY;
control.showY = ! control.showY;
break;

case 90: // Z
control.showZ = !control.showZ;
control.showZ = ! control.showZ;
break;

case 32: // Spacebar
control.enabled = !control.enabled;
control.enabled = ! control.enabled;
break;

}

});
} );

window.addEventListener( 'keyup', function ( event ) {

Expand All @@ -163,7 +165,7 @@

}

});
} );

}

Expand Down
Loading