Skip to content

Feature-suggestion: a dynamic to/target would be a nice addition to the API #43

@MacSlow

Description

@MacSlow

Greetings everybody!

Just today I started playing around with tweeny to get a feel for its API. While doing so I was wondering how I can alter a currently running tween (or rather the current to-value) to have it 'chase' a target-value... kind of a 'moving to'-value.

So far I could not achieve such a behavior with the existing API. Looking through the code I could also not see any existing infrastructure to update an already supplied to-value.

These examples here - using Tween.js - are a good demonstrations of the concept:

As long as a tween is still in progress interpolating from 'from' to 'to' an additional method (e.g. .updateTo(newValue)) should be provided to update the current 'to'-value, thus affecting the interpolation-steps aiming for the new value. With the template-magic of tweeny this would then also apply to non-scalar and heterogeneous values.

Best regards...

MacSlow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions