mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 19:13:49 +01:00
formatting
This commit is contained in:
parent
b42c7829ca
commit
a4a5afeb08
@ -65,7 +65,7 @@ function shapeToPointsRaw(shapeData) {
|
|||||||
const points = [];
|
const points = [];
|
||||||
let even = false;
|
let even = false;
|
||||||
const numLines = rays * 2;
|
const numLines = rays * 2;
|
||||||
for (let i = 0, rad = 0; i <= numLines; i++, rad += Math.PI / rays) {
|
for (let i = 0, rad = 0; i <= numLines; i ++, rad += Math.PI / rays, even = !even) {
|
||||||
if (i === numLines) { // last line?
|
if (i === numLines) { // last line?
|
||||||
points.push(points[0].clone()); // go to first point
|
points.push(points[0].clone()); // go to first point
|
||||||
} else {
|
} else {
|
||||||
@ -73,7 +73,6 @@ function shapeToPointsRaw(shapeData) {
|
|||||||
let x = Math.sin(rad) * radius;
|
let x = Math.sin(rad) * radius;
|
||||||
let y = -Math.cos(rad) * radius;
|
let y = -Math.cos(rad) * radius;
|
||||||
points.push(new Vector(x, y));
|
points.push(new Vector(x, y));
|
||||||
even = !even;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
shapes.push({ points, holes: [] });
|
shapes.push({ points, holes: [] });
|
||||||
|
Loading…
Reference in New Issue
Block a user