skinview3d/types/viewer.d.ts

46 lines
981 B
TypeScript
Raw Normal View History

2018-02-09 05:29:42 +01:00
import * as THREE from "three";
import { CompositeAnimation, WalkAnimation } from "./animation";
import { Animation } from "./animation";
import { PlayerObject } from "./model";
2018-02-04 15:15:03 +01:00
interface SkinViewerOptions {
2018-02-09 05:29:42 +01:00
domElement: Element;
animation?: Animation;
slim?: boolean;
skinUrl?: string;
capeUrl?: string;
width?: number;
height?: number;
2018-02-04 15:15:03 +01:00
}
export class SkinViewer {
2018-02-09 05:29:42 +01:00
skinUrl: string;
capeUrl: string;
width: number;
height: number;
readonly domElement: Element;
animation: Animation;
animationPaused: boolean;
animationTime: number;
readonly playerObject: PlayerObject;
readonly disposed: boolean;
readonly camera: THREE.Camera;
readonly renderer: THREE.Renderer;
readonly scene: THREE.Scene;
constructor(options: SkinViewerOptions);
setSize(width: number, height: number): void;
dispose(): void;
2018-02-04 15:15:03 +01:00
}
export class SkinControl {
2018-02-09 05:29:42 +01:00
enableAnimationControl: boolean;
readonly skinViewer: SkinViewer;
2018-02-04 16:23:27 +01:00
2018-02-09 05:29:42 +01:00
constructor(skinViewer: SkinViewer);
2018-02-04 15:15:03 +01:00
2018-02-09 05:29:42 +01:00
dispose(): void;
2018-02-04 15:15:03 +01:00
}