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
filePath: zh/animation/animation-component.md content:
//程序化编辑动画剪辑 this.animationClip = new AnimationClip(); const track = new animation.ObjectTrack(); //使用对象轨道
track.path = new animation.TrackPath().toComponent(Sprite).toProperty('spriteFrame'); //找sprite组件,找对应spriteFrame属性 //这种切分方式,map?? //对象轨道只有一条动画曲线,[时间,变化属性] const frames:Array<[number, SpriteFrame]> = spriteFrames.map((item:SpriteFrame, index:number)=>[ANIMATION_SPEED*index, item]); //影分身是因为把外层的idle也加载进去了,这里去掉 const subframes = frames.slice(0, frames.length); track.channel.curve.assignSorted(subframes); //track.channel.curve.assignSorted(frames); //轨道添加到动画剪辑以应用 this.animationClip.addTrack(track); this.animationClip.name = this.path; this.animationClip.duration = frames.length * ANIMATION_SPEED; this.animationClip.wrapMode = this.wrapMode; for(const event of this.events){ this.animationClip.events.push(event); } //this.animationClip.updateEventDatas();
参照文档使用这样方式添加事件帧不会被触发,使用3.3弃用的updateEventDatas才能保证运行过程中触发帧事件,这是操作问题还是其它问题
The text was updated successfully, but these errors were encountered:
Hello,先发到论坛讨论吧。
Sorry, something went wrong.
No branches or pull requests
filePath: zh/animation/animation-component.md
content:
//程序化编辑动画剪辑
this.animationClip = new AnimationClip();
const track = new animation.ObjectTrack(); //使用对象轨道
参照文档使用这样方式添加事件帧不会被触发,使用3.3弃用的updateEventDatas才能保证运行过程中触发帧事件,这是操作问题还是其它问题
The text was updated successfully, but these errors were encountered: