|
| 1 | +import * as THREE from '../../../build/three.module.js'; |
| 2 | + |
| 3 | +function DebugEnvironment() { |
| 4 | + |
| 5 | + const envScene = new THREE.Scene(); |
| 6 | + |
| 7 | + const geometry = new THREE.BoxGeometry(); |
| 8 | + geometry.deleteAttribute( 'uv' ); |
| 9 | + const roomMaterial = new THREE.MeshStandardMaterial( { metalness: 0, side: THREE.BackSide } ); |
| 10 | + const room = new THREE.Mesh( geometry, roomMaterial ); |
| 11 | + room.scale.setScalar( 10 ); |
| 12 | + envScene.add( room ); |
| 13 | + |
| 14 | + const mainLight = new THREE.PointLight( 0xffffff, 50, 0, 2 ); |
| 15 | + envScene.add( mainLight ); |
| 16 | + |
| 17 | + const material1 = new THREE.MeshLambertMaterial( { color: 0xff0000, emissive: 0xffffff, emissiveIntensity: 10 } ); |
| 18 | + |
| 19 | + const light1 = new THREE.Mesh( geometry, material1 ); |
| 20 | + light1.position.set( - 5, 2, 0 ); |
| 21 | + light1.scale.set( 0.1, 1, 1 ); |
| 22 | + envScene.add( light1 ); |
| 23 | + |
| 24 | + const material2 = new THREE.MeshLambertMaterial( { color: 0x00ff00, emissive: 0xffffff, emissiveIntensity: 10 } ); |
| 25 | + |
| 26 | + const light2 = new THREE.Mesh( geometry, material2 ); |
| 27 | + light2.position.set( 0, 5, 0 ); |
| 28 | + light2.scale.set( 1, 0.1, 1 ); |
| 29 | + envScene.add( light2 ); |
| 30 | + |
| 31 | + const material3 = new THREE.MeshLambertMaterial( { color: 0x0000ff, emissive: 0xffffff, emissiveIntensity: 10 } ); |
| 32 | + |
| 33 | + const light3 = new THREE.Mesh( geometry, material3 ); |
| 34 | + light3.position.set( 2, 1, 5 ); |
| 35 | + light3.scale.set( 1.5, 2, 0.1 ); |
| 36 | + envScene.add( light3 ); |
| 37 | + |
| 38 | + return envScene; |
| 39 | + |
| 40 | +} |
| 41 | + |
| 42 | +export { DebugEnvironment }; |
0 commit comments