Closed lucasdamianjohnson closed 2 years ago
List of things that I will need to update the wiki for. Will also have to update the wiki for 1.1.
So, I changed the voxel data type definition. It is now:
type VoxelData = {
name: string;
shapeId: string;
id: string;
substance: VoxelSubstanceType;
physics?: {
boundingBoxId: string;
checkCollisions: boolean;
};
states?: string[];
lightSource?: boolean;
lightValue?: number;
};
This is a breaking change from other versions. But now voxel states actually work. So, when you add a state to the states array it will be passed to the voxel process
function so you can do different things with it.
Also realized that the defaultState
literally did nothing so I just removed it.
The voxel process data has changed.
export type VoxelProcessData = {
exposedFaces: number[];
faceStates: number[];
textureRotations: Rotations[];
voxelData: number;
voxelState: string;
voxelShapeState : number;
uvTemplate: number[];
overlayUVTemplate: number[];
colorTemplate: number[];
lightTemplate: number[];
aoTemplate: number[];
chunkX: number;
chunkY: number;
chunkZ: number;
x: number;
y: number;
z: number;
};
paintVoxel
is now:
paintVoxel(
voxelId: string,
voxelStateId: string,
shapeState : number,
x: number,
y: number,
z: number
) {
}
And requestVoxelAdd is now:
async requestVoxelAdd(
voxelId: string,
voxelStateId: string,
shapeState : number,
x: number,
y: number,
z: number
) {
}
Added a shape state param to each.
VoxelData
type. onReady
from initData for DVEC
, DVEW
, DVEM
, and DVED
. getData
function for both WorldData
and WorldMatrx
for getting voxel state data.getVoxelShapeState
to WorldMatrix
. WorldData
getVoxel
function to return the voxel shape state id as the third item in the array. process
function the voxelShapeStateTemplate
was replaced with voxelShapeState
which is just the number. So, you can't change it in the voxel process function
. VoxelBuilderThreadObject
to VoxelConstructorObject
. Alpha 1.2 is out now.
ShapeBuilder
to have more options and transform vectors for creating many different types of shapes.WorldMatrix
.physics
property for voxels.