mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
fix eslint no inner loop functions issue
This commit is contained in:
parent
26c4ea218b
commit
359ef50587
1 changed files with 10 additions and 10 deletions
|
|
@ -52,12 +52,6 @@ export function surfaceAndPolygonsToGeom(surface, polygons) {
|
||||||
|
|
||||||
const isPlane = surface.simpleSurface && surface.simpleSurface.isPlane;
|
const isPlane = surface.simpleSurface && surface.simpleSurface.isPlane;
|
||||||
let planeNormal = isPlane ? surface.normalInMiddle().data() : null;
|
let planeNormal = isPlane ? surface.normalInMiddle().data() : null;
|
||||||
for (let p = 0; p < polygons.length; ++p) {
|
|
||||||
const off = vertices.length / 3;
|
|
||||||
const poly = polygons[p];
|
|
||||||
const vLength = poly.length;
|
|
||||||
if (vLength < 3) continue;
|
|
||||||
|
|
||||||
function pushVertex(vtx) {
|
function pushVertex(vtx) {
|
||||||
vertices.push(vtx.x, vtx.y, vtx.z);
|
vertices.push(vtx.x, vtx.y, vtx.z);
|
||||||
if (!isPlane) {
|
if (!isPlane) {
|
||||||
|
|
@ -68,6 +62,12 @@ export function surfaceAndPolygonsToGeom(surface, polygons) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
for (let p = 0; p < polygons.length; ++p) {
|
||||||
|
const off = vertices.length / 3;
|
||||||
|
const poly = polygons[p];
|
||||||
|
const vLength = poly.length;
|
||||||
|
if (vLength < 3) continue;
|
||||||
|
|
||||||
const firstVertex = poly[0];
|
const firstVertex = poly[0];
|
||||||
|
|
||||||
pushVertex(firstVertex)
|
pushVertex(firstVertex)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue