diff --git a/src/skinview3d.ts b/src/skinview3d.ts index 8080fde..f12cc7f 100644 --- a/src/skinview3d.ts +++ b/src/skinview3d.ts @@ -20,8 +20,11 @@ export { AnimationFn, Animation, invokeAnimation, + + SubAnimationHandle, AnimationHandle, CompositeAnimation, + RootAnimation, WalkingAnimation, RunningAnimation, diff --git a/src/viewer.ts b/src/viewer.ts index 16c78cd..c4a2146 100644 --- a/src/viewer.ts +++ b/src/viewer.ts @@ -16,7 +16,7 @@ export interface SkinViewerOptions { export class SkinViewer { public readonly domElement: Node; - public readonly animations: RootAnimation; + public readonly animations: RootAnimation = new RootAnimation(); public detectModel: boolean = true; public disposed: boolean = false; @@ -111,7 +111,6 @@ export class SkinViewer { if (options.width) this.width = options.width; if (options.height) this.height = options.height; - this.animations = new RootAnimation(); const draw = () => { if (this.disposed) return; window.requestAnimationFrame(draw);