|
24 | 24 | {
|
25 | 25 | let size = new THREE.Vector2 (10.0, 5.0);
|
26 | 26 |
|
27 |
| - this.shadowCamera = new THREE.OrthographicCamera (-size.x / 2.0, size.x / 2.0, size.y / 2.0, -size.y / 2.0, 0.0, 10.0); |
28 |
| - this.shadowCamera.position.z = -5; |
29 |
| - this.shadowCamera.scale.z *= -1; |
| 27 | + this.shadowCamera = new THREE.OrthographicCamera (-size.x / 2.0, size.x / 2.0, size.y / 2.0, -size.y / 2.0, 0.0, 8.0); |
| 28 | + //this.shadowCamera.scale.z *= -1; |
| 29 | + //this.shadowCamera.position.z = 6; |
| 30 | + this.shadowCamera.rotation.y = Math.PI; |
| 31 | + //this.shadowCamera.rotation.z = Math.PI; |
30 | 32 | shadowGroup.add (this.shadowCamera);
|
31 | 33 |
|
32 | 34 | this.shadowRenderTarget = new THREE.WebGLRenderTarget (1024, 1024);
|
|
56 | 58 | };
|
57 | 59 |
|
58 | 60 | this.shadowPlaneMesh = new THREE.Mesh (planeGeometry, planeMaterial);
|
| 61 | + this.shadowPlaneMesh.scale.x *= -1.0; |
59 | 62 | shadowGroup.add (this.shadowPlaneMesh);
|
60 | 63 | }
|
61 | 64 |
|
|
132 | 135 | });
|
133 | 136 | let boxMesh1 = new THREE.Mesh (box1, boxMaterial);
|
134 | 137 | let boxMesh2 = new THREE.Mesh (box2, boxMaterial);
|
135 |
| - boxMesh1.position.z = 4; |
| 138 | + |
| 139 | + boxMesh1.position.z = 3; |
| 140 | + |
136 | 141 | boxMesh2.position.x = 1;
|
137 | 142 | boxMesh2.position.y = 1;
|
138 |
| - boxMesh2.position.z = 2; |
| 143 | + boxMesh2.position.z = 1; |
139 | 144 |
|
140 | 145 | boxMesh1.updateMatrixWorld (true);
|
141 | 146 | boxMesh2.updateMatrixWorld (true);
|
|
0 commit comments