Need a way to create offset for any polygon

Hello three js team ,

I am working on creating an offset means a polygon inside and outside on the basis of offset value (like 1 means one unit outside and -1 means one unit inside) for an given polygon in this fiddle i have the polygon now i need offset polygons
http://jsfiddle.net/42q7pst1/10/
i implemeted this feature before using this article

but some how in some cases when i have an large polygon it is not working fine :frowning_face:
Please help me to get this accomplish

@prisoner849 please can you do something to help me in this

Have you checked out ExtrudeGeometry? It takes a shape and extrudes, or offsets the points.

https://threejs.org/examples/#webgl_geometry_shapes

https://threejs.org/docs/#api/en/geometries/ExtrudeGeometry

1 Like