Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / HydrateOptions

Type Alias: HydrateOptions ​

ts
type HydrateOptions = {
  assignPrimaryCamera?: boolean;
  applyTransformsScope?: "world" | "created";
};

Defined in: hydration/types.ts:87

Optional behavior tweaks for hydrateWorldFromSnapshotDetailed. Defaults preserve the historical full-world-load behavior; prefab/subtree instantiation passes stricter options.

Properties ​

PropertyTypeDescriptionDefined in
assignPrimaryCamera?booleanWhen false, no camera in the snapshot is promoted to the world camera. Defaults to true (full scene loads want their default camera active); prefab spawns pass false so a spawned camera never hijacks the view.hydration/types.ts:93
applyTransformsScope?"world" | "created""world" (default) re-applies local transforms for every entity in the world after parent links restore — correct for full scene loads. "created" limits the pass to entities created by THIS hydrate call, so mid-session spawns don't touch unrelated live entities.hydration/types.ts:100