import { Matrix4 } from 'three'; import { type HelixSceneV2, type SceneHlodCompleteBakeSettings, type SceneNode } from '@hypersoniclabs/helix-manifest'; import { type CompletePrototype } from './completePrototype'; import { type HlodAtlasSlot } from './sharedAtlas'; export interface CompleteSceneHlodOptions extends Partial { compression?: 'png' | 'ktx2'; force?: boolean; signal?: AbortSignal; /** * How a prototype's atlas tile is sized. `extent` (default, the shipped rule): the next power of two of its largest dimension times texelsPerM, so a * 100 m tower and a 100 m-long warehouse get the same tile however much wall they have. `area`: the tile follows the square root of the exterior surface * area of the simplified mesh (the wall a viewer actually sees), with one texel density for the whole city solved so that the tiles together cost * `atlasBudgetTexels` (default: what the `extent` rule would have spent on the same prototypes), so towers gain texels from the many small buildings * that were floored at minTileSize. Prototypes are baked once at maxTileSize and resampled into their slot. */ allocation?: 'extent' | 'area'; atlasBudgetTexels?: number; onProgress?: (progress: { phase: 'prototype' | 'material' | 'cell'; completed: number; total: number; id: string; cached: boolean; }) => void; } export declare const DEFAULT_COMPLETE_HLOD_SETTINGS: SceneHlodCompleteBakeSettings; export { allocateTileSizes } from './allocateTileSizes'; export declare const TILE_SIZES: readonly [32, 64, 128, 256, 512, 1024]; /** The shipped rule: next power of two of (largest extent x texels per metre), clamped. */ export declare function extentTileSize(extentM: number, settings: Pick): number; export interface Instance { node: SceneNode; matrix: Matrix4; key: string; scale: number; cell: string; layer: string; } export declare function sceneMatrices(scene: HelixSceneV2): Map; export declare function scaleBound(matrix: Matrix4): number; export declare function durableArtifact(output: string, bytes: Uint8Array): Promise<{ sha256: string; uri: string; bytes: number; }>; export declare function resource(id: string, artifact: { sha256: string; uri: string; bytes: number; }): HelixSceneV2['resources'][number]; /** Complete coarse scene bake. Multiple documents in one bundle share appearance while keeping their sealed scene roots independent. */ export declare function bakeCompleteSceneHlod(files: string | readonly string[], options?: CompleteSceneHlodOptions): Promise<{ bakerVersion: number; scenes: { file: string; id: string; revision: string; integrity: import("@hypersoniclabs/helix-manifest").SceneIntegrity; }[]; prototypes: number; cachedPrototypes: number; cells: { scene: string; cluster: string; sources: number; triangles: number; bytes: number; estimatedBytes: number; quantizationErrorM: number; }[]; sources: number; triangles: number; geometryBytes: number; geometryEstimatedBytes: number; material: { estimatedBytes: number; width: number; height: number; sha256: string; uri: string; bytes: number; }; allocation: { tau: number; texels: number; budgetTexels: number; extentTexels: number; } | undefined; tileHistogram: { [k: string]: number; }; totalMs: number; }>; export declare function mergeCompleteCell(instances: Instance[], slots: Map, get: (key: string) => Promise, origin: [number, number, number], signal?: AbortSignal): Promise<{ positions: Float32Array; normals: Float32Array; uvs: Float32Array; indices: Uint32Array; sources: Uint16Array; }>;