Skip to content

Commit

Permalink
Merge pull request #21101 from marcofugaro/addlistener-third-param
Browse files Browse the repository at this point in the history
Examples: Remove useCapture parameter from resize listener
  • Loading branch information
mrdoob authored Jan 19, 2021
2 parents f2e7431 + 61225db commit 169655b
Show file tree
Hide file tree
Showing 335 changed files with 363 additions and 361 deletions.
2 changes: 1 addition & 1 deletion examples/css2d_label.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

}

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

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

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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 @@ -98,7 +98,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

controls = new TrackballControls( camera, renderer2.domElement );

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/css3d_youtube.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
controls = new TrackballControls( camera, renderer.domElement );
controls.rotateSpeed = 4;

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

// Block iframe events when dragging camera

Expand Down
6 changes: 4 additions & 2 deletions examples/games_fps.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,16 @@

}, false );

window.addEventListener( 'resize', () => {
window.addEventListener( 'resize', onWindowResize );

function onWindowResize() {

camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();

renderer.setSize( window.innerWidth, window.innerHeight );

}, false );
}

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

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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 @@ -67,7 +67,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );


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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

document.addEventListener( 'click', onClick, false );
window.addEventListener( 'keydown', onKeyDown, false );
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_controls_fly.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
stats = new Stats();
document.body.appendChild( stats.dom );

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

// postprocessing

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );


const gui = new GUI();
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_controls_orbit.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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 @@ -109,7 +109,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

createControls( perspectiveCamera );

Expand Down
2 changes: 1 addition & 1 deletion examples/misc_controls_transform.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
control.attach( mesh );
scene.add( control );

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

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

Expand Down
2 changes: 1 addition & 1 deletion examples/misc_exporter_collada.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
container.appendChild( renderer.domElement );

// EVENTS
window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

// CONTROLS
cameraControls = new OrbitControls( camera, renderer.domElement );
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_exporter_draco.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

const exportButton = document.getElementById( 'exportFile' );
exportButton.addEventListener( 'click', exportFile );
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_exporter_gltf.html
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

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

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

const buttonExportASCII = document.getElementById( 'exportASCII' );
buttonExportASCII.addEventListener( 'click', exportASCII );
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_exporter_stl.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

const buttonExportASCII = document.getElementById( 'exportASCII' );
buttonExportASCII.addEventListener( 'click', exportASCII );
Expand Down
2 changes: 1 addition & 1 deletion examples/misc_legacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

} );

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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 @@ -146,7 +146,7 @@

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/physics_ammo_cloth.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
stats.domElement.style.top = '0px';
container.appendChild( stats.domElement );

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/physics_ammo_terrain.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
scene.add( light );


window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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 @@ -119,7 +119,7 @@
container.appendChild( stats.domElement );


window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

animate();

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

//

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

//

window.addEventListener( 'resize', onResize, false );
window.addEventListener( 'resize', onWindowResize );

animate();

}

function onResize() {
function onWindowResize() {

renderer.setSize( window.innerWidth, window.innerHeight );

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

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

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

} );

window.addEventListener( 'resize', onWindowResize, false );
window.addEventListener( 'resize', onWindowResize );

}

Expand Down
Loading

0 comments on commit 169655b

Please sign in to comment.