Tresjs / lab

Showcase and examples lab for TresJS

Home Page:https://lab.tresjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TresPerspectiveCamera: aspect not work?

Randysheng opened this issue · comments

<TresCanvas clear-color="#000000">
   <TresPerspectiveCamera
     :position="[0, 0, 5000]"
     :fov="50"
     :aspect="1"
     :near="1"
     :far="10000"
   />
  <TresScene>
     <TresPoints>
       <TresBufferGeometry :position="[vertices, 3]" />
       <TresPointsMaterial :color="0x888888" />
     </TresPoints>
   </TresScene>
</TresCanvas>

No matter how i change aspect, for exampe 0.5 or 2, there is no change in view.

aspect = 0.5
image

aspect = 1
image

aspect = 2
image

Maybe i miss something?

aspect on the camera is only meant for setting the initial aspectRatio, internal code will automatically adapt it to the ratio between the container or window width/height