Globe: Check for renderer on resize
This commit is contained in:
@@ -261,6 +261,7 @@ export class Globe {
|
|||||||
* Resize method
|
* Resize method
|
||||||
*/
|
*/
|
||||||
resize () {
|
resize () {
|
||||||
|
if (this.renderer) {
|
||||||
this.width = this.el.offsetWidth
|
this.width = this.el.offsetWidth
|
||||||
this.height = this.el.offsetHeight
|
this.height = this.el.offsetHeight
|
||||||
this.renderer.setSize(this.width, this.height)
|
this.renderer.setSize(this.width, this.height)
|
||||||
@@ -268,6 +269,7 @@ export class Globe {
|
|||||||
aspect: this.gl.canvas.width / this.gl.canvas.height
|
aspect: this.gl.canvas.width / this.gl.canvas.height
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user