|
@@ -191,8 +191,7 @@
|
|
|
|
|
|
// cloth geometry
|
|
// cloth geometry
|
|
clothGeometry = new THREE.ParametricGeometry( clothFunction, cloth.w, cloth.h );
|
|
clothGeometry = new THREE.ParametricGeometry( clothFunction, cloth.w, cloth.h );
|
|
- clothGeometry.dynamic = true;
|
|
|
|
- clothGeometry.computeFaceNormals();
|
|
|
|
|
|
+ clothGeometry = new THREE.DynamicGeometry().fromGeometry( clothGeometry );
|
|
|
|
|
|
var uniforms = { texture: { type: "t", value: clothTexture } };
|
|
var uniforms = { texture: { type: "t", value: clothTexture } };
|
|
var vertexShader = document.getElementById( 'vertexShaderDepth' ).textContent;
|
|
var vertexShader = document.getElementById( 'vertexShaderDepth' ).textContent;
|
|
@@ -230,7 +229,7 @@
|
|
groundTexture.wrapS = groundTexture.wrapT = THREE.RepeatWrapping;
|
|
groundTexture.wrapS = groundTexture.wrapT = THREE.RepeatWrapping;
|
|
groundTexture.repeat.set( 25, 25 );
|
|
groundTexture.repeat.set( 25, 25 );
|
|
groundTexture.anisotropy = 16;
|
|
groundTexture.anisotropy = 16;
|
|
-
|
|
|
|
|
|
+
|
|
var groundMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, specular: 0x111111, map: groundTexture } );
|
|
var groundMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, specular: 0x111111, map: groundTexture } );
|
|
|
|
|
|
var mesh = new THREE.Mesh( new THREE.PlaneBufferGeometry( 20000, 20000 ), groundMaterial );
|
|
var mesh = new THREE.Mesh( new THREE.PlaneBufferGeometry( 20000, 20000 ), groundMaterial );
|
|
@@ -349,9 +348,6 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- clothGeometry.computeFaceNormals();
|
|
|
|
- clothGeometry.computeVertexNormals();
|
|
|
|
-
|
|
|
|
clothGeometry.normalsNeedUpdate = true;
|
|
clothGeometry.normalsNeedUpdate = true;
|
|
clothGeometry.verticesNeedUpdate = true;
|
|
clothGeometry.verticesNeedUpdate = true;
|
|
|
|
|