leafer-ui icon indicating copy to clipboard operation
leafer-ui copied to clipboard

【bug】group中的虚线如果有动画,将该group与外部的一条虚线交集,外部的虚线交集部分也会有动画

Open yyyyh opened this issue 1 year ago • 2 comments

PixPin_2024-12-25_15-26-54 代码如下图 image

yyyyh avatar Dec 25 '24 07:12 yyyyh

谢谢反馈,请提供一个可以直接运行复现的示例代码~

leaferjs avatar Dec 25 '24 08:12 leaferjs

谢谢反馈,请提供一个可以直接运行复现的示例代码~

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)

yyyyh avatar Dec 25 '24 10:12 yyyyh