sort members

This commit is contained in:
yushijinhun 2018-02-09 12:55:04 +08:00
parent 733e171316
commit ce1f58f4c6
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
3 changed files with 12 additions and 21 deletions

View File

@ -1,9 +1,9 @@
import { PlayerObject } from "./model"; import { PlayerObject } from "./model";
type AnimationFn = (player: PlayerObject, time: number) => void; export interface IAnimation {
interface IAnimation {
play(player: PlayerObject, time: number): void; play(player: PlayerObject, time: number): void;
} }
export type AnimationFn = (player: PlayerObject, time: number) => void;
export type Animation = AnimationFn | IAnimation; export type Animation = AnimationFn | IAnimation;
export function invokeAnimation( export function invokeAnimation(

14
types/skinview3d.d.ts vendored
View File

@ -1,11 +1,3 @@
export { export * from "./model";
CompositeAnimation, export * from "./animation";
WalkAnimation, export * from "./viewer";
Animation,
AnimationFn,
IAnimation,
} from "./animation";
export { SkinViewer, SkinControl } from "./viewer";
export { SkinObject, CapeObject, PlayerObject } from "./model";

15
types/viewer.d.ts vendored
View File

@ -1,9 +1,8 @@
import * as THREE from "three"; import * as THREE from "three";
import { CompositeAnimation, WalkAnimation } from "./animation";
import { Animation } from "./animation"; import { Animation } from "./animation";
import { PlayerObject } from "./model"; import { PlayerObject } from "./model";
interface SkinViewerOptions { export interface SkinViewerOptions {
domElement: Node; domElement: Node;
animation?: Animation; animation?: Animation;
slim?: boolean; slim?: boolean;
@ -14,19 +13,19 @@ interface SkinViewerOptions {
} }
export class SkinViewer { export class SkinViewer {
public skinUrl: string; public readonly domElement: Node;
public capeUrl: string; public readonly disposed: boolean;
public width: number; public width: number;
public height: number; public height: number;
public readonly domElement: Node; public skinUrl: string;
public capeUrl: string;
public animation: Animation; public animation: Animation;
public animationPaused: boolean; public animationPaused: boolean;
public animationTime: number; public animationTime: number;
public readonly playerObject: PlayerObject; 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 scene: THREE.Scene;
public readonly camera: THREE.PerspectiveCamera;
public readonly renderer: THREE.Renderer;
constructor(options: SkinViewerOptions); constructor(options: SkinViewerOptions);