import { SortLayerName } from "./sortLayers.js"; import { Group, Object3D } from "three"; //#region src/pipeline/SortLayerGroup.d.ts /** * Discipline container for sort ordering — every child inside gets the * declared sortLayer, mirroring how `SpriteGroup` enforces material * discipline. * * The one container that bridges first-party primitives AND foreign * Object3Ds: our primitives get `sortLayer` (routing through the * auto-batch run key); foreign children (Skia, Slug, plain Mesh) get * `renderOrder` from the layer's declared config. One container, mixed * children, consistent ordering through three's render-list sort. * * Precedence rules: * - Nested `SortLayerGroup` with a different name: **inner wins** — * the walk stops at its boundary and it disciplines its own subtree * - A child with an explicit `sortLayer` or non-zero `renderOrder` * already set is respected — never overridden * - Plain `Group` containers are walked through; their descendants get * the same rules * * ```tsx * * // sortLayer = 'world' * // renderOrder = world.renderOrder * * ``` * * Vanilla three.js: * ```ts * const world = new SortLayerGroup({ name: 'world' }) * scene.add(world) * world.add(playerSprite, enemy, skiaHud) * ``` */ declare class SortLayerGroup extends Group { /** Backing store for the intercepted `name` accessor. @internal */ private _sortLayerGroupName?; constructor(options?: { name?: SortLayerName; }); /** @internal three 'childadded' fires for direct adds only. */ private _onChildAdded; /** * Re-apply the discipline to current children — used when `name` is * assigned after children already exist (R3F sets props post-mount). * @internal */ _applyName(value: string): void; /** @internal */ _applyToSubtree(object: Object3D): void; } //#endregion export { SortLayerGroup }; //# sourceMappingURL=SortLayerGroup.d.ts.map