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 ---
|
// --- Ball Properties ---
|
||||||
const ballRadius = 0.4;
|
const ballRadius = 0.4;
|
||||||
const lightIntensity = 5.0;
|
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 => {
|
lightColors.forEach(color => {
|
||||||
// --- Create the Ball ---
|
// --- Create the Ball ---
|
||||||
@ -31,10 +31,6 @@ export class LightBall extends SceneFeature {
|
|||||||
|
|
||||||
// --- Create the Light ---
|
// --- Create the Light ---
|
||||||
const light = new THREE.PointLight(color, lightIntensity, length / 1.5);
|
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 ---
|
// --- Initial Position ---
|
||||||
ball.position.set(
|
ball.position.set(
|
||||||
|
|||||||
@ -40,7 +40,7 @@ export class RoomWalls extends SceneFeature {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// --- Geometry Definitions ---
|
// --- Geometry Definitions ---
|
||||||
const pillarGeo = new THREE.BoxGeometry(pillarSize, pillarHeight, pillarSize);
|
const pillarGeo = new THREE.CylinderGeometry(pillarSize / 2, pillarSize / 2, pillarHeight, 24);
|
||||||
|
|
||||||
// --- Object Creation Functions ---
|
// --- Object Creation Functions ---
|
||||||
const createMesh = (geometry, material, position, rotation = new THREE.Euler()) => {
|
const createMesh = (geometry, material, position, rotation = new THREE.Euler()) => {
|
||||||
|
|||||||
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