mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-22 14:04:08 +02:00
wip
This commit is contained in:
@@ -33,7 +33,13 @@ export const tabletopDigitalClock = defineObject({
|
||||
},
|
||||
},
|
||||
placement: 'top',
|
||||
createInstance: ({ room, options, model }) => {
|
||||
createInstance: ({ root, room, options, model, scene }) => {
|
||||
const light = new BABYLON.SpotLight('', new BABYLON.Vector3(0, 3/*cm*/, 1/*cm*/), new BABYLON.Vector3(0, 0, 1), Math.PI / 1, 2, scene, room?.lightContainer != null);
|
||||
light.parent = root;
|
||||
light.intensity = 100;
|
||||
light.range = 30/*cm*/;
|
||||
if (room?.lightContainer != null) room.lightContainer.addLight(light);
|
||||
|
||||
const segmentMeshes = {
|
||||
'1a': model.findMesh('__TIME_7SEG_1A__'),
|
||||
'1b': model.findMesh('__TIME_7SEG_1B__'),
|
||||
@@ -85,6 +91,7 @@ export const tabletopDigitalClock = defineObject({
|
||||
const mat = segmentMeshes['1a'].material as BABYLON.PBRMaterial;
|
||||
const [r, g, b] = options.lcdColor;
|
||||
mat.emissiveColor = new BABYLON.Color3(r, g, b);
|
||||
light.diffuse = new BABYLON.Color3(r, g, b);
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user