leafer-ui
leafer-ui copied to clipboard
【bug】group中的虚线如果有动画,将该group与外部的一条虚线交集,外部的虚线交集部分也会有动画
代码如下图
谢谢反馈,请提供一个可以直接运行复现的示例代码~
谢谢反馈,请提供一个可以直接运行复现的示例代码~
import { App, Group, Line } from 'leafer-editor'
import { Animate } from 'leafer-game';
const app = new App({
view: window,
// type:'draw',
editor: {} // 会自动创建 editor实例、tree层、sky层
})
const line=new Line({
points:[30,412,363,355],
stroke: 'red',
strokeWidth: 2,
dashPattern: [20, 10],
dashOffset: 0
})
const line1=new Line({
points:[30,412,363,355],
stroke: 'rgba(31, 103, 254, 0.5)',
strokeWidth: 10,
})
const group = new Group({ editable: true })
group.add(line1)
group.add(line)
app.tree.add(group)
const animate= new Animate(
line,
{ dashOffset: 150 }, // style keyframe
{
reverse: true,
easing: 'linear',
duration: 3,
loop: true,
}
);
const line2=new Line({
points:[130,512,463,355],
stroke: 'red',
strokeWidth: 2,
dashPattern: [10, 10],
editable: true
})
app.tree.add(line2)