code cleanup
This commit is contained in:
parent
e15ed531f1
commit
5b101d93af
|
|
@ -102,7 +102,7 @@ export class CompositeAnimation implements IAnimation {
|
|||
export class RootAnimation extends CompositeAnimation implements AnimationHandle {
|
||||
speed: number = 1.0;
|
||||
progress: number = 0.0;
|
||||
readonly clock: Clock = new Clock(true);
|
||||
private readonly clock: Clock = new Clock(true);
|
||||
|
||||
get animation(): RootAnimation {
|
||||
return this;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ function toCapeVertices(x1: number, y1: number, x2: number, y2: number): Array<V
|
|||
}
|
||||
|
||||
function setVertices(box: BoxGeometry, top: Array<Vector2>, bottom: Array<Vector2>, left: Array<Vector2>, front: Array<Vector2>, right: Array<Vector2>, back: Array<Vector2>): void {
|
||||
|
||||
box.faceVertexUvs[0] = [];
|
||||
box.faceVertexUvs[0][0] = [right[3], right[0], right[2]];
|
||||
box.faceVertexUvs[0][1] = [right[0], right[1], right[2]];
|
||||
|
|
|
|||
|
|
@ -4,8 +4,11 @@ import { RootAnimation } from "./animation.js";
|
|||
import { PlayerObject } from "./model.js";
|
||||
|
||||
export type LoadOptions = {
|
||||
/**
|
||||
* Whether to make the object visible after the texture is loaded. (default: true)
|
||||
*/
|
||||
makeVisible?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
function toMakeVisible(options?: LoadOptions): boolean {
|
||||
if (options && options.makeVisible === false) {
|
||||
|
|
@ -15,7 +18,6 @@ function toMakeVisible(options?: LoadOptions): boolean {
|
|||
}
|
||||
|
||||
class SkinViewer {
|
||||
|
||||
readonly scene: Scene;
|
||||
readonly camera: PerspectiveCamera;
|
||||
readonly renderer: WebGLRenderer;
|
||||
|
|
@ -29,8 +31,6 @@ class SkinViewer {
|
|||
|
||||
private _disposed: boolean = false;
|
||||
private _renderPaused: boolean = false;
|
||||
private _skinSet: boolean = false;
|
||||
private _capeSet: boolean = false;
|
||||
|
||||
constructor(readonly domElement: Node) {
|
||||
// texture
|
||||
|
|
@ -44,7 +44,6 @@ class SkinViewer {
|
|||
this.capeTexture.magFilter = NearestFilter;
|
||||
this.capeTexture.minFilter = NearestFilter;
|
||||
|
||||
// scene
|
||||
this.scene = new Scene();
|
||||
|
||||
// Use smaller fov to avoid distortion
|
||||
|
|
|
|||
Loading…
Reference in New Issue