const node = this.scene.createElement(xrFrameSystem.XRMesh, {
castShadow: true,
position: "0 0 2",
"anim-keyframe": "anim",
"anim-autoplay": "clip:cube,speed:2",
geometry:"cube",
uniforms: "u_baseColorFactor:0.8 0.4 0.4 1",
scale: "0.1 0.1 0.1",
animStop: this.nbnb,
id: `ids${fromWhat}`
});
this.shadowRoot.addChild(node)
目前使用js动态创建xr组件动画无法自动播放,是哪里写错了吗,同样的属性在wxml上是能自动播放的。
搞个小程序代码片段工程发来看看,资源不全查不了。