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
4 changes: 2 additions & 2 deletions examples/css3d_sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.set( 200, 200, 200 );

controls = new THREE.TrackballControls( camera );

scene = new THREE.Scene();
scene.background = new THREE.Color( 0xf0f0f0 );

Expand Down Expand Up @@ -104,6 +102,8 @@
renderer2.domElement.style.top = 0;
document.body.appendChild( renderer2.domElement );

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

}

function animate() {
Expand Down
2 changes: 1 addition & 1 deletion examples/css3d_youtube.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
group.add( new Element( '9ubytEsCaS0', - 240, 0, 0, - Math.PI / 2 ) );
scene.add( group );

controls = new THREE.TrackballControls( camera );
controls = new THREE.TrackballControls( camera, renderer.domElement );
controls.rotateSpeed = 4;

window.addEventListener( 'resize', onWindowResize, false );
Expand Down
38 changes: 19 additions & 19 deletions examples/misc_controls_trackball.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
height: 100%;
overflow: hidden;
}

body {
color: #000;
font-family:Monospace;
Expand Down Expand Up @@ -67,22 +67,6 @@
camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.z = 500;

controls = new THREE.TrackballControls( camera );

controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.8;

controls.noZoom = false;
controls.noPan = false;

controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

controls.keys = [ 65, 83, 68 ];

controls.addEventListener( 'change', render );

// world

scene = new THREE.Scene();
Expand Down Expand Up @@ -126,6 +110,22 @@
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );

controls = new THREE.TrackballControls( camera, renderer.domElement );

controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.8;

controls.noZoom = false;
controls.noPan = false;

controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

controls.keys = [ 65, 83, 68 ];

controls.addEventListener( 'change', render );

stats = new Stats();
document.body.appendChild( stats.dom );

Expand Down Expand Up @@ -154,9 +154,9 @@
function animate() {

requestAnimationFrame( animate );

controls.update();

stats.update();

}
Expand Down
5 changes: 2 additions & 3 deletions examples/software_sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 2000 );
camera.position.z = 600;

controls = new THREE.TrackballControls( camera );

scene = new THREE.Scene();

// Torus
Expand Down Expand Up @@ -157,9 +155,10 @@

renderer = new THREE.SoftwareRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );

container.appendChild( renderer.domElement );

controls = new THREE.TrackballControls( camera, renderer.domElement );

stats = new Stats();
container.appendChild( stats.dom );

Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_buffergeometry_instancing2.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@
camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 0.01, 100 );
camera.position.z = 4;

controls = new THREE.TrackballControls( camera );

scene = new THREE.Scene();

//
Expand Down Expand Up @@ -204,6 +202,8 @@
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );

controls = new THREE.TrackballControls( camera, renderer.domElement );

if ( renderer.extensions.get( 'ANGLE_instanced_arrays' ) === null ) {

document.getElementById( 'notSupported' ).style.display = '';
Expand Down
6 changes: 3 additions & 3 deletions examples/webgl_effects_ascii.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
camera.position.y = 150;
camera.position.z = 500;

controls = new THREE.TrackballControls( camera );

scene = new THREE.Scene();

var light = new THREE.PointLight( 0xffffff );
Expand All @@ -75,7 +73,7 @@
light.position.set( - 500, - 500, - 500 );
scene.add( light );

sphere = new THREE.Mesh( new THREE.SphereBufferGeometry( 200, 20, 10 ), new THREE.MeshPhongMaterial( { flatShading: true }) );
sphere = new THREE.Mesh( new THREE.SphereBufferGeometry( 200, 20, 10 ), new THREE.MeshPhongMaterial( { flatShading: true } ) );
scene.add( sphere );

// Plane
Expand All @@ -98,6 +96,8 @@

document.body.appendChild( effect.domElement );

controls = new THREE.TrackballControls( camera, effect.domElement );

//

window.addEventListener( 'resize', onWindowResize, false );
Expand Down
18 changes: 9 additions & 9 deletions examples/webgl_interactive_cubes_gpu.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@
camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 10000 );
camera.position.z = 1000;

controls = new THREE.TrackballControls( camera );
controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.8;
controls.noZoom = false;
controls.noPan = false;
controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

scene = new THREE.Scene();
scene.background = new THREE.Color( 0xffffff );

Expand Down Expand Up @@ -171,6 +162,15 @@
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );

controls = new THREE.TrackballControls( camera, renderer.domElement );
controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.8;
controls.noZoom = false;
controls.noPan = false;
controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

stats = new Stats();
container.appendChild( stats.dom );

Expand Down
18 changes: 9 additions & 9 deletions examples/webgl_interactive_draggablecubes.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@
camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 5000 );
camera.position.z = 1000;

