We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在 HTML 中,对元素执行动画时,会自动合并动画对象,例如执行下面的动画逻辑后,实际上 div.getAnimations() 中之存在一个动画对象,因为这两个动画被合并了。
div.getAnimations()
await div.animate( [ { width: '100px', height: '100px' }, { width: '300px', height: '300px' }, ], { duration: 1000, fill: 'both', } ).finished; await div.animate([ { width: '200px', height: '100px', background: 'green' }, { width: '300px', height: '300px', background: 'pink' }, ], { duration: 1000, fill: 'both' }).finished;
但在 G 中,会分别创建两个动画对象。当创建动画数较多时,activeAnimations 会不断增长,导致内存溢出
activeAnimations
理论上应该需要在 packages/g-web-animations-api/src/dom/AnimationTimeline.ts play 方法中执行优化,对动画对象进行增量更新
packages/g-web-animations-api/src/dom/AnimationTimeline.ts
play
The text was updated successfully, but these errors were encountered:
同时 canvas.document?.timeline?.animationsWithPromises 中持有的动画对象也无法及时得到释放
canvas.document?.timeline?.animationsWithPromises
Sorry, something went wrong.
No branches or pull requests
在 HTML 中,对元素执行动画时,会自动合并动画对象,例如执行下面的动画逻辑后,实际上
div.getAnimations()
中之存在一个动画对象,因为这两个动画被合并了。但在 G 中,会分别创建两个动画对象。当创建动画数较多时,
activeAnimations
会不断增长,导致内存溢出理论上应该需要在
packages/g-web-animations-api/src/dom/AnimationTimeline.ts
play
方法中执行优化,对动画对象进行增量更新The text was updated successfully, but these errors were encountered: