1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-19 21:45:31 +02:00
This commit is contained in:
syuilo
2026-04-19 20:15:51 +09:00
parent 3811de2283
commit e402057d3b
6 changed files with 50 additions and 42 deletions

View File

@@ -100,7 +100,7 @@ export const tabletopDigitalClock = defineObject({
applyBodyColor();
applyLcdColor();
room.intervalIds.push(setInterval(() => {
room.timer.setInterval(() => {
const onMeshes = get7segMeshesOfCurrentTime(segmentMeshes);
for (const mesh of Object.values(segmentMeshes)) {
@@ -118,7 +118,7 @@ export const tabletopDigitalClock = defineObject({
}
room?.sr.updateMesh([...Object.values(segmentMeshes), ...colonMeshes]);
}, 1000));
}, 1000);
},
onOptionsUpdated: ([k, v]) => {
if (k === 'bodyColor') {

View File

@@ -39,7 +39,7 @@ export const wallClock = defineObject({
return {
onInited: () => {
room.intervalIds.push(setInterval(() => {
room.timer.setInterval(() => {
const now = new Date();
const hours = now.getHours() % 12;
const minutes = now.getMinutes();
@@ -48,7 +48,7 @@ export const wallClock = defineObject({
hourHand.rotation = new BABYLON.Vector3(0, 0, hAngle);
minuteHand.rotation = new BABYLON.Vector3(0, 0, mAngle);
room?.sr.updateMesh([hourHand, minuteHand]);
}, 1000));
}, 1000);
},
onOptionsUpdated: ([k, v]) => {
applyFrameColor();