We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

camera animation with javascript

Home Forums Programming camera animation with javascript

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29063
    Avatarjourney
    Licensee

    Hello
    I want to know in JavaScript code how to smoothly show animation from the current camera position to the camera position I want to set.

    appInstance.controls.tween(wPos,wTarget,1);
    If I had to write it like this, could I change the animation effect?

    Let me know if you don’t have enough explanation.
    because I’m not good at speaking English
    Thanks for the answer!! :bye:

    • This topic was modified 1 month, 3 weeks ago by Avatarjourney.
    #29612

    Hi,

    appInstance.controls.tween(wPos,wTarget,1);
    If I had to write it like this, could I change the animation effect?

    You can use the tween function, indeed, but unfortunately there’s no way currently to change how the animated value is interpolated. The animation effect that verge3d uses for camera tweening is ease-in-out and it looks like this:
    animation.png

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead developer at Soft8Soft.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.