Log inGet started
Package

meshStore.module

README.md

meshStore

Holds a ZeroBlender document's polygon meshes in substrate (engine) memory between calls.

A mesh record's geometry (positions, face corners, face offsets, per-face material, UV layers) is packed into substrate columns. Reading vertices, faces, uv, uv_layers or face_mat unpacks that one mesh for the call that needs it, and M.pack puts it back and drops the tables. A document at rest therefore holds no per-vertex Luau tables.

local MeshStore = require("~ZeroBlender.modules.meshStore")
MeshStore.pack(mesh, uvSync)        -- geometry -> substrate, tables dropped
print(MeshStore.faceCount(mesh))    -- answered without unpacking
local fs = mesh.faces               -- unpacks this mesh on first read