import { Registry, RendererLike } from "./registry.js"; import { Sprite2D } from "../sprites/Sprite2D.js"; import { Scene } from "three"; //#region src/orchestration/orchestrator.d.ts /** * Signal A entry point: record the sprite as pending on its scene and * make sure the chained `Scene.onBeforeRender` hook is installed. * * Sprites already owned by an explicit world (SpriteGroup / Flatland) * or already auto-registered are left alone. */ declare function flatlandPrime(scene: Scene, sprite: Sprite2D): void; /** * Signal B entry point: the renderer is known (the sprite is mid-draw), * register immediately and make sure the hook exists for subsequent * frames' orchestration. */ declare function flatlandRegister(sprite: Sprite2D, renderer: RendererLike, scene: Scene): void; /** * Remove a sprite from auto-orchestration (three's `'removed'` event). * Slot teardown happens through the ECS removal path once the sprite is * enrolled (auto-batch slice); here we drop the bookkeeping. */ declare function flatlandUnregister(sprite: Sprite2D): void; /** * The per-render-call orchestration sweep. Idempotent and re-entry safe * (shadow passes, XR, RTT re-render the same scene): with nothing * pending it's a map lookup and a size check. */ declare function flatlandSceneSweep(renderer: RendererLike, scene: Scene): void; /** * Threshold routing (the auto-batch activation): group unenrolled * sprites by their live run key and enroll every group that reaches 2 — * or whose run already has an active batch to join. N = 1 stays a * standalone Mesh: no batch overhead until a sibling shows up. * * Enrollment goes through the hidden SpriteGroup's add() (world * assignment, default-material resolution, ECS spawn); the next * schedule run assigns slots and hides the sprites' own meshes. */ declare function evaluateAutoBatch(registry: Registry): void; //#endregion export { evaluateAutoBatch, flatlandPrime, flatlandRegister, flatlandSceneSweep, flatlandUnregister }; //# sourceMappingURL=orchestrator.d.ts.map