Fix options.detectModel not working

This commit is contained in:
yushijinhun 2018-08-16 19:35:16 +08:00
parent 07c927952c
commit 0545117c51
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
1 changed files with 4 additions and 5 deletions

View File

@ -7,7 +7,7 @@ export class SkinViewer {
public domElement: HTMLElement; public domElement: HTMLElement;
public animation: Animation; public animation: Animation;
public detectModel: boolean = false; public detectModel: boolean = true;
public animationPaused: boolean = false; public animationPaused: boolean = false;
public animationTime: number = 0; public animationTime: number = 0;
public disposed: boolean = false; public disposed: boolean = false;
@ -34,10 +34,9 @@ export class SkinViewer {
constructor(options) { constructor(options) {
this.domElement = options.domElement; this.domElement = options.domElement;
this.animation = options.animation || null; this.animation = options.animation || null;
this.detectModel = options.animation !== false; // true by default if (options.detectModel === false) {
this.animationPaused = false; this.detectModel = false;
this.animationTime = 0; }
this.disposed = false;
// texture // texture
this.skinImg = new Image(); this.skinImg = new Image();