New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: V3.1.2 - Tween.onStart fires immediately - as opposed to waiting for tweens delay. #3330
Comments
In the following how long should it wait before firing onStart?
The tween has started when it's not in a paused state as the timeline is active (progress is elapsing). The alternative is firing an |
In my opinion, it should start as soon as the first event is fired.
On Mon, Mar 5, 2018 at 12:24 PM Richard Davey ***@***.***> wrote:
In the following how long should it wait before firing onStart?
this.tweens.add({
targets: image,
x: { value: 700, duration: 4000, ease: 'Power2', delay: 500 },
y: { value: 400, duration: 1500, ease: 'Bounce.easeOut' },
scaleX: { value: 1.5, duration: 2000, delay: 2000, yoyo: true },
scaleY: { value: 4, duration: 2000, delay: function (i, total, target) { return 1000 + Math.random() * 2000 }, yoyo: true },
delay: 1000
});
The tween has started when it's not in a paused state as the timeline is
active (progress is elapsing).
The alternative is firing an onStart for every property, as they can each
start at different times, or possibly just the very first one to fire (but
then you could argue why did it pick that one as the progress was already
running, why not the last one to indicate the whole tween is now started).
This may be better served via a delayedPlay invocation.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3330 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJeqIuj9JcHD6LYCDyse4vMx6t6JyjFUks5tbXS9gaJpZM4ScjlB>
.
--
My regards,
Travis Oneal
|
If a developer needs stricter control over accessing a callback for
different stages of the tween; they can simply break the tween into
multiple tweens with their own “onStart” calls.
On Mon, Mar 5, 2018 at 2:46 PM Travis Oneal ***@***.***> wrote:
In my opinion, it should start as soon as the first event is fired.
On Mon, Mar 5, 2018 at 12:24 PM Richard Davey ***@***.***>
wrote:
> In the following how long should it wait before firing onStart?
>
> this.tweens.add({
>
> targets: image,
>
> x: { value: 700, duration: 4000, ease: 'Power2', delay: 500 },
>
> y: { value: 400, duration: 1500, ease: 'Bounce.easeOut' },
>
> scaleX: { value: 1.5, duration: 2000, delay: 2000, yoyo: true },
>
> scaleY: { value: 4, duration: 2000, delay: function (i, total, target) { return 1000 + Math.random() * 2000 }, yoyo: true },
>
> delay: 1000
>
> });
>
> The tween has started when it's not in a paused state as the timeline is
> active (progress is elapsing).
>
> The alternative is firing an onStart for every property, as they can
> each start at different times, or possibly just the very first one to fire
> (but then you could argue why did it pick that one as the progress was
> already running, why not the last one to indicate the whole tween is now
> started). This may be better served via a delayedPlay invocation.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#3330 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AJeqIuj9JcHD6LYCDyse4vMx6t6JyjFUks5tbXS9gaJpZM4ScjlB>
> .
>
--
My regards,
Travis Oneal
--
My regards,
Travis Oneal
|
We discussed it on the Slack today, and having I think the cleanest and most flexible solution could be to have Might also be interesting to consider adding a new event triggering a |
It will need a different callback to tell these two states apart. Half-way through building the Tween system I removed all the callbacks in favor of using events, but put them back. In hindsight, I should have left them out and kept it event based. Actually, it may still be worth making that change. The existing callbacks can be moved to be TweenData specific and nothing to do with the Tween itself. Because this issue isn't just related to |
Thank you for submitting this feature request. We have implemented this and the feature has been pushed to the |
This Issue is about
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: