Skip to content

Commit

Permalink
Added vOBJ chunk
Browse files Browse the repository at this point in the history
Changed DICT_STRING to String(bufferSize)
Show DICT_ITEM as "key: value"
Show numVoxels for XYZI chunk
  • Loading branch information
FlayaN committed Jun 14, 2018
1 parent 41998a2 commit eba8c20
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vox.hm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class SIZE as Chunk("SIZE")
class XYZI as Chunk("XYZI")
{
int(32) numVoxels;
@value = "numVoxels: "+%str(numVoxels);
VOXEL voxels[numVoxels];
}

Expand Down Expand Up @@ -115,12 +116,13 @@ class DICT_ITEM
{
DICT_STRING key;
DICT_STRING value;
@value = key.buffer+": "+value.buffer;
}

class DICT_STRING
{
int(32) bufferSize;
byte buffer[bufferSize];
String(bufferSize) buffer;
}

class MATERIAL_V2(id) as Chunk("MATL")
Expand All @@ -138,4 +140,9 @@ class MATERIAL_V1(id) as Chunk("MATT")
float(32) materialWeight;
int(32) propertyBits;
float(32) propertiesNormalized;
}

class rOBJ(id) as Chunk("rOBJ")
{
DICT properties;
}

0 comments on commit eba8c20

Please sign in to comment.