controls = new THREE.TrackballControls( camera );
controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.8;
controls.noZoom = false;
controls.noPan = false;
controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

scene = new THREE.Scene();
scene.background = new THREE.Color( 0xf0f0f0 );

Expand Down Expand Up @@ -101,6 +92,15 @@

container.appendChild( renderer.domElement );

controls = new THREE.TrackballControls( camera, renderer.domElement );
controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.8;
controls.noZoom = false;
controls.noPan = false;
controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

var dragControls = new THREE.DragControls( objects, camera, renderer.domElement );
dragControls.addEventListener( 'dragstart', function () {

Expand Down
32 changes: 16 additions & 16 deletions examples/webgl_lights_pointlights2.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,6 @@
scene.background = new THREE.Color( 0x040306 );
scene.fog = new THREE.Fog( 0x040306, 10, 300 );

// CONTROLS

controls = new THREE.TrackballControls( camera );

controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.8;

controls.noZoom = false;
controls.noPan = false;

controls.staticMoving = false;
controls.dynamicDampingFactor = 0.15;

controls.keys = [ 65, 83, 68 ];

// TEXTURES

var textureLoader = new THREE.TextureLoader();
Expand Down Expand Up @@ -185,6 +169,22 @@
renderer.gammaInput = true;
renderer.gammaOutput = true;

// CONTROLS

controls = new THREE.TrackballControls( camera, renderer.domElement );

controls.rotateSpeed = 1.0;
controls.zoomSpeed = 1.2;
controls.panSpeed = 0.8;

controls.noZoom = false;
controls.noPan = false;

controls.staticMoving = false;
controls.dynamicDampingFactor = 0.15;

controls.keys = [ 65, 83, 68 ];

// STATS

stats = new Stats();
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_loader_3ds.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 0.1, 10 );
camera.position.z = 2;

controls = new THREE.TrackballControls( camera );

scene = new THREE.Scene();
scene.add( new THREE.HemisphereLight() );

Expand Down Expand Up @@ -86,6 +84,8 @@
renderer.setSize( window.innerWidth, window.innerHeight );
container.appendChild( renderer.domElement );

controls = new THREE.TrackballControls( camera, renderer.domElement );

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

}
Expand Down
6 changes: 4 additions & 2 deletions examples/webgl_loader_babylon.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 2000 );
camera.position.z = 100;

controls = new THREE.TrackballControls( camera );

// scene

scene = new THREE.Scene();
Expand Down Expand Up @@ -103,6 +101,10 @@

//

controls = new THREE.TrackballControls( camera, renderer.domElement );

//

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

}
Expand Down
30 changes: 15 additions & 15 deletions examples/webgl_loader_pcd.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,6 @@
camera.position.z = - 2;
camera.up.set( 0, 0, 1 );

controls = new THREE.TrackballControls( camera );

controls.rotateSpeed = 2.0;
controls.zoomSpeed = 0.3;
controls.panSpeed = 0.2;

controls.noZoom = false;
controls.noPan = false;

controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

controls.minDistance = 0.3;
controls.maxDistance = 0.3 * 100;

scene.add( camera );

renderer = new THREE.WebGLRenderer( { antialias: true } );
Expand All @@ -110,6 +95,21 @@
document.body.appendChild( container );
container.appendChild( renderer.domElement );

controls = new THREE.TrackballControls( camera, renderer.domElement );

controls.rotateSpeed = 2.0;
controls.zoomSpeed = 0.3;
controls.panSpeed = 0.2;

controls.noZoom = false;
controls.noPan = false;

controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

controls.minDistance = 0.3;
controls.maxDistance = 0.3 * 100;

stats = new Stats();
container.appendChild( stats.dom );

Expand Down
26 changes: 14 additions & 12 deletions examples/webgl_loader_vtk.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,6 @@
camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 0.01, 1e10 );
camera.position.z = 0.2;

controls = new THREE.TrackballControls( camera );

controls.rotateSpeed = 5.0;
controls.zoomSpeed = 5;
controls.panSpeed = 2;

controls.noZoom = false;
controls.noPan = false;

controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

scene = new THREE.Scene();

scene.add( camera );
Expand Down Expand Up @@ -162,6 +150,20 @@
document.body.appendChild( container );
container.appendChild( renderer.domElement );

// controls

controls = new THREE.TrackballControls( camera, renderer.domElement );

controls.rotateSpeed = 5.0;
controls.zoomSpeed = 5;
controls.panSpeed = 2;

controls.noZoom = false;
controls.noPan = false;

controls.staticMoving = true;
controls.dynamicDampingFactor = 0.3;

stats = new Stats();
container.appendChild( stats.dom );

Expand Down
Loading