Add exports

This commit is contained in:
yushijinhun 2019-12-22 20:42:04 +08:00
parent 127d2ee7a3
commit 3123646db7
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
2 changed files with 4 additions and 2 deletions

View File

@ -20,8 +20,11 @@ export {
AnimationFn,
Animation,
invokeAnimation,
SubAnimationHandle,
AnimationHandle,
CompositeAnimation,
RootAnimation,
WalkingAnimation,
RunningAnimation,

View File

@ -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);