1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-23 06:24:15 +02:00
This commit is contained in:
syuilo
2026-04-19 20:23:07 +09:00
parent e402057d3b
commit c2428ca3cc
5 changed files with 20 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ export const wallClock = defineObject({
},
placement: 'side',
hasCollisions: false,
createInstance: ({ room, root, options, model }) => {
createInstance: ({ room, timer, options, model }) => {
const hourHand = model.findMesh('HandH');
const minuteHand = model.findMesh('HandM');
@@ -39,7 +39,8 @@ export const wallClock = defineObject({
return {
onInited: () => {
room.timer.setInterval(() => {
// TODO: 家具が撤去された後も呼ばれ続けるのをどうにかする
timer.setInterval(() => {
const now = new Date();
const hours = now.getHours() % 12;
const minutes = now.getMinutes();