Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TresPerspectiveCamera: aspect not work? #3

Closed
Randysheng opened this issue Feb 16, 2023 · 1 comment
Closed

TresPerspectiveCamera: aspect not work? #3

Randysheng opened this issue Feb 16, 2023 · 1 comment

Comments

@Randysheng
Copy link

<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?

@alvarosabu
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants