formatting

This commit is contained in:
casperlamboo 2018-01-09 15:42:30 +01:00
parent b42c7829ca
commit a4a5afeb08

View File

@ -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: [] });