import { PostProcessStageComposite as CesiumPostProcessStageComposite } from 'cesium'; import { PickCesiumProps, ConstructorOptions, Merge } from '../core'; export type Target = Merge>; export type PostProcessStageCompositeCesiumProps = PickCesiumProps; export type PostProcessStageCompositeCesiumReadonlyProps = PickCesiumProps; export type PostProcessStageCompositeProps = PostProcessStageCompositeCesiumProps & PostProcessStageCompositeCesiumReadonlyProps; declare const cesiumProps: readonly ["enabled", "selected"]; declare const cesiumReadonlyProps: readonly ["inputPreviousStageTexture", "name", "stages", "uniforms"]; type CollectionInternals = { remove(stage: CesiumPostProcessStageComposite): boolean; _stageNames?: Record; }; /** * Removes a resium-owned `PostProcessStageComposite` from the scene's * `PostProcessStageCollection` and destroys it WITHOUT destroying the * user-supplied child `PostProcessStage` instances passed via the `stages` prop. * * resium creates and owns the composite, but it does NOT own the child stages. * Both `PostProcessStageCollection.remove(stage)` and * `PostProcessStageComposite.destroy()` unconditionally destroy every child * stage (Cesium offers no `destroy=false` flag). Under React StrictMode * (mount -> unmount -> remount), the throwaway first unmount would destroy the * user-owned stages, so the real remount reuses already-destroyed stages and * throws "This object was destroyed, i.e., destroy() was called." (same class * of bug as #602). * * The composite stores the user's stages in its internal `_stages` array, which * is the SAME array reference passed in props (`this._stages = options.stages`). * When the collection adds the composite, `add` walks into the children and * registers each one in the collection's `_stageNames` map and stamps * `child._textureCache`. We: * 1. snapshot the children and replace the composite's `_stages` with a fresh * empty array (NOT emptying the user's array in place) so neither `remove` * nor `destroy` cascades into the children; * 2. `remove` the (now child-less) composite, which frees the composite's own * name and slot; * 3. reverse the per-child registration that `add` performed (delete the name * entry and clear `_textureCache`/`_index`), leaving the user-owned stages * intact and re-addable on the next mount. * * @internal exported for testing. */ export declare const removeCompositeWithoutDestroyingChildren: (element: CesiumPostProcessStageComposite, collection: CollectionInternals | undefined) => void; export declare const PostProcessStageComposite: import('..').CesiumComponentType; export default PostProcessStageComposite;