Skip to content

voxel/voxel-decals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voxel-decals

Adds textured planes on the side of blocks (voxel.js plugin)

screenshot

Example above is from voxel-mine, using a transparent texture decal for block break progress.

Requires voxel-mesher, voxel-stitch, voxel-stitch.

API

  • add({position: [x,y,z], normal: [x,y,z], texture: name}): adds a new decal at the given voxel position, on the face specified by the normal. All sides are supported:

screenshot

The texture name should be loaded into voxel-stitch, using preloadTexture() if needed.

  • change({position: [x,y,z], normal: [x,y,z], texture: texture}): same as add() but calls remove() first

  • remove({position: [x,y,z], normal: [x,y,z]}): removes the decal at the given location

License

MIT

About

add textured planes to block faces (voxel.js plugin)

Resources

License

Stars

Watchers

Forks

Packages

No packages published