mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-19 21:45:31 +02:00
timer
This commit is contained in:
@@ -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') {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user