1.0.0 • Published 9 years ago

three-decal-geometry v1.0.0

Weekly downloads
88
License
ISC
Repository
github
Last release
9 years ago

THREE.DecalGeometry.js

This object creates a decal geometry, intersecting a cube against a THREE.Geometry. Based on this article How to project decals. It interesects a cube against an arbitrary geometry and clips vertex coordinates and normals.

Image

Demo is here: Decal Splatter.

How to use

Include the library:

Instantiate a geometry passing:

and create a mesh using that geometry, as usual:

The decal material can be any material, just make sure to have this attributes enabled:

License

MIT licensed

Copyright (C) 2014 Jaume Sanchez Elias http://twitter.com/thespite Lee Perry Smith's head model and textures by Infinite Realities

http://www.clicktorelease.com