fix(drawable/lines): properly make cyclic point
This commit is contained in:
@@ -68,11 +68,9 @@ impl Lines {
|
|||||||
let first = data.points.first().unwrap();
|
let first = data.points.first().unwrap();
|
||||||
let last = data.points.last().unwrap();
|
let last = data.points.last().unwrap();
|
||||||
let connect_point = SkLinePoint {
|
let connect_point = SkLinePoint {
|
||||||
point: Vector3 {
|
point: transform_mat
|
||||||
x: (first.point.x + last.point.x) * 0.5,
|
.transform_point3a(Vec3A::from(first.point).lerp(Vec3A::from(last.point), 0.5))
|
||||||
y: (first.point.y + last.point.y) * 0.5,
|
.into(),
|
||||||
z: (first.point.z + last.point.z) * 0.5,
|
|
||||||
},
|
|
||||||
thickness: (first.thickness + last.thickness) * 0.5,
|
thickness: (first.thickness + last.thickness) * 0.5,
|
||||||
color: Color128::from(
|
color: Color128::from(
|
||||||
Rgba::from_slice(&first.color).lerp(&Rgba::from_slice(&last.color), 0.5),
|
Rgba::from_slice(&first.color).lerp(&Rgba::from_slice(&last.color), 0.5),
|
||||||
|
|||||||
Reference in New Issue
Block a user