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, AnimationFn,
Animation, Animation,
invokeAnimation, invokeAnimation,
SubAnimationHandle,
AnimationHandle, AnimationHandle,
CompositeAnimation, CompositeAnimation,
RootAnimation,
WalkingAnimation, WalkingAnimation,
RunningAnimation, RunningAnimation,

View File

@ -16,7 +16,7 @@ export interface SkinViewerOptions {
export class SkinViewer { export class SkinViewer {
public readonly domElement: Node; public readonly domElement: Node;
public readonly animations: RootAnimation; public readonly animations: RootAnimation = new RootAnimation();
public detectModel: boolean = true; public detectModel: boolean = true;
public disposed: boolean = false; public disposed: boolean = false;
@ -111,7 +111,6 @@ export class SkinViewer {
if (options.width) this.width = options.width; if (options.width) this.width = options.width;
if (options.height) this.height = options.height; if (options.height) this.height = options.height;
this.animations = new RootAnimation();
const draw = () => { const draw = () => {
if (this.disposed) return; if (this.disposed) return;
window.requestAnimationFrame(draw); window.requestAnimationFrame(draw);