import type { Entity, World } from 'koota';
import type { Snapshot } from './buf/draw/v1/snapshot_pb';
import type { Settings } from './hooks/useSettings.svelte';
import { type SceneMetadata } from './buf/draw/v1/scene_pb';
import type { Relationship } from './metadata';
export type SnapshotEntity = {
    entity: Entity;
    relationships: Relationship[] | undefined;
};
/**
 * Merges scene-level metadata (grid, camera, point/line settings) into the
 * current viewer settings. Millimeter values from the proto are converted
 * to meters.
 */
export declare const applySceneMetadata: (settings: Settings, metadata: SceneMetadata) => Settings;
/**
 * Spawns ECS entities for every transform and drawing in a {@link Snapshot}.
 *
 * Each transform produces one entity with Name, Pose, Parent, Geometry, and
 * optional Color/Opacity traits. Each drawing produces one or more entities
 * depending on the geometry type (arrows, points, line, nurbs, model, or
 * simple shapes like box/sphere/capsule).
 *
 * @returns The spawned entities
 */
export declare const spawnSnapshotEntities: (world: World, snapshot: Snapshot) => SnapshotEntity[];
export interface ReconcileResult {
    current: Map<string, SnapshotEntity>;
    unkeyed: SnapshotEntity[];
    spawned: SnapshotEntity[];
    updated: SnapshotEntity[];
}
export declare const reconcileSnapshotEntities: (world: World, snapshot: Snapshot, prev: Map<string, SnapshotEntity>) => ReconcileResult;
export interface SnapshotPointCloud {
    name: string;
    positions: Float32Array;
    colors?: Uint8Array;
}
/**
 * Decodes every point-cloud drawing in a snapshot into `{ name, positions, colors }`,
 * keyed and merged by `referenceFrame`. Chunked clouds share a referenceFrame, so their
 * positions/colors are concatenated back into one cloud. Inverse of `DrawPoints`.
 *
 * Colors are gated through `isVertexColors`: only genuine per-vertex color arrays are kept;
 * single-uniform-color arrays (3 bytes) are discarded as `undefined`.
 */
export declare const decodeDrawnSnapshotPointClouds: (snapshot: Snapshot) => SnapshotPointCloud[];
