Module modlib.read_b3d

[[parse .b3d files into a lua table

Functions

read_from_stream (stream, ignore_chunks) read directly from file

Tables

ignore_chunks an unordered list of the following string chunks.

Fields

node_paths b3d table


Functions

read_from_stream (stream, ignore_chunks)
read directly from file

Parameters:

  • stream the file object (from the io library) to read from. Make sure you open it as "rb" (read binary.)
  • ignore_chunks a list of chunks to be ignored (documentation needed)

Returns:

    b3d table (documentation needed!)

Tables

ignore_chunks
an unordered list of the following string chunks. "NODE" and "BB3D" are ommitted as they are not allowed.

Fields:

  • 1 "TEXS" texture information
  • 2 "BRUS" brushes (materials)
  • 3 "MESH" (sub-chunks of "MESH" include "VERTS" & "TRIS")
  • 4 "TRIS" sets of triangles
  • 5 "VRTS" vertices
  • 6 "BONE" node vertex weights
  • 7 "ANIM" animation information
  • 8 "KEYS" keyframes

Fields

node_paths
b3d table
  • node_paths
generated by LDoc 1.5.0 Last updated 2024-01-06 20:39:53