I am trying to make it so my renderer will correctly change size whenever the screen changes size.
I tried the following: https://subscription.packtpub.com/book/web-development/9781784392215/1/ch01lvl1sec15/automatically-resize-the-output-when-browser-size-changes
But this code doesn’t work anymore due to version changes.
I tried using:
...
window.addEventListener("resize", this._onResize);
}
_onResize() {
this._renderer.setSize(window.innerWidth, window.innerHeight);
this._camera.updateProjectionMatrix();
}
but setSize is not a function.