1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-20 02:25:41 +02:00
This commit is contained in:
syuilo
2026-04-18 15:08:36 +09:00
parent d1555d5423
commit 47cd092380
3 changed files with 122 additions and 25 deletions

View File

@@ -236,7 +236,7 @@ export class WorldEngine extends EventEmitter<WorldEngineEvents> {
messageRing.rotation = messageRing.rotationQuaternion.toEulerAngles();
messageRing.rotationQuaternion = null;
const text = new RecyvlingTextGrid(messageRing, 256, {
dir: 'left',
meshFlipped: true,
material: this.textMaterial,
});
@@ -247,7 +247,7 @@ export class WorldEngine extends EventEmitter<WorldEngineEvents> {
const anim = new BABYLON.Animation('', 'rotation.y', 60, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE);
anim.setKeys([
{ frame: 0, value: 0 },
{ frame: 10000, value: Math.PI * 2 },
{ frame: 10000, value: -(Math.PI * 2) },
]);
messageRing.animations = [anim];
this.scene.beginAnimation(messageRing, 0, 10000, true);
@@ -271,6 +271,66 @@ export class WorldEngine extends EventEmitter<WorldEngineEvents> {
}, 10000);
}
{
const messageRingRoot = new BABYLON.TransformNode('', this.scene);
const messageRing = envObj.meshes.find(m => m.name.includes('__MESSAGE_RING_INNER_1__'));
messageRing.parent = messageRingRoot;
messageRing.rotation = messageRing.rotationQuaternion.toEulerAngles();
messageRing.rotationQuaternion = null;
const text = new RecyvlingTextGrid(messageRing, 64, {
material: this.textMaterial,
repeatSeparator: ' ',
});
//messageRingRoot.rotation.x = Math.PI / 4;
const anim = new BABYLON.Animation('', 'rotation.y', 60, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE);
anim.setKeys([
{ frame: 0, value: 0 },
{ frame: 10000, value: (Math.PI * 2) },
]);
messageRing.animations = [anim];
this.scene.beginAnimation(messageRing, 0, 10000, true);
setInterval(() => {
const now = new Date();
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
text.write(`${hours}:${minutes}:${seconds}`);
}, 1000);
}
{
const messageRingRoot = new BABYLON.TransformNode('', this.scene);
const messageRing = envObj.meshes.find(m => m.name.includes('__MESSAGE_RING_INNER_2__'));
messageRing.parent = messageRingRoot;
messageRing.rotation = messageRing.rotationQuaternion.toEulerAngles();
messageRing.rotationQuaternion = null;
const text = new RecyvlingTextGrid(messageRing, 64, {
material: this.textMaterial,
repeatSeparator: ' ',
});
//messageRingRoot.rotation.x = Math.PI / 4;
const anim = new BABYLON.Animation('', 'rotation.y', 60, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE);
anim.setKeys([
{ frame: 0, value: 0 },
{ frame: 10000, value: -(Math.PI * 2) },
]);
messageRing.animations = [anim];
this.scene.beginAnimation(messageRing, 0, 10000, true);
setInterval(() => {
const now = new Date();
const years = now.getFullYear().toString();
const months = (now.getMonth() + 1).toString().padStart(2, '0');
const days = now.getDate().toString().padStart(2, '0');
text.write(`${years}/${months}/${days}`);
}, 1000);
}
for (let i = 0; i < 16; i++) {
const sphereRoot = new BABYLON.TransformNode('', this.scene);
sphereRoot.position = new BABYLON.Vector3(cm(0), cm(1000 + (100 * i)), cm(0));