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.

equivalent of app.controls.tween easing

Home Forums Programming equivalent of app.controls.tween easing

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33509
    thomasup
    Customer

    so we are moving a camera via app.controls.tween (copied from tweenCamera puzzle)

    but we want to match the camera movement with another animation, that runs at the same time, with the same easing applied.

    from tweenjs, both quadInOut and sineInOut seem to be a close match, but are still a bit different, and make it look a bit odd, because the camera temporarily leaps ahead / lacks behind.

    so it would be helpful to know what the easing function used in app.controls.tween is, so we can match it with our own animation.

    #33524

    Hi,

    in that puzzle, the camera is tweened by using linear or spherical interpolation.

    Anyway, you can possibly use this puzzle for both the camera tweening and your own animation.

    Chief 3D Verger | LinkedIn | Twitter

    #33611

    Hi,

    so it would be helpful to know what the easing function used in app.controls.tween is, so we can match it with our own animation.

    app.controls.tween uses the MathUtils.smootherstep function for tweening.

    Co-founder and lead developer at Soft8Soft.

    #33617
    thomasup
    Customer

    thank you for the answer, but we looked into the puzzle but no option was fully synchronized.

    after quite some digging in the minified v3d code i found out that
    v3d.MathUtils.smootherstep
    is applied to the linear camera transition progress.

    this helped me solve the issue, now both movements are in sync, by applying the smootherstep to the secondary animation too.

    Edit: it is now silky smoooth. nice!

    #33622
    thomasup
    Customer

    ah i found it out in the meantine, but thank you, Ivan!

    #33666

    :good:

    Chief 3D Verger | LinkedIn | Twitter

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