我尝试使用以下代码添加插件
import { Tween, Ease } from '@createjs/tweenjs';
import MotionGuidePlugin from '@createjs/tweenjs/src/plugins/MotionGuidePlugin';
const tween = Tween.get(this.mySprite, { override: true, pluginData: 'MotionGuide' })
它不能正常工作。
发布于 2018-12-17 16:24:44
我没看到你的动作向导数据。您查看过demos in GitHub吗?
确保将插件安装一次
createjs.MotionGuidePlugin.install(createjs.Tween);
然后将运动导向数据传递到补间中:
createjs.Tween.get(ball, {bounce: true, loop:3})
.to({guide: {path: [100,100, 700,100, 800,250], orient: "fixed"}}, 2000);
以下是CodePen上的其他几个演示:
如果您有特定的问题,或可以链接到的演示,请更新您的问题,我可以尝试回答它。
https://stackoverflow.com/questions/53814768
复制相似问题