Skip to content

tentone/image-geometry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageGeometry

  • A simple 2D geometry generator for threejs.
  • Receives a image with alpha channel and calculated a mesh to fit that image.
  • Can be usefull for instancing shadowed 2D elements like fur or vegetation.

Example

Screenshot

alt tagalt tagalt tag

Algorithm

  • The algorithm goes through each horizontal line of the image.
  • The imagem is divided into region with a single entry and exit point.
  • Each region is triangulated using a zig-zag pattern.

Usage

var geometry = new ImageGeometry();
geometry.load("image.png", function(geometry)
{
	//DO SOMETHING
});

License

  • MIT License (Attached to the repository).

About

Triangulated image geometry generator from transparent images for three.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published