VoxelData
Client
Server
Component that holds voxel data. The actual data itself is in the data
property.
The data will only render if the object also has a VoxelRender
component.
Constructors
VoxelData()
Methods
nil Mirror(Vec3, Vec3)
Vec3, Vec3 GetAABounds()
Vec3, Quat, Vec3 GetBounds()
boolean, string SetPath(string)
nil SetPathAsync(string, userdata)
Async version of SetPath. Function returns immediately and voxel data loading is performed on background. After it finishes (or fails), supplied callback is called. Callback has parameters bool success
and string errStr
.
If load is already running when new SetPathAsync is called, the new load is queued and performed after the current one finishes (SetPathAsync still exists immediatelly). In the future we may have more advanced strategy for handling concurrent loads.
Metamethods
boolean __eq(VoxelData, VoxelData)
Properties
boolean copyOnWrite
make local copy of voxel data resource if edited
Object object
boolean isDestroyed
string type
boolean Active
boolean ActiveInHierarchy
Object Object
boolean IsDestroyed
string Type
Vec3 Size
string path
string originalPath
VoxelDataResource data
The voxel data resource that this voxel data is using