donmccurdy / three-gltf-viewer

Drag-and-drop preview for glTF 2.0 models in WebGL using three.js.
https://gltf-viewer.donmccurdy.com/
MIT License
2.09k stars 534 forks source link

imported camera aspect set #317

Closed Suprhimp closed 1 year ago

Suprhimp commented 1 year ago

Hi!

I found that the imported camera from the uploaded model has wrong camera aspect.

So, I think it will be better to add some setting that adjust camera aspect to imported camera.

I changed this below.

update for Imported camera view

add code in setCamera for active camera aspect set

change code in resize function to adjust window resize

Thanks!