eva-engine / eva.js

Eva.js is a front-end game engine specifically for creating interactive game projects.
https://eva.js.org
MIT License
1.75k stars 108 forks source link

feat: frame info & stop at last frame #151

Closed fanmingfei closed 2 years ago

fanmingfei commented 2 years ago

Please check if the PR fulfills these requirements

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:

fanmingfei commented 2 years ago

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

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