手机上H5使用PAGView 和 PAGComposition 想连接播放2个动画中间会闪烁,浏览器不会 #3120
Replies: 1 comment 1 reply
-
|
直接在上个帖子上回复,不用重新新建 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
环境】:H5页面,手机上
【问题描述】:此时页面一个单独的全屏弹窗动画,这个动画是由一段一次性动画拼接上后半段循环动画(开奖全屏动画)。使用的是创建一个空的 PAGComposition 的,然后将两个 pag 文件添加进去,通过 setStartTime 设置第二个 pag 文件的真实播放时间衔接在第一个结束后
【询问】
1、我是用该方法两个资源衔接处会卡顿闪烁,我不确定是代码原因还是资源导出的原因
2、如果顺利的情况下,我想要这个衔接动画播放完之后一直重新循环第二个资源的播放,应该怎么处理是最好的也不会闪烁呢?
【大致代码】
const composition = pagObj.PAGComposition.make(
firstPagFile.width(),
firstPagFile.height()
)
composition.addLayer(firstPagFile)
composition.addLayer(secondPagFile)
firstPagFile.setStartTime(0)
secondPagFile.setStartTime(firstPagFile.duration());
this.pagView = await pagObj.PAGView.init(composition, canvas, {
renderingMode: "WebGL"
})
Uploading 2025-12.zip…
Beta Was this translation helpful? Give feedback.
All reactions