import * as three from "three-js"; import { functional_factor } from "./factor.js"; const room = (space) => { const cube = new functional_factor(() => { const material = new three.MeshStandardMaterial({ color: 0xA000A0 }); const geometry = new three.BoxGeometry(1, 1, 1); const mesh = new three.Mesh(geometry, material); mesh.position.x = 10; mesh.position.z = -10; mesh.position.y = 1; return mesh; }); const light = new functional_factor(() => { const light = new three.HemisphereLight(0x707070); light.position.x = -10; light.position.z = 10; light.position.y = 10; return light; }); space.add_factor(cube); space.add_factor(light); }; export { room };