Builtin Library
README.md
gaussianSplats
The entity-id-keyed registry of live Gaussian splat clouds — the seam between
GaussianSplat.component (which declares what to render) and the
gaussianSplats render feature (which owns every GPU buffer and runs the
per-frame depth sort).
A plain table: no GPU state, no frame coupling.
Exports
M.set(id, entry)— register or update an entity's cloud. Changingsourceorconventionbumps the entry's generation, which makes the render feature drop its buffers and decode again.M.clear(id)— drop an entity's cloud, along with the placement recorded for it.M.entries()— the live registry, keyed by entity id.M.get(id)— one entity's entry, or nil.M.setVelocity(enabled)/M.velocity()— whether a moving cloud writes its screen-space displacement into the frame's velocity buffer.M.recordPlacement(id, matrix)— the render feature records the placement it culled and drew a cloud at, as 16 column-major numbers. The numbers are copied in.M.placement(id)— that placement, translation in elements 13, 14, 15, as a fresh table each call. Nil on a frame the feature did not draw the cloud, and once the cloud has left the registry.
Types:
SplatEntry—{ source, convention, opacity, size, buckets, near, far, visible, generation }.
Usage
local registry = require("@builtin::systems.gaussianSplats.gaussianSplats")
for id, entry in pairs(registry.entries()) do
print(id, entry.source, entry.visible)
end