MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / computePolyMiddle

Function computePolyMiddle

assets/js/block_ninja.js:417–423  ·  view source on GitHub ↗
(poly)

Source from the content-addressed store, hash-verified

415}
416
417function computePolyMiddle(poly) {
418 if (poly.vertices.length === 3) {
419 computeTriMiddle(poly);
420 } else {
421 computeQuadMiddle(poly);
422 }
423}
424
425// Compute distance from any polygon (tri or quad) midpoint to camera.
426// Sets `depth` property of given `poly`.

Callers 1

computePolyDepthFunction · 0.85

Calls 2

computeTriMiddleFunction · 0.85
computeQuadMiddleFunction · 0.85

Tested by

no test coverage detected