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
1 change: 0 additions & 1 deletion examples/webgl_decals.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@

camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.z = 120;
camera.target = new THREE.Vector3();

const controls = new OrbitControls( camera, renderer.domElement );
controls.minDistance = 50;
Expand Down
1 change: 0 additions & 1 deletion examples/webgl_loader_nodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
camera.position.x = 50;
camera.position.z = - 50;
camera.position.y = 30;
camera.target = new THREE.Vector3();

cloud = new THREE.TextureLoader().load( 'textures/lava/cloud.png' );
cloud.wrapS = cloud.wrapT = THREE.RepeatWrapping;
Expand Down
1 change: 0 additions & 1 deletion examples/webgl_materials_compile.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
camera.position.x = 0;
camera.position.z = - 300;
camera.position.y = 200;
camera.target = new THREE.Vector3();

controls = new OrbitControls( camera, renderer.domElement );
controls.minDistance = 50;
Expand Down
2 changes: 0 additions & 2 deletions examples/webgl_materials_nodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@
camera.position.x = 50;
camera.position.z = - 50;
camera.position.y = 30;
camera.target = new THREE.Vector3();


controls = new OrbitControls( camera, renderer.domElement );
controls.minDistance = 50;
Expand Down
3 changes: 1 addition & 2 deletions examples/webgl_morphtargets_horse.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@

camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 1, 10000 );
camera.position.y = 300;
camera.target = new THREE.Vector3( 0, 150, 0 );

scene = new THREE.Scene();
scene.background = new THREE.Color( 0xf0f0f0 );
Expand Down Expand Up @@ -126,7 +125,7 @@
camera.position.x = radius * Math.sin( THREE.MathUtils.degToRad( theta ) );
camera.position.z = radius * Math.cos( THREE.MathUtils.degToRad( theta ) );

camera.lookAt( camera.target );
camera.lookAt( 0, 150, 0 );

if ( mixer ) {

Expand Down
14 changes: 4 additions & 10 deletions examples/webgl_panorama_equirectangular.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
const container = document.getElementById( 'container' );

camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 1100 );
camera.target = new THREE.Vector3( 0, 0, 0 );

scene = new THREE.Scene();

Expand Down Expand Up @@ -178,16 +177,11 @@
phi = THREE.MathUtils.degToRad( 90 - lat );
theta = THREE.MathUtils.degToRad( lon );

camera.target.x = 500 * Math.sin( phi ) * Math.cos( theta );
camera.target.y = 500 * Math.cos( phi );
camera.target.z = 500 * Math.sin( phi ) * Math.sin( theta );
const x = 500 * Math.sin( phi ) * Math.cos( theta );
const y = 500 * Math.cos( phi );
const z = 500 * Math.sin( phi ) * Math.sin( theta );

camera.lookAt( camera.target );

/*
// distortion
camera.position.copy( camera.target ).negate();
*/
camera.lookAt( x, y, z );

renderer.render( scene, camera );

Expand Down
1 change: 0 additions & 1 deletion examples/webgl_sprites_nodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@

camera = new THREE.PerspectiveCamera( fov, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.z = 100;
camera.target = new THREE.Vector3();

controls = new OrbitControls( camera, renderer.domElement );
controls.minDistance = 50;
Expand Down
3 changes: 1 addition & 2 deletions examples/webgl_video_panorama_equirectangular.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
const container = document.getElementById( 'container' );

camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 1100 );
camera.target = new THREE.Vector3( 0, 0, 0 );

scene = new THREE.Scene();

Expand Down Expand Up @@ -134,7 +133,7 @@
camera.position.y = distance * Math.cos( phi );
camera.position.z = distance * Math.sin( phi ) * Math.sin( theta );

camera.lookAt( camera.target );
camera.lookAt( 0, 0, 0 );

renderer.render( scene, camera );

Expand Down