mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-05 11:44:08 +02:00
wip
This commit is contained in:
@@ -473,7 +473,7 @@ function toggleEditMode() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addObject() {
|
function addObject() {
|
||||||
engine.value?.addObject('mug');
|
engine.value?.addObject('tabletopDigitalClock');
|
||||||
canvas.value!.focus();
|
canvas.value!.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1078,7 +1078,7 @@ export class RoomEngine {
|
|||||||
id: id,
|
id: id,
|
||||||
type,
|
type,
|
||||||
position: new BABYLON.Vector3(0, 0, 0),
|
position: new BABYLON.Vector3(0, 0, 0),
|
||||||
rotation: new BABYLON.Vector3(0, 0, 0),
|
rotation: new BABYLON.Vector3(0, Math.PI, 0),
|
||||||
options: def.defaultOptions,
|
options: def.defaultOptions,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1093,7 +1093,7 @@ export class RoomEngine {
|
|||||||
objectType: type,
|
objectType: type,
|
||||||
mesh: root,
|
mesh: root,
|
||||||
originalDiffOfPosition: new BABYLON.Vector3(0, 0, 0),
|
originalDiffOfPosition: new BABYLON.Vector3(0, 0, 0),
|
||||||
originalDiffOfRotationY: 0,
|
originalDiffOfRotationY: Math.PI,
|
||||||
distance: distance,
|
distance: distance,
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
ghost: ghost,
|
ghost: ghost,
|
||||||
|
|||||||
@@ -46,11 +46,17 @@ export const tabletopDigitalClock = defineObject({
|
|||||||
'4g': root.getChildMeshes().find(m => m.name.includes('__TIME_7SEG_4G__')),
|
'4g': root.getChildMeshes().find(m => m.name.includes('__TIME_7SEG_4G__')),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const colonMeshes = root.getChildMeshes().filter(m => m.name.includes('__TIME_7SEG_COLON__'));
|
||||||
|
|
||||||
const onMeshes = get7segMeshesOfCurrentTime(meshes);
|
const onMeshes = get7segMeshesOfCurrentTime(meshes);
|
||||||
|
|
||||||
for (const mesh of Object.values(meshes)) {
|
for (const mesh of Object.values(meshes)) {
|
||||||
mesh.isVisible = onMeshes.includes(mesh);
|
mesh.isVisible = onMeshes.includes(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const mesh of colonMeshes) {
|
||||||
|
mesh.isVisible = Date.now() % 2000 < 1000;
|
||||||
|
}
|
||||||
}, 1000));
|
}, 1000));
|
||||||
},
|
},
|
||||||
interactions: {},
|
interactions: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user