destructure arcs for animate
This commit is contained in:
parent
07002f8c70
commit
425f8eb6d4
1 changed files with 15 additions and 0 deletions
|
|
@ -350,6 +350,21 @@ kiri.load(() => {
|
||||||
stock = settings.stock;
|
stock = settings.stock;
|
||||||
rez = 1/Math.sqrt(density/(stock.x * stock.y));
|
rez = 1/Math.sqrt(density/(stock.x * stock.y));
|
||||||
|
|
||||||
|
|
||||||
|
//destructure arcs into path points
|
||||||
|
path = path.map(o=>
|
||||||
|
o.arcPoints
|
||||||
|
? o.arcPoints.map(point=>
|
||||||
|
({
|
||||||
|
...o,
|
||||||
|
point
|
||||||
|
})
|
||||||
|
)
|
||||||
|
: o
|
||||||
|
)
|
||||||
|
.flat();
|
||||||
|
|
||||||
|
|
||||||
const step = rez;
|
const step = rez;
|
||||||
const stepsX = Math.floor(stock.x / step);
|
const stepsX = Math.floor(stock.x / step);
|
||||||
const stepsY = Math.floor(stock.y / step);
|
const stepsY = Math.floor(stock.y / step);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue