mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-14 15:45:43 +02:00
wip
This commit is contained in:
@@ -67,6 +67,8 @@ export const tabletopDigitalClock = defineObject({
|
||||
|
||||
const colonMeshes = model.findMeshes('__TIME_7SEG_COLON__');
|
||||
|
||||
model.bakeExcludeMeshes = Object.values(segmentMeshes).concat(colonMeshes);
|
||||
|
||||
const bodyMesh = model.findMesh('__X_BODY__');
|
||||
const bodyMaterial = bodyMesh.material as BABYLON.PBRMaterial;
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ export const wallClock = defineObject({
|
||||
},
|
||||
placement: 'side',
|
||||
createInstance: ({ room, root, options, model }) => {
|
||||
const hourHand = model.findMesh('HandH');
|
||||
const minuteHand = model.findMesh('HandM');
|
||||
|
||||
const frameMaterial = model.findMaterial('__X_FRAME__');
|
||||
|
||||
const applyFrameColor = () => {
|
||||
@@ -31,10 +34,10 @@ export const wallClock = defineObject({
|
||||
|
||||
applyFrameColor();
|
||||
|
||||
model.bakeExcludeMeshes = [hourHand, minuteHand];
|
||||
|
||||
return {
|
||||
onInited: () => {
|
||||
const hourHand = root.getChildMeshes().find(m => m.name === 'HandH') as BABYLON.Mesh;
|
||||
const minuteHand = root.getChildMeshes().find(m => m.name === 'HandM') as BABYLON.Mesh;
|
||||
room.intervalIds.push(window.setInterval(() => {
|
||||
const now = new Date();
|
||||
const hours = now.getHours() % 12;
|
||||
|
||||
Reference in New Issue
Block a user