import { Component } from '@certe/atmos-core'; import type { Mat4Type } from '@certe/atmos-math'; import type { Mesh } from './mesh.js'; import type { PipelineResources } from './pipeline.js'; import type { CustomPipelineResources } from './custom-pipeline.js'; import type { Material } from './material.js'; import type { BoundingSphere } from './bounds.js'; /** Minimal context for MeshRenderer — satisfied by RenderSystem via duck typing. */ export interface MeshRendererContext { readonly device: GPUDevice; readonly pipelineResources: PipelineResources; } export declare class MeshRenderer extends Component { mesh: Mesh | null; material: Material | null; meshSource: string; materialSource: string; castShadow: boolean; receiveSSAO: boolean; uniformBuffer: GPUBuffer | null; bindGroup: GPUBindGroup | null; materialBindGroup: GPUBindGroup | null; /** Custom pipeline resources (set by RenderSystem when shaderType === 'custom'). */ customPipelineResources: CustomPipelineResources | null; /** Custom material bind group (group 1 for custom pipeline). */ customMaterialBindGroup: GPUBindGroup | null; /** Custom shadow bind group (group 2 for shadow pipeline: scene + custom uniforms). */ customShadowBindGroup: GPUBindGroup | null; private _device; private _pipelineResources; private readonly _mvp; private readonly _invModel; private readonly _normalMat; private readonly _matData; private _lastTextureVersion; private readonly _worldBoundsCenter; private readonly _worldBounds; init(ctx: MeshRendererContext, mesh: Mesh, material?: Material): void; /** Lazily initialise GPU buffers if mesh+material exist but init() was never called. */ ensureGPU(ctx: MeshRendererContext): void; /** Create material bind group lazily, once the shared scene buffer is available */ initMaterialBindGroup(sceneBuffer: GPUBuffer): void; /** Create custom material bind group lazily for custom shader pipeline. */ initCustomMaterialBindGroup(sceneBuffer: GPUBuffer): void; /** Create shadow bind group (group 2) for custom vertex displacement shadows. */ initCustomShadowBindGroup(sceneBuffer: GPUBuffer): void; writeUniforms(viewProjection: Mat4Type): void; draw(pass: GPURenderPassEncoder, shadowBindGroup?: GPUBindGroup, depthBindGroup?: GPUBindGroup): void; get worldBoundingSphere(): BoundingSphere | null; onDestroy(): void; /** Destroy owned GPU mesh buffers (vertex + index). */ destroyMesh(): void; } //# sourceMappingURL=mesh-renderer.d.ts.map