skinview3d/types/viewer.d.ts

47 lines
1.1 KiB
TypeScript
Raw Normal View History

2018-02-09 05:29:42 +01:00
import * as THREE from "three";
import { Animation } from "./animation";
import { PlayerObject } from "./model";
2018-02-04 15:15:03 +01:00
2018-02-09 05:55:04 +01:00
export interface SkinViewerOptions {
domElement: Node;
2018-02-09 05:29:42 +01:00
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:55:04 +01:00
public readonly domElement: Node;
public readonly disposed: boolean;
2018-02-09 05:41:14 +01:00
public width: number;
public height: number;
2018-02-09 05:55:04 +01:00
public skinUrl: string;
public capeUrl: string;
2018-02-09 05:41:14 +01:00
public animation: Animation;
public animationPaused: boolean;
public animationTime: number;
public readonly playerObject: PlayerObject;
public readonly scene: THREE.Scene;
2018-02-09 05:55:04 +01:00
public readonly camera: THREE.PerspectiveCamera;
public readonly renderer: THREE.Renderer;
2018-02-09 05:29:42 +01:00
constructor(options: SkinViewerOptions);
2018-02-09 05:41:14 +01:00
public setSize(width: number, height: number): void;
2018-02-09 05:29:42 +01:00
2018-02-09 05:41:14 +01:00
public dispose(): void;
2018-02-04 15:15:03 +01:00
}
export class MouseControl {
public pan: boolean;
public zoom: boolean;
public rotation: boolean;
2018-02-09 05:41:14 +01:00
public 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:41:14 +01:00
public dispose(): void;
2018-02-04 15:15:03 +01:00
}