VoxelBlockyLibrary¶
Inherits: VoxelBlockyLibraryBase
Contains a list of models that can be used by VoxelMesherBlocky.
Description:¶
Provides a list of models that can be used by VoxelMesherBlocky. Each model corresponds to an ID in voxel data, and is generally defined from a mesh. Some extra properties can also be defined, such as how sides get culled by neighbor voxels, or how it is treated by some functionality of the voxel engine.
If you create this library from code, it needs to be baked at the end using the VoxelBlockyLibraryBase.bake function.
The first model (at index 0) is conventionally used for "air" or "empty".
Properties:¶
| Type | Name | Default |
|---|---|---|
| VoxelBlockyModel[] | models | [] |
Methods:¶
| Return | Signature |
|---|---|
| int | add_model ( VoxelBlockyModel model ) |
| VoxelBlockyModel | get_model ( int index ) const |
| int | get_model_index_from_resource_name ( String name ) const |
Property Descriptions¶
VoxelBlockyModel[] models = []¶
Array of all the models. The index of each model corresponds to the value representing them in voxel data's TYPE channel.
Method Descriptions¶
int add_model( VoxelBlockyModel model )¶
Adds a model to the library. Returns its index, which will be the value of voxels representing it.
VoxelBlockyModel get_model( int index )¶
Gets a model from its index.
int get_model_index_from_resource_name( String name )¶
Finds the index of the first model having the specified resource name. If not found, returns null.
Generated on Jan 26, 2026