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