troisjs / trois

✨ ThreeJS + VueJS 3 + ViteJS ⚡
https://troisjs.github.io
MIT License
4.19k stars 299 forks source link

How to use OrthographicCamera instead of PerspectiveCamera #200

Closed aalolexx closed 2 months ago

aalolexx commented 2 months ago

Hello Everyone,

I am trying to use the OrthographicCamera instead of the PerspectiveCamera. However, looking at the documentation, it seems that trois only supports the Perspective Camera. (see here).

I also tried to just add the OrthographicCamera per JS, but this doesn't seem to work since trois js searches for it's own camera object and returns an error.

Is there a way to use the OrtohographicCamera somehow?

Best regards and thanks in advance.

aalolexx commented 2 months ago

My Apologies. The camera actually exists and is usable by importing import { OrthographicCamera } from 'troisjs';

khaledOghli commented 2 months ago

I suggest to Go with tresjs instead of troisjs