-
Notifications
You must be signed in to change notification settings - Fork 26
[FEATURE] Moving camera #34
Comments
What is |
Hi Chau, PerspectiveCamera extends Camera extends Object3D Even if I update the camera position properties with a Vector3D I don't see the update on the scene. |
Ok, I found a way to do it. I updated my Initially, I want to use the This way :
I'll add greensock in my project to update smoothly the position. I you want I can create a simple new example in angular-three to show how to update camera position. |
Nice! Go for it. Check out the |
What do you think if I add greensock as a dependency to get animated things ? |
if you add it to the root package.json, it will be added as a dependency to the monorepo which is fine. Only the Now, the thing with greensock, I've been evaluating whether to use greensock or popmotion to support spring animation to Angular Three. Maybe you have better experience in this space than mine :D What do you think? We can make a new issue/discussion to discuss that piece |
Yes I plan to use it only in the |
Is your feature request related to a problem? Please describe.
I would like to move the camera. I tried several approaches but I didn't find the right way to do it.
Describe the solution you'd like
I tried to update the position value in the [camera] @input of the ngt-canvas without success.
I tried to create a like that :
<ngt-perspective-camera #camera='ngtPerspectiveCamera' [args]='[40]'>
and attach it to ngt-canvas like that :
[camera]='camera.camera'
And trying in my component to translateX(myValue) the camera thanks to @ViewChild reference, but it doesn't work neither.
I tried also to create a 'CameraControllerDirective' to get the camera thanks to NgtCanvasInputsStore. I can retrieve the camera, but the translateX(myValue) doesn't work too.
The text was updated successfully, but these errors were encountered: