Animation 在bé上制作动画;带ScrollMagic的zier:初始状态=第一个bé;齐尔点
我正在沿着一条有3个点的bézier路径穿行Animation 在bé上制作动画;带ScrollMagic的zier:初始状态=第一个bé;齐尔点,animation,css-transitions,gsap,scrollmagic,Animation,Css Transitions,Gsap,Scrollmagic,我正在沿着一条有3个点的bézier路径穿行 // bezier data var bezierData = { curviness: 1, autoRotate: false, values: [ {x: 0, y: 0, rotation:"40_cw"}, /* <-- The desired state of the object before any animation has happened */ {x: 20, y: 0, rotation:
// bezier data
var bezierData = {
curviness: 1,
autoRotate: false,
values: [
{x: 0, y: 0, rotation:"40_cw"}, /* <-- The desired state of the object before any animation has happened */
{x: 20, y: 0, rotation:"0_ccw"},
{x: 40, y:0, rotation:"-20_ccw"}
]
};
// build tween
var tween = new TimelineMax()
.add(TweenMax.to("#testobj", 1, {css:{bezier: bezierData}, ease:Power1.easeInOut}));
// create scene
var scene = new ScrollMagic.Scene({
triggerElement: "#testobj",
duration: 100,
offset: 10
})
.setTween(tween)
.addTo(ctrl)
.addIndicators();
//贝塞尔数据
变量bezierData={
曲线度:1,
自动旋转:错误,
价值观:[
{x:0,y:0,旋转:“40_cw”},/*Tahir Ahmed的答案有效
也许您可以在执行.to()
tween?之类的操作之前使用.set()
在执行.to()
tween?之类的操作之前,您可能可以使用.set()
。完美!我将添加此作为解决方案。