Skip to content
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

feat: frame info & stop at last frame #151

Merged
merged 2 commits into from
Nov 23, 2021
Merged

feat: frame info & stop at last frame #151

merged 2 commits into from
Nov 23, 2021

Conversation

fanmingfei
Copy link
Member

  • feat: frame info & stop at last frame

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

- feat: stop at last frame
@fanmingfei fanmingfei changed the title - feat: frame info & stop at last frame feat: frame info & stop at last frame Nov 2, 2021
Copy link
Member

@terrykingcha terrykingcha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api有点奇怪。而且在实现中,还强制更改loop属性。是否可以如下设计
new SpriteAnimation({
loop: false,
times: 1, // 2, 3 都可以
forwards: true // 参考css的动画animation的forwards
})

@fanmingfei
Copy link
Member Author

api有点奇怪。而且在实现中,还强制更改loop属性。是否可以如下设计 new SpriteAnimation({ loop: false, times: 1, // 2, 3 都可以 forwards: true // 参考css的动画animation的forwards })

控制播放次数还是在play的时候控制,这个API先不要变化。forwards已修改

@fanmingfei fanmingfei merged commit e3fd4d6 into dev Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

帧动画播放完后,又重现回到了第一帧。预期能够停在最后一帧。
2 participants