Log inGet started

streaming

The streaming namespace — the engine's Luau API reference for streaming.

The streaming namespace — 7 functions.

globals/streaming/cells

streaming.cells() -> { [string]: any }

What the spatial-streaming store has resident: the configured radii and budget, the counters the store keeps, and one row per cell with how many of its groups are standing, what it costs, and whether a release wrote it to a file it now reads back from.

Returns { [string]: any }{ config, stats, sources, cells, proxies }.

local s = streaming.cells()

globals/streaming/levels

streaming.levels(scene: any?) -> { [string]: any }

Which level every mesh-LOD receiver is drawing at, and the screen fraction that selection was measured from. A receiver whose entity the scene no longer holds is reported as standing = false: the chain is registered and there is nothing left for it to draw.

Parameters

  • scene any (optional) — The scene walk to read against. Omitted, the call takes its own.

Returns { [string]: any }{ count, receivers }.

local l = streaming.levels()

globals/streaming/observe

streaming.observe() -> { [string]: any }

The whole reading in one document: terrain, voxel, streaming cells and mesh LOD, plus the totals those rows sum to.

Built by this call and published as its last act, so /zero/runtime/observations/streaming serves the same document rather than a second derivation of it.

Returns { [string]: any }{ terrain, voxel, cells, levels, totals }.

local r = streaming.observe()

globals/streaming/reasons

streaming.reasons() -> { string }

Every reason whyNotDrawn can answer with, so a caller can enumerate the set rather than meeting it one failure at a time.

Returns { string } — Sorted array of reason names.

local r = streaming.reasons()

globals/streaming/terrain

streaming.terrain(scene: any?) -> { [string]: any }

What each terrain entity is drawing: whether a heightfield is bound to it, the LOD cut it settled on, what that cut costs in indices and in the vertex pool, and the eye the cut was refined under.

Parameters

  • scene any (optional) — The scene walk to read against. Omitted, the call takes its own, which is what makes a whole reading one walk rather than four.

Returns { [string]: any }{ count, entities } — one row per entity carrying a Terrain.

local t = streaming.terrain()

globals/streaming/voxel

streaming.voxel(scene: any?) -> { [string]: any }

What became of every chunk of every voxel world: how many are meshed, queued, failed or empty, and one row per chunk carrying the state, the engine's reason when a build failed, and what the build reserved on the device.

Parameters

  • scene any (optional) — The scene walk to read against. Omitted, the call takes its own.

Returns { [string]: any }{ count, worlds } — one entry per entity carrying a VoxelWorld.

local v = streaming.voxel()

globals/streaming/whyNotDrawn

streaming.whyNotDrawn(subject: any?) -> { [string]: any }

Why a piece of a world's detail is not on screen, as one reason from the closed set streaming.reasons() enumerates, with a detail line naming what that reason is about.

The subject picks which system answers:

  • an entity ref, id or name — whichever of the four systems holds it
  • { entity = ..., chunk = "cx_cy_cz" } — one chunk of a voxel world
  • { entity = ..., level = n } — one level of a mesh-LOD chain
  • { cell = "x_z" } — one cell of the spatial-streaming store

Parameters

  • subject any (optional) — The entity, chunk, level or cell to answer about.

Returns { [string]: any }{ kind, reason, detail }.

local w = streaming.whyNotDrawn({ entity = "Vox", chunk = "0_0_0" })
  • api
  • reference