import { RenderTarget, type Camera, type Object3D, type WebGPURenderer } from 'three/webgpu'; import { type AssetManager, type ThreeAssetAdapterRuntime, type ThreeStandardAssetAdapters } from '../assets/index.js'; import { type InstallShaderCacheOptions, type ShaderCache, type ShaderProviderInstallation, type ShaderRegistrationHandle } from '../shaders/index.js'; import { type StatsWorkerAdapter } from 'three-blocks/stats'; import { type TextConfiguration, type TextSyncDelivery } from '../text-runtime/index.js'; import { type TextRenderer, type TextRendererOptions } from '../text-worker/index.js'; import { type ThreeBlocksClientConfig, type ThreeBlocksMeshoptDecoder, type ThreeBlocksRuntimeFlags } from '../vite/types.js'; import { type PageLink, type SceneContext, type WorkerShaderCaptureActivation } from './types.js'; /** Activate the inert dev capture journal before a worker creates its renderer. */ export declare function configureWorkerShaderCapture(activation: WorkerShaderCaptureActivation | undefined): void; /** Keep a worker capture's settle window aligned with page visibility. */ export declare function setWorkerShaderCaptureVisibility(visible: boolean): void; export interface WorkerRuntimeConfiguration { readonly client: ThreeBlocksClientConfig; readonly loadMeshopt: () => PromiseLike; } export interface CreateWorkerRuntimeOptions { readonly renderer: object; readonly scene: TextRendererOptions['scene']; readonly sceneKey: string; /** Loads a committed manifest module. Omit it to look next to the application, under `base`. */ readonly loadShaderManifest?: InstallShaderCacheOptions['loadManifest']; readonly page: PageLink; readonly configuration: WorkerRuntimeConfiguration; readonly text?: TextConfiguration; /** `boot.flags` from the page shell. */ readonly flags?: ThreeBlocksRuntimeFlags; } export interface SceneContextOptions { readonly hot?: boolean; } export type StatsTextureRenderer = (target: RenderTarget) => PromiseLike; /** Shared worker-side assets, shaders, stats, and optional text lifetime. */ export declare class WorkerRuntime { #private; readonly installation: ShaderProviderInstallation; readonly assets: AssetManager; readonly shaders: ShaderCache; readonly stats: StatsWorkerAdapter; readonly text: TextRenderer | undefined; constructor(options: { readonly installation: ShaderProviderInstallation; readonly assets: AssetManager; readonly shaders: ShaderCache; readonly stats: StatsWorkerAdapter; readonly text?: TextRenderer; readonly sceneKey: string; readonly adapterRuntime: ThreeAssetAdapterRuntime; readonly registrations: Map; }); createSceneContext(options?: SceneContextOptions): SceneContext; setStatsPanel(name: string, enabled: boolean, visible: boolean): void; beginFrame(): void; endFrame(): void; captureTexture(name: string, target: object, width?: 90, height?: 48): Promise; captureStatsFrame(render: StatsTextureRenderer): Promise; captureStatsFrame(renderer: WebGPURenderer, scene: Object3D, camera: Camera): Promise; applyTextDelivery(delivery: TextSyncDelivery): void; replaceTextConfiguration(configuration: TextConfiguration): Promise; dispose(): Promise; } export declare function createWorkerRuntime(options: CreateWorkerRuntimeOptions): Promise;