Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
looeee committed Sep 29, 2018
1 parent eb01186 commit c1f6878
Show file tree
Hide file tree
Showing 24 changed files with 302 additions and 211 deletions.
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
8 changes: 4 additions & 4 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 Down Expand Up @@ -168,7 +168,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

0 comments on commit c1f6878

Please sign in to comment.