Feature: add textures to wall and floor, make pillars round
This commit is contained in:
parent
d9dd5a56d1
commit
c944fb0f4d
@ -19,7 +19,7 @@ export class LightBall extends SceneFeature {
|
||||
// --- Ball Properties ---
|
||||
const ballRadius = 0.4;
|
||||
const lightIntensity = 5.0;
|
||||
const lightColors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0x00ffff]; // Red, Green, Blue, Yellow
|
||||
const lightColors = [0xff0000, 0x00ff00, 0x0000ff, 0xffff00, 0x00ffff, 0xff00ff]; // Red, Green, Blue, Yellow
|
||||
|
||||
lightColors.forEach(color => {
|
||||
// --- Create the Ball ---
|
||||
@ -31,10 +31,6 @@ export class LightBall extends SceneFeature {
|
||||
|
||||
// --- Create the Light ---
|
||||
const light = new THREE.PointLight(color, lightIntensity, length / 1.5);
|
||||
light.shadow.mapSize.width = 1024;
|
||||
light.shadow.mapSize.height = 1024;
|
||||
light.shadow.camera.near = 0.1;
|
||||
light.shadow.camera.far = 200;
|
||||
|
||||
// --- Initial Position ---
|
||||
ball.position.set(
|
||||
|
||||
@ -40,7 +40,7 @@ export class RoomWalls extends SceneFeature {
|
||||
});
|
||||
|
||||
// --- Geometry Definitions ---
|
||||
const pillarGeo = new THREE.BoxGeometry(pillarSize, pillarHeight, pillarSize);
|
||||
const pillarGeo = new THREE.CylinderGeometry(pillarSize / 2, pillarSize / 2, pillarHeight, 24);
|
||||
|
||||
// --- Object Creation Functions ---
|
||||
const createMesh = (geometry, material, position, rotation = new THREE.Euler()) => {
|
||||
@ -89,7 +89,7 @@ export class RoomWalls extends SceneFeature {
|
||||
const z = -length / 2 + pillarSpacing * (i + 0.5);
|
||||
// Add wall sections between pillars
|
||||
if (i <= numPillars) {
|
||||
createMesh(arcadeWallGeo, arcadeWallMat, new THREE.Vector3(-naveWidth / 2, pillarHeight + arcadeWallHeight / 2, z));
|
||||
createMesh(arcadeWallGeo, arcadeWallMat, new THREE.Vector3(-naveWidth / 2 , pillarHeight + arcadeWallHeight / 2, z));
|
||||
createMesh(arcadeWallGeo, arcadeWallMat, new THREE.Vector3(naveWidth / 2, pillarHeight + arcadeWallHeight / 2, z));
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.0 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.4 MiB |
Loading…
Reference in New Issue
Block a user