Skip to content

Commit a267086

Browse files
committed
fix: webgl_loader_lwo updated with corrected coordinates for meshes and lights and cameras
1 parent c31c1f5 commit a267086

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
3.38 KB
Loading

examples/webgl_loader_lwo.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
document.body.appendChild( container );
4242

4343
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 200 );
44-
camera.position.set( - 0.7, 14.6, 43.2 );
44+
camera.position.set( 0.7, 14.6, - 43.2 );
4545

4646
scene = new THREE.Scene();
4747
scene.background = new THREE.Color( 0xa0a0a0 );
@@ -50,7 +50,7 @@
5050
scene.add( ambientLight );
5151

5252
const light1 = new THREE.DirectionalLight( 0xc1c1c1, 3 );
53-
light1.position.set( 0, 200, 100 );
53+
light1.position.set( 0, 200, - 100 );
5454
scene.add( light1 );
5555

5656
const grid = new THREE.GridHelper( 200, 20, 0x000000, 0x000000 );
@@ -62,13 +62,13 @@
6262
loader.load( 'models/lwo/Objects/LWO3/Demo.lwo', function ( object ) {
6363

6464
const phong = object.meshes[ 0 ];
65-
phong.position.set( - 2, 12, 0 );
65+
phong.position.set( 2, 12, 0 );
6666

6767
const standard = object.meshes[ 1 ];
68-
standard.position.set( 2, 12, 0 );
68+
standard.position.set( - 2, 12, 0 );
6969

7070
const rocket = object.meshes[ 2 ];
71-
rocket.position.set( 0, 10.5, - 1 );
71+
rocket.position.set( 0, 10.5, 1 );
7272

7373
scene.add( phong, standard, rocket );
7474

@@ -82,7 +82,7 @@
8282
container.appendChild( renderer.domElement );
8383

8484
const controls = new OrbitControls( camera, renderer.domElement );
85-
controls.target.set( 1.33, 10, - 6.7 );
85+
controls.target.set( - 1.33, 10, 6.7 );
8686
controls.update();
8787

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

0 commit comments

Comments
 (0)