@speckle/viewer
Version:
A 3d viewer for Speckle, based on threejs.
23 lines (22 loc) • 1.21 kB
TypeScript
import { Material, type IUniform, type MeshStandardMaterialParameters, Scene, Camera, BufferGeometry, Object3D } from 'three';
import { ExtendedMeshStandardMaterial, type Uniforms } from './SpeckleMaterial.js';
import { SpeckleWebGLRenderer } from '../objects/SpeckleWebGLRenderer.js';
declare class SpeckleStandardMaterial extends ExtendedMeshStandardMaterial {
protected originalRoughness: number | undefined;
protected artificialRoughness: number | undefined;
protected get vertexProgram(): string;
protected get fragmentProgram(): string;
protected get baseUniforms(): {
[uniform: string]: IUniform;
};
protected get uniformsDef(): Uniforms;
constructor(parameters: MeshStandardMaterialParameters, defines?: string[]);
/** We need a unique key per program */
customProgramCacheKey(): string;
copy(source: Material): this;
fastCopy(from: Material, to: Material): void;
updateArtificialRoughness(artificialRougness?: number): void;
/** Called by three.js render loop */
onBeforeRender(_this: SpeckleWebGLRenderer, _scene: Scene, _camera: Camera, _geometry: BufferGeometry, object: Object3D): void;
}
export default SpeckleStandardMaterial;