rezoner / playground

Playground.js is a framework for your javascript based games. It gives you out-of-box access to essentials like mouse, keyboard, sound and well designed architecture that you can expand to your needs.
MIT License
459 stars 50 forks source link

Window Resize function doesn't adjust THREE.camera aspect #53

Open jpryne opened 7 years ago

jpryne commented 7 years ago

I've solved this by changing the resize function to:

` resize: function() {

    /* update renderer size on window resize */

    this.renderer.setSize(this.width, this.height);
    if( ENGINE.Game.camera) {
        ENGINE.Game.camera.aspect = this.width / this.height;
        ENGINE.Game.camera.updateProjectionMatrix();
    }

},`

-but this is more of a workaround.