/** * SkinnedMeshRenderer: renders a mesh with GPU skinning. * Same pattern as MeshRenderer but adds a bone storage buffer (group 3). */ import { Component } from '@certe/atmos-core'; import type { Mat4Type } from '@certe/atmos-math'; import type { Mesh } from './mesh.js'; import type { SkinnedPipelineResources } from './skinned-pipeline.js'; import type { Material } from './material.js'; import type { BoundingSphere } from './bounds.js'; /** Minimal context for SkinnedMeshRenderer — satisfied by RenderSystem via duck typing. */ export interface SkinnedRendererContext { readonly device: GPUDevice; readonly skinnedPipelineResources: SkinnedPipelineResources; } export declare class SkinnedMeshRenderer extends Component { mesh: Mesh | null; material: Material | null; meshSource: string; materialSource: string; castShadow: boolean; jointCount: number; uniformBuffer: GPUBuffer | null; bindGroup: GPUBindGroup | null; materialBindGroup: GPUBindGroup | null; /** Storage buffer for bone matrices (jointCount * 64 bytes). */ boneBuffer: GPUBuffer | null; /** Bind group for group 3 (bone matrices). */ boneBindGroup: GPUBindGroup | null; /** Shadow bone bind group (group 2 in shadow pipeline). */ shadowBoneBindGroup: 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: SkinnedRendererContext, mesh: Mesh, jointCount: number, material?: Material): void; initMaterialBindGroup(sceneBuffer: GPUBuffer): void; /** * Write bone matrices from the sibling AnimationMixer component. * Call this after AnimationMixer.onUpdate() has run. */ writeBoneMatrices(boneMatrices: Float32Array): void; writeUniforms(viewProjection: Mat4Type): void; draw(pass: GPURenderPassEncoder, shadowBindGroup?: GPUBindGroup): void; get worldBoundingSphere(): BoundingSphere | null; onDestroy(): void; destroyMesh(): void; } //# sourceMappingURL=skinned-mesh-renderer.d.ts.map