mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
wip
This commit is contained in:
BIN
packages/frontend/assets/room/objects/beam-lamp/beam-lamp.blend
Normal file
BIN
packages/frontend/assets/room/objects/beam-lamp/beam-lamp.blend
Normal file
Binary file not shown.
BIN
packages/frontend/assets/room/objects/beam-lamp/beam-lamp.glb
Normal file
BIN
packages/frontend/assets/room/objects/beam-lamp/beam-lamp.glb
Normal file
Binary file not shown.
@@ -9,6 +9,7 @@ import { allInOnePc } from './objects/allInOnePc.js';
|
|||||||
import { aquarium } from './objects/aquarium.js';
|
import { aquarium } from './objects/aquarium.js';
|
||||||
import { aromaReedDiffuser } from './objects/aromaReedDiffuser.js';
|
import { aromaReedDiffuser } from './objects/aromaReedDiffuser.js';
|
||||||
import { banknote } from './objects/banknote.js';
|
import { banknote } from './objects/banknote.js';
|
||||||
|
import { beamLamp } from './objects/beamLamp.js';
|
||||||
import { bed } from './objects/bed.js';
|
import { bed } from './objects/bed.js';
|
||||||
import { blind } from './objects/blind.js';
|
import { blind } from './objects/blind.js';
|
||||||
import { book } from './objects/book.js';
|
import { book } from './objects/book.js';
|
||||||
@@ -62,6 +63,7 @@ export const OBJECT_DEFS = [
|
|||||||
aquarium,
|
aquarium,
|
||||||
aromaReedDiffuser,
|
aromaReedDiffuser,
|
||||||
banknote,
|
banknote,
|
||||||
|
beamLamp,
|
||||||
bed,
|
bed,
|
||||||
blind,
|
blind,
|
||||||
book,
|
book,
|
||||||
|
|||||||
29
packages/frontend/src/utility/room/objects/beamLamp.ts
Normal file
29
packages/frontend/src/utility/room/objects/beamLamp.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
import * as BABYLON from '@babylonjs/core';
|
||||||
|
import { defineObject } from '../engine.js';
|
||||||
|
|
||||||
|
export const beamLamp = defineObject({
|
||||||
|
id: 'beamLamp',
|
||||||
|
name: 'Beam Lamp',
|
||||||
|
options: {
|
||||||
|
schema: {},
|
||||||
|
default: {},
|
||||||
|
},
|
||||||
|
placement: 'top',
|
||||||
|
createInstance: ({ root, room }) => {
|
||||||
|
return {
|
||||||
|
onInited: () => {
|
||||||
|
const light = new BABYLON.PointLight('beamLampLight', new BABYLON.Vector3(0, 10/*cm*/, 0), room.scene);
|
||||||
|
light.parent = root;
|
||||||
|
light.diffuse = new BABYLON.Color3(1.0, 0.5, 0.2);
|
||||||
|
light.intensity = 300;
|
||||||
|
light.range = 100/*cm*/;
|
||||||
|
},
|
||||||
|
interactions: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user