mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-21 22:45:36 +02:00
Update woodRingFloorLamp.ts
This commit is contained in:
@@ -63,7 +63,6 @@ export const woodRingFloorLamp = defineObject({
|
|||||||
for (const lamp of lamps) {
|
for (const lamp of lamps) {
|
||||||
const light = new BABYLON.SpotLight('', new BABYLON.Vector3(0/*cm*/, 0/*cm*/, 0), new BABYLON.Vector3(0, -1, 0), Math.PI / 1, 2, scene, room?.lightContainer != null);
|
const light = new BABYLON.SpotLight('', new BABYLON.Vector3(0/*cm*/, 0/*cm*/, 0), new BABYLON.Vector3(0, -1, 0), Math.PI / 1, 2, scene, room?.lightContainer != null);
|
||||||
light.parent = lamp;
|
light.parent = lamp;
|
||||||
light.range = 100/*cm*/;
|
|
||||||
if (room?.lightContainer != null) room.lightContainer.addLight(light);
|
if (room?.lightContainer != null) room.lightContainer.addLight(light);
|
||||||
lights.push(light);
|
lights.push(light);
|
||||||
}
|
}
|
||||||
@@ -84,6 +83,7 @@ export const woodRingFloorLamp = defineObject({
|
|||||||
const applyLightBrightness = () => {
|
const applyLightBrightness = () => {
|
||||||
for (const light of lights) {
|
for (const light of lights) {
|
||||||
light.intensity = 10000 * options.lightBrightness;
|
light.intensity = 10000 * options.lightBrightness;
|
||||||
|
light.range = 200/*cm*/ * options.lightBrightness;
|
||||||
}
|
}
|
||||||
for (const lamp of lamps) {
|
for (const lamp of lamps) {
|
||||||
const emissive = lamp.material as BABYLON.PBRMaterial;
|
const emissive = lamp.material as BABYLON.PBRMaterial;
|
||||||
|
|||||||
Reference in New Issue
Block a user