OptionalcoalesceOptionalgenerateOptionalgetWhen supplied, scene.applyOps(ops, label) consults this on every call.
If it returns a non-null Journal, ops are routed to the journal's
applyBatch instead of recording a new parent-history entry. The journal
drives adapter mutation internally (via op.apply(adapter)), so the
scene state changes as normal; only the history tracking differs.
The accessor is called on every applyOps invocation so the caller can
swap the active journal in and out by updating the closure's reference
(e.g., an app's mode machine holds let activeJournal: Journal | null
and the accessor reads that variable).
When the accessor isn't known at scene-construction time (typical for
mode machines that depend on scene.history), pass nothing here and
wire it after construction via scene.setActiveJournalAccessor(fn).
OptionalhistoryOptionalinitialOptionalopsOptionalregistryPer-scene registry for non-serializable function fields (clipFromPose, etc.). Required only when serializing/deserializing scenes that use function fields.
Window (ms) within which consecutive same-shaped mutations merge into the previous undo entry (matching per-op coalesce keys — e.g. repeated
setPoseon the same node, or repeatedapplyBatchcalls whose ops carry matchingcoalesceKeymultisets).0(default) disables coalescing: every mutation is a discrete undo entry. Undo of a coalesced entry returns to the state before the first merged mutation; redo restores the latest.scene.batchentries never coalesce.