Skip to content

If an Animation instance is played more than once, the same promise is resolved each time leading to unexpected results. #774

@hamorphis

Description

@hamorphis

Since the finished promise of an Animation is one and the same during the life of the animation, the Animation cannot be properly played multiple times, i.e. the following code fails:

animation1.play().finished
    .then(function () { return animation1.play().finished; })
    .then(function () { return animation1.play().finished; })

We should make the play() method return a new Promise each time it is played.

In other words, there should be a new promise returned for each play invocation -- not one promise per Animation instance.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions