mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-25 17:10:43 +00:00
Update engine.ts
This commit is contained in:
parent
1cd75fe5a8
commit
85ae7c7efc
1 changed files with 4 additions and 4 deletions
|
|
@ -1319,7 +1319,7 @@ export class RoomEngine extends EventEmitter {
|
|||
BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT,
|
||||
);
|
||||
const keys = [
|
||||
{ frame: 0, value: new BABYLON.Vector3(1, 1.2, 1) },
|
||||
{ frame: 0, value: new BABYLON.Vector3(0.8, 1.2, 0.8) },
|
||||
{ frame: 60, value: new BABYLON.Vector3(1, 1, 1) },
|
||||
];
|
||||
animTarget.setKeys(keys);
|
||||
|
|
@ -1329,7 +1329,7 @@ export class RoomEngine extends EventEmitter {
|
|||
selectedObject.animations.push(animTarget);
|
||||
const animating = Promise.withResolvers<void>();
|
||||
const animationObserver = this.scene.onAfterAnimationsObservable.add(() => {
|
||||
this.sr.updateMesh(selectedObject.getChildMeshes(), false);
|
||||
this.sr.updateMesh(selectedObject.getChildMeshes(), true);
|
||||
});
|
||||
this.scene.beginAnimation(selectedObject, 0, 60, false, 3, () => { animating.resolve(); });
|
||||
|
||||
|
|
@ -1560,7 +1560,7 @@ export class RoomEngine extends EventEmitter {
|
|||
BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT,
|
||||
);
|
||||
const keys = [
|
||||
{ frame: 0, value: new BABYLON.Vector3(1, 1.2, 1) },
|
||||
{ frame: 0, value: new BABYLON.Vector3(0.8, 1.2, 0.8) },
|
||||
{ frame: 60, value: new BABYLON.Vector3(1, 1, 1) },
|
||||
];
|
||||
animTarget.setKeys(keys);
|
||||
|
|
@ -1569,7 +1569,7 @@ export class RoomEngine extends EventEmitter {
|
|||
animTarget.setEasingFunction(easing);
|
||||
root.animations.push(animTarget);
|
||||
const animationObserver = this.scene.onAfterAnimationsObservable.add(() => {
|
||||
this.sr.updateMesh(root.getChildMeshes(), false);
|
||||
this.sr.updateMesh(root.getChildMeshes(), true);
|
||||
});
|
||||
this.scene.beginAnimation(root, 0, 60, false, 3, () => {
|
||||
this.scene.onAfterAnimationsObservable.remove(animationObserver);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue