Skip to content

Commit

Permalink
Examples: remove third parameters from addEventListener calls
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofugaro committed Jan 19, 2021
1 parent 7d57c7c commit c870e1d
Show file tree
Hide file tree
Showing 94 changed files with 160 additions and 158 deletions.
2 changes: 1 addition & 1 deletion examples/css3d_molecules.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

const url = "models/pdb/" + MOLECULES[ m ];

button.addEventListener( 'click', generateButtonCallback( url ), false );
button.addEventListener( 'click', generateButtonCallback( url ) );

}

Expand Down
8 changes: 4 additions & 4 deletions examples/css3d_panorama.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
//

document.body.style.touchAction = 'none';
document.body.addEventListener( 'pointerdown', onPointerDown, false );
document.body.addEventListener( 'pointerdown', onPointerDown );

document.addEventListener( 'wheel', onDocumentMouseWheel, false );
document.addEventListener( 'wheel', onDocumentMouseWheel );

window.addEventListener( 'resize', onWindowResize );

Expand All @@ -112,8 +112,8 @@
pointerX = event.clientX;
pointerY = event.clientY;

document.addEventListener( 'pointermove', onPointerMove, false );
document.addEventListener( 'pointerup', onPointerUp, false );
document.addEventListener( 'pointermove', onPointerMove );
document.addEventListener( 'pointerup', onPointerUp );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/css3d_panorama_deviceorientation.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
init();
animate();

}, false );
} );

function init() {

Expand Down
8 changes: 4 additions & 4 deletions examples/css3d_periodictable.html
Original file line number Diff line number Diff line change
Expand Up @@ -351,28 +351,28 @@

transform( targets.table, 2000 );

}, false );
} );

const buttonSphere = document.getElementById( 'sphere' );
buttonSphere.addEventListener( 'click', function () {

transform( targets.sphere, 2000 );

}, false );
} );

const buttonHelix = document.getElementById( 'helix' );
buttonHelix.addEventListener( 'click', function () {

transform( targets.helix, 2000 );

}, false );
} );

const buttonGrid = document.getElementById( 'grid' );
buttonGrid.addEventListener( 'click', function () {

transform( targets.grid, 2000 );

}, false );
} );

transform( targets.table, 2000 );

Expand Down
2 changes: 1 addition & 1 deletion examples/css3d_sprites.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

transition();

}, false );
} );
image.src = 'textures/sprite.png';

// Plane
Expand Down
10 changes: 5 additions & 5 deletions examples/games_fps.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@

keyStates[ event.code ] = true;

}, false );
} );

document.addEventListener( 'keyup', ( event ) => {

keyStates[ event.code ] = false;

}, false );
} );

document.addEventListener( 'mousedown', () => {

document.body.requestPointerLock();

}, false );
} );

document.body.addEventListener( 'mousemove', ( event ) => {

Expand All @@ -133,7 +133,7 @@

}

}, false );
} );

window.addEventListener( 'resize', onWindowResize );

Expand All @@ -157,7 +157,7 @@

sphereIdx = ( sphereIdx + 1 ) % spheres.length;

}, false );
} );

function playerCollitions() {

Expand Down
2 changes: 1 addition & 1 deletion examples/misc_controls_deviceorientation.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
init();
animate();

}, false );
} );

function init() {

Expand Down
6 changes: 3 additions & 3 deletions examples/misc_controls_drag.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@

window.addEventListener( 'resize', onWindowResize );

document.addEventListener( 'click', onClick, false );
window.addEventListener( 'keydown', onKeyDown, false );
window.addEventListener( 'keyup', onKeyUp, false );
document.addEventListener( 'click', onClick );
window.addEventListener( 'keydown', onKeyDown );
window.addEventListener( 'keyup', onKeyUp );

render();

Expand Down
6 changes: 3 additions & 3 deletions examples/misc_controls_pointerlock.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

controls.lock();

}, false );
} );

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

Expand Down Expand Up @@ -184,8 +184,8 @@

};

document.addEventListener( 'keydown', onKeyDown, false );
document.addEventListener( 'keyup', onKeyUp, false );
document.addEventListener( 'keydown', onKeyDown );
document.addEventListener( 'keyup', onKeyUp );

raycaster = new THREE.Raycaster( new THREE.Vector3(), new THREE.Vector3( 0, - 1, 0 ), 0, 10 );

Expand Down
6 changes: 3 additions & 3 deletions examples/misc_exporter_obj.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@

addGeometry( 1 );

window.addEventListener( 'click', onWindowClick, false );
window.addEventListener( 'click', onWindowClick );
window.addEventListener( 'resize', onWindowResize );
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mouseover', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );
document.addEventListener( 'mouseover', onDocumentMouseMove );

document.getElementById( 'triangle' ).addEventListener( 'click', function () {

Expand Down
2 changes: 1 addition & 1 deletion examples/misc_lookat.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
let windowHalfX = window.innerWidth / 2;
let windowHalfY = window.innerHeight / 2;

document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );

init();
animate();
Expand Down
2 changes: 1 addition & 1 deletion examples/physics_ammo_break.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
pos.multiplyScalar( 24 );
ballBody.setLinearVelocity( new Ammo.btVector3( pos.x, pos.y, pos.z ) );

}, false );
} );

}

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

}

}, false );
} );

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

armMovement = 0;

}, false );
} );

}

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

}

}, false );
} );

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

armMovement = 0;

}, false );
} );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/physics_ammo_volume.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@

}

}, false );
} );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_camera.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
//

window.addEventListener( 'resize', onWindowResize );
document.addEventListener( 'keydown', onKeyDown, false );
document.addEventListener( 'keydown', onKeyDown );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_camera_cinematic.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
stats = new Stats();
document.body.appendChild( stats.dom );

document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );

window.addEventListener( 'resize', onWindowResize );

Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_camera_logarithmicdepthbuffer.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@
border = document.getElementById( 'renderer_border' );
border.addEventListener( 'pointerdown', onBorderPointerDown );

window.addEventListener( 'mousemove', onMouseMove, false );
window.addEventListener( 'mousemove', onMouseMove );
window.addEventListener( 'resize', onWindowResize );
window.addEventListener( 'wheel', onMouseWheel, false );
window.addEventListener( 'wheel', onMouseWheel );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_decals.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

moved = false;

}, false );
} );

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

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_effects_anaglyph.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
let windowHalfX = window.innerWidth / 2;
let windowHalfY = window.innerHeight / 2;

document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );

init();
animate();
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_effects_parallaxbarrier.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
let windowHalfX = window.innerWidth / 2;
let windowHalfY = window.innerHeight / 2;

document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );

init();
animate();
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_effects_stereo.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
let windowHalfX = window.innerWidth / 2;
let windowHalfY = window.innerHeight / 2;

document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );

init();
animate();
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_geometry_colors.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
stats = new Stats();
container.appendChild( stats.dom );

document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );

//

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_geometry_hierarchy.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

//

document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );

//

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_geometry_hierarchy2.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@

//

document.addEventListener( 'mousemove', onDocumentMouseMove, false );
document.addEventListener( 'mousemove', onDocumentMouseMove );

//

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl_geometry_nurbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
container.appendChild( stats.dom );

container.style.touchAction = 'none';
container.addEventListener( 'pointerdown', onPointerDown, false );
container.addEventListener( 'pointerdown', onPointerDown );

//

Expand Down Expand Up @@ -198,8 +198,8 @@
pointerXOnPointerDown = event.clientX - windowHalfX;
targetRotationOnPointerDown = targetRotation;

document.addEventListener( 'pointermove', onPointerMove, false );
document.addEventListener( 'pointerup', onPointerUp, false );
document.addEventListener( 'pointermove', onPointerMove );
document.addEventListener( 'pointerup', onPointerUp );

}

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl_geometry_shapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
container.appendChild( stats.dom );

container.style.touchAction = 'none';
container.addEventListener( 'pointerdown', onPointerDown, false );
container.addEventListener( 'pointerdown', onPointerDown );

//

Expand Down Expand Up @@ -381,8 +381,8 @@
pointerXOnPointerDown = event.clientX - windowHalfX;
targetRotationOnPointerDown = targetRotation;

document.addEventListener( 'pointermove', onPointerMove, false );
document.addEventListener( 'pointerup', onPointerUp, false );
document.addEventListener( 'pointermove', onPointerMove );
document.addEventListener( 'pointerup', onPointerUp );

}

Expand Down
6 changes: 3 additions & 3 deletions examples/webgl_geometry_spline_editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@

} );

document.addEventListener( 'pointerdown', onPointerDown, false );
document.addEventListener( 'pointerup', onPointerUp, false );
document.addEventListener( 'pointermove', onPointerMove, false );
document.addEventListener( 'pointerdown', onPointerDown );
document.addEventListener( 'pointerup', onPointerUp );
document.addEventListener( 'pointermove', onPointerMove );

/*******
* Curves
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_geometry_terrain_raycast.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
helper = new THREE.Mesh( geometryHelper, new THREE.MeshNormalMaterial() );
scene.add( helper );

container.addEventListener( 'mousemove', onMouseMove, false );
container.addEventListener( 'mousemove', onMouseMove );

stats = new Stats();
container.appendChild( stats.dom );
Expand Down
Loading

0 comments on commit c870e1d

Please sign in to comment.