Function animate(opt?: AnimateCompOpt): AnimateComp A component to animate properties.param opt- Options for the animate component. See let movingBean = add([ sprite("bean"), pos(50, 150), anchor("center"), animate(), ]); // Moving right to left using ping-pong movingBean.animate("pos", [vec2(50, 150), vec2(150, 150)], { duration: 2, direction: "ping-pong", }); returns The animate comp.since v3001.0group Components