@speckle/viewer
Version:
A 3d viewer for Speckle, based on threejs.
23 lines (22 loc) • 1.18 kB
TypeScript
import { BufferGeometry, Camera, Object3D, Scene, type IUniform, type MeshDepthMaterialParameters } from 'three';
import { Material } from 'three';
import { ExtendedMeshDepthMaterial, type Uniforms } from './SpeckleMaterial.js';
import type { SpeckleWebGLRenderer } from '../objects/SpeckleWebGLRenderer.js';
declare class SpeckleDepthMaterial extends ExtendedMeshDepthMaterial {
protected get vertexProgram(): string;
protected get fragmentProgram(): string;
protected get baseUniforms(): {
[uniform: string]: IUniform;
};
protected get uniformsDef(): Uniforms;
constructor(parameters: MeshDepthMaterialParameters, defines?: string[]);
/** We need a unique key per program */
customProgramCacheKey(): string;
copy(source: Material): this;
fastCopy(from: Material, to: Material): void;
/** Another note here, this will NOT get called by three when rendering shadowmaps. We update the uniforms manually
* inside SpeckleRenderer for shadowmaps
*/
onBeforeRender(_this: SpeckleWebGLRenderer, _scene: Scene, _camera: Camera, _geometry: BufferGeometry, object: Object3D): void;
}
export default SpeckleDepthMaterial;