1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-20 04:45:31 +02:00
This commit is contained in:
syuilo
2026-04-04 20:55:48 +09:00
parent c454b8922b
commit df5df25c80
4 changed files with 44 additions and 50 deletions

View File

@@ -17,12 +17,12 @@ export const beamLamp = defineObject({
createInstance: ({ room, root, scene }) => {
return {
onInited: () => {
const light = new BABYLON.PointLight('beamLampLight', new BABYLON.Vector3(0, 10/*cm*/, 0), scene, true);
const light = new BABYLON.PointLight('beamLampLight', new BABYLON.Vector3(0, 10/*cm*/, 0), scene, room?.lightContainer != null);
light.parent = root;
light.diffuse = new BABYLON.Color3(1.0, 0.5, 0.2);
light.intensity = 300;
light.range = 100/*cm*/;
room.lightContainer.addLight(light);
if (room?.lightContainer != null) room.lightContainer.addLight(light);
},
interactions: {},
};

View File

@@ -16,12 +16,12 @@ export const lavaLamp = defineObject({
createInstance: ({ room, scene, root }) => {
return {
onInited: () => {
const light = new BABYLON.PointLight('lavaLampLight', new BABYLON.Vector3(0, 11/*cm*/, 0), scene, true);
const light = new BABYLON.PointLight('lavaLampLight', new BABYLON.Vector3(0, 11/*cm*/, 0), scene, room?.lightContainer != null);
light.parent = root;
light.diffuse = new BABYLON.Color3(1.0, 0.5, 0.2);
light.intensity = 300;
light.range = 100/*cm*/;
room.lightContainer.addLight(light);
if (room?.lightContainer != null) room.lightContainer.addLight(light);
const sphere = BABYLON.MeshBuilder.CreateSphere('lavaLampLightSphere', { diameter: 4/*cm*/ }, scene);
sphere.parent = root;

View File

@@ -47,12 +47,12 @@ export const woodRingFloorLamp = defineObject({
const lamps = model.findMeshes('__X_LAMP__');
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, true);
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.diffuse = new BABYLON.Color3(1.0, 0.5, 0.2);
light.intensity = 5000;
light.range = 150/*cm*/;
room.lightContainer.addLight(light);
if (room?.lightContainer != null) room.lightContainer.addLight(light);
}
return {