1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-14 06:25:52 +02:00
This commit is contained in:
syuilo
2026-04-03 20:51:40 +09:00
parent 65b6821d4f
commit 4813ea5afc
2 changed files with 7 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;