|
@@ -553,6 +553,7 @@ export class Animation {
|
|
|
*/
|
|
|
public addEvent(event: AnimationEvent): void {
|
|
|
this._events.push(event);
|
|
|
+ this._events.sort((a, b) => a.frame - b.frame);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1302,4 +1303,4 @@ export class Animation {
|
|
|
}
|
|
|
|
|
|
_TypeStore.RegisteredTypes["BABYLON.Animation"] = Animation;
|
|
|
-Node._AnimationRangeFactory = (name: string, from: number, to: number) => new AnimationRange(name, from, to);
|
|
|
+Node._AnimationRangeFactory = (name: string, from: number, to: number) => new AnimationRange(name, from, to);
|