import type { BspMap } from '../assets/bsp.js'; import { BspSurfacePipeline } from './bspPipeline.js'; import { gatherVisibleFaces } from './bspTraversal.js'; import { extractFrustumPlanes } from './culling.js'; import { Camera } from './camera.js'; import { CameraState } from './types/camera.js'; import type { BspSurfaceGeometry, LightmapAtlas } from './bsp.js'; import { Texture2D } from './resources.js'; import type { MaterialManager } from './materials.js'; import { computeSkyScroll, removeViewTranslation, SkyboxPipeline } from './skybox.js'; import { DLight } from './dlight.js'; export { FrameRenderStats, FrameRenderOptions }; interface SkyRenderState { readonly scrollSpeeds?: readonly [number, number]; readonly textureUnit?: number; } export interface ViewModelRenderState { readonly fov?: number; readonly depthRange?: readonly [number, number]; readonly draw: (viewProjection: Float32Array) => void; } interface FrameRenderStats { batches: number; facesDrawn: number; drawCalls: number; skyDrawn: boolean; viewModelDrawn: boolean; fps: number; vertexCount: number; } export interface WorldRenderState { readonly map: BspMap; readonly surfaces: readonly BspSurfaceGeometry[]; readonly lightmaps?: readonly LightmapAtlas[]; readonly textures?: ReadonlyMap; readonly materials?: MaterialManager; readonly lightStyles?: ReadonlyArray; } export type RenderMode = 'textured' | 'wireframe' | 'solid' | 'solid-faceted'; export interface RenderModeConfig { readonly mode: RenderMode; readonly applyToAll: boolean; readonly color?: readonly [number, number, number, number]; readonly generateRandomColor?: boolean; } interface FrameRenderOptions { readonly camera: Camera; readonly cameraState?: CameraState; readonly world?: WorldRenderState; readonly sky?: SkyRenderState; readonly viewModel?: ViewModelRenderState; readonly dlights?: readonly DLight[]; readonly timeSeconds?: number; readonly deltaTime?: number; readonly clearColor?: readonly [number, number, number, number]; readonly renderMode?: RenderModeConfig; readonly disableLightmaps?: boolean; readonly lightmapOnly?: boolean; readonly brightness?: number; readonly gamma?: number; readonly fullbright?: boolean; readonly ambient?: number; readonly lightStyleOverrides?: Map; readonly waterTint?: readonly [number, number, number, number]; readonly underwaterWarp?: boolean; readonly bloom?: boolean; readonly bloomIntensity?: number; readonly portalState?: ReadonlyArray; } interface FrameRendererDependencies { readonly gatherVisibleFaces: typeof gatherVisibleFaces; readonly extractFrustumPlanes: typeof extractFrustumPlanes; readonly computeSkyScroll: typeof computeSkyScroll; readonly removeViewTranslation: typeof removeViewTranslation; } export interface FrameRenderer { renderFrame(options: FrameRenderOptions): FrameRenderStats; } export declare const createFrameRenderer: (gl: WebGL2RenderingContext, bspPipeline: BspSurfacePipeline, skyboxPipeline: SkyboxPipeline, deps?: FrameRendererDependencies) => FrameRenderer; //# sourceMappingURL=frame.d.ts.map