From ce1f58f4c666c676b79a8381c29db46bfb6f4001 Mon Sep 17 00:00:00 2001 From: yushijinhun Date: Fri, 9 Feb 2018 12:55:04 +0800 Subject: [PATCH] sort members --- types/animation.d.ts | 4 ++-- types/skinview3d.d.ts | 14 +++----------- types/viewer.d.ts | 15 +++++++-------- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/types/animation.d.ts b/types/animation.d.ts index b31350b..8fa4d62 100644 --- a/types/animation.d.ts +++ b/types/animation.d.ts @@ -1,9 +1,9 @@ import { PlayerObject } from "./model"; -type AnimationFn = (player: PlayerObject, time: number) => void; -interface IAnimation { +export interface IAnimation { play(player: PlayerObject, time: number): void; } +export type AnimationFn = (player: PlayerObject, time: number) => void; export type Animation = AnimationFn | IAnimation; export function invokeAnimation( diff --git a/types/skinview3d.d.ts b/types/skinview3d.d.ts index c78e4c5..43581bc 100644 --- a/types/skinview3d.d.ts +++ b/types/skinview3d.d.ts @@ -1,11 +1,3 @@ -export { - CompositeAnimation, - WalkAnimation, - Animation, - AnimationFn, - IAnimation, -} from "./animation"; - -export { SkinViewer, SkinControl } from "./viewer"; - -export { SkinObject, CapeObject, PlayerObject } from "./model"; +export * from "./model"; +export * from "./animation"; +export * from "./viewer"; diff --git a/types/viewer.d.ts b/types/viewer.d.ts index 44b77ab..f4bafd6 100644 --- a/types/viewer.d.ts +++ b/types/viewer.d.ts @@ -1,9 +1,8 @@ import * as THREE from "three"; -import { CompositeAnimation, WalkAnimation } from "./animation"; import { Animation } from "./animation"; import { PlayerObject } from "./model"; -interface SkinViewerOptions { +export interface SkinViewerOptions { domElement: Node; animation?: Animation; slim?: boolean; @@ -14,19 +13,19 @@ interface SkinViewerOptions { } export class SkinViewer { - public skinUrl: string; - public capeUrl: string; + public readonly domElement: Node; + public readonly disposed: boolean; public width: number; public height: number; - public readonly domElement: Node; + public skinUrl: string; + public capeUrl: string; public animation: Animation; public animationPaused: boolean; public animationTime: number; public readonly playerObject: PlayerObject; - public readonly disposed: boolean; - public readonly camera: THREE.Camera; - public readonly renderer: THREE.Renderer; public readonly scene: THREE.Scene; + public readonly camera: THREE.PerspectiveCamera; + public readonly renderer: THREE.Renderer; constructor(options: SkinViewerOptions);