(poly)
| 415 | } |
| 416 | |
| 417 | function 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`. |
no test coverage detected