Skip to content

Commit 084661a

Browse files
committedOct 7, 2016
Removed webgl_geometry_large_mesh example.
1 parent 56a96d8 commit 084661a

File tree

7 files changed

+25
-340
lines changed

7 files changed

+25
-340
lines changed
 

‎examples/files.js

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ var files = {
3030
"webgl_geometry_extrude_splines",
3131
"webgl_geometry_hierarchy",
3232
"webgl_geometry_hierarchy2",
33-
"webgl_geometry_large_mesh",
3433
"webgl_geometry_minecraft",
3534
"webgl_geometry_minecraft_ao",
3635
"webgl_geometry_normals",
1.81 MB
Binary file not shown.

‎examples/obj/lucy/Lucy100k_bin.bin

-1.91 MB
Binary file not shown.

‎examples/obj/lucy/Lucy100k_bin.js

-23
This file was deleted.

‎examples/obj/lucy/Lucy100k_slim.js

-36
This file was deleted.

‎examples/webgl_geometry_large_mesh.html

-276
This file was deleted.

‎examples/webgl_loader_ply.html

+25-4
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
camera = new THREE.PerspectiveCamera( 35, window.innerWidth / window.innerHeight, 1, 15 );
6969
camera.position.set( 3, 0.15, 3 );
7070

71-
cameraTarget = new THREE.Vector3( 0, -0.25, 0 );
71+
cameraTarget = new THREE.Vector3( 0, -0.1, 0 );
7272

7373
scene = new THREE.Scene();
7474
scene.fog = new THREE.Fog( 0x72645b, 2, 15 );
@@ -97,7 +97,8 @@
9797
var material = new THREE.MeshStandardMaterial( { color: 0x0055ff, shading: THREE.FlatShading } );
9898
var mesh = new THREE.Mesh( geometry, material );
9999

100-
mesh.position.y = - 0.25;
100+
mesh.position.y = - 0.2;
101+
mesh.position.z = 0.3;
101102
mesh.rotation.x = - Math.PI / 2;
102103
mesh.scale.multiplyScalar( 0.001 );
103104

@@ -108,6 +109,26 @@
108109

109110
} );
110111

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+
111132
// Lights
112133

113134
scene.add( new THREE.HemisphereLight( 0x443333, 0x111122 ) );
@@ -187,8 +208,8 @@
187208

188209
var timer = Date.now() * 0.0005;
189210

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;
192213

193214
camera.lookAt( cameraTarget );
194215

0 commit comments

Comments
 (0)