|
68 | 68 | camera = new THREE.PerspectiveCamera( 35, window.innerWidth / window.innerHeight, 1, 15 );
|
69 | 69 | camera.position.set( 3, 0.15, 3 );
|
70 | 70 |
|
71 |
| - cameraTarget = new THREE.Vector3( 0, -0.25, 0 ); |
| 71 | + cameraTarget = new THREE.Vector3( 0, -0.1, 0 ); |
72 | 72 |
|
73 | 73 | scene = new THREE.Scene();
|
74 | 74 | scene.fog = new THREE.Fog( 0x72645b, 2, 15 );
|
|
97 | 97 | var material = new THREE.MeshStandardMaterial( { color: 0x0055ff, shading: THREE.FlatShading } );
|
98 | 98 | var mesh = new THREE.Mesh( geometry, material );
|
99 | 99 |
|
100 |
| - mesh.position.y = - 0.25; |
| 100 | + mesh.position.y = - 0.2; |
| 101 | + mesh.position.z = 0.3; |
101 | 102 | mesh.rotation.x = - Math.PI / 2;
|
102 | 103 | mesh.scale.multiplyScalar( 0.001 );
|
103 | 104 |
|
|
108 | 109 |
|
109 | 110 | } );
|
110 | 111 |
|
| 112 | + loader.load( './models/ply/binary/Lucy100k.ply', function ( geometry ) { |
| 113 | + |
| 114 | + geometry.computeVertexNormals(); |
| 115 | + |
| 116 | + var material = new THREE.MeshStandardMaterial( { color: 0x0055ff, shading: THREE.FlatShading } ); |
| 117 | + var mesh = new THREE.Mesh( geometry, material ); |
| 118 | + |
| 119 | + mesh.position.x = - 0.4; |
| 120 | + mesh.position.y = - 0.14; |
| 121 | + mesh.position.z = - 0.3; |
| 122 | + mesh.rotation.x = - Math.PI / 2; |
| 123 | + mesh.scale.multiplyScalar( 0.0006 ); |
| 124 | + |
| 125 | + mesh.castShadow = true; |
| 126 | + mesh.receiveShadow = true; |
| 127 | + |
| 128 | + scene.add( mesh ); |
| 129 | + |
| 130 | + } ); |
| 131 | + |
111 | 132 | // Lights
|
112 | 133 |
|
113 | 134 | scene.add( new THREE.HemisphereLight( 0x443333, 0x111122 ) );
|
|
187 | 208 |
|
188 | 209 | var timer = Date.now() * 0.0005;
|
189 | 210 |
|
190 |
| - camera.position.x = Math.sin( timer ) * 3; |
191 |
| - camera.position.z = Math.cos( timer ) * 3; |
| 211 | + camera.position.x = Math.sin( timer ) * 2.5; |
| 212 | + camera.position.z = Math.cos( timer ) * 2.5; |
192 | 213 |
|
193 | 214 | camera.lookAt( cameraTarget );
|
194 | 215 |
|
|
0 commit comments