PrivateroomPrivatecapturePrivatebakedPrivatehdriPrivatehdriPrivateconfigPrivatebakedPrivateruntimePrivatecapturePrivatewantedPrivateactivePrivatestaleHow many live captures have run (a diagnostic the tests and the bake read).
Private ReadonlydepsWhether an environment has been built and assigned.
What the scene is currently lit by.
The authored config in force (the default when the scene authored none).
Whether a valid baked map is attached (it wins over config.source).
Set the authored config (viewer_config.environment, validated by the zarr bridge).
null restores the default. Re-applies immediately if a physical material already
asked for light; otherwise it just waits for ensure().
Clear dataset-owned state while preserving runtime wiring and the reusable room PMREM.
Attach (or clear) a baked map. A valid map takes precedence over any source.
Give the environment what a live capture needs (the init pipeline does this once).
A physical material now exists: make sure the scene is lit.
Idempotent — every call after the first that changes nothing returns false.
Synchronous for the room and a live capture, so a physical mesh created this
frame is lit on its first draw.
true when this call built or replaced the environment.
Something the capture depends on changed (a commit, a slice, an appearance edit).
Only meaningful while lit by a live scene capture; the next tick after
the debounce, with the loader settled, re-captures.
Per-frame hook (the init pipeline registers it). Re-captures a stale live environment once the debounce has passed and the loader is settled. Returns whether a capture ran.
Run one exact capture of the scene from the configured (or given) probe and make
it the environment. Returns null without a runtime. Also the bake's entry point:
the returned target is what bake.ts reads the six faces back from.
Optionaloverride: { probe?: EnvironmentProbe; resolution?: number }Rebuild previously-created GPU resources after the renderer context is restored.
Release everything and clear scene.environment if it is ours.
PrivateapplyApply the precedence rule for the current state. Returns whether anything changed.
PrivatecapturePrivateapplyPrivateapplyPrivatestartPrivateapplyPrivaterelease
Set by the first
ensure()— a physical material exists, so the scene needs light.