Extract doRender() so that subclasses can customize rendering
This commit is contained in:
parent
1bcd8b50b1
commit
f84f88251e
|
|
@ -111,10 +111,14 @@ export class SkinViewer {
|
|||
return;
|
||||
}
|
||||
this.animations.runAnimationLoop(this.playerObject);
|
||||
this.renderer.render(this.scene, this.camera);
|
||||
this.doRender();
|
||||
window.requestAnimationFrame(() => this.draw());
|
||||
}
|
||||
|
||||
protected doRender() {
|
||||
this.renderer.render(this.scene, this.camera);
|
||||
}
|
||||
|
||||
setSize(width: number, height: number) {
|
||||
this.camera.aspect = width / height;
|
||||
this.camera.updateProjectionMatrix();
|
||||
|
|
|
|||
Loading…
Reference in New Issue