Showing off some custom geometries

I have created a few custom geometries for a project. I’d love feedback on if they are useful to the community at large.
Beakerboy/Threejs-Geometries (

One is a combination of ExtrudeGeometry and ConeGeometry. It extrudes an arbitrary shape to a point.
One takes and arbitrary shape and extrudes up as a ramp, so from above it looks like the shape, but from the side it is a right triangle.
The last takes an arbitrary shape and again extrudes up, but from the side it would be an arbitrary triangle.

the most interesting subroutine in here is a function to split a shape by a line. It takes a shape as an input, and returns an array of shapes as output. The first array element is the original shape with added points on the outside for the crossing line, the next elements are all the pieces. this allows me to take a shape, and essentially crack it along a line to make the wedge with a defined ridge-line.

1 Like