@speckle/viewer
Version:
A 3d viewer for Speckle, based on threejs.
26 lines (25 loc) • 1.17 kB
TypeScript
import { Box3, Mesh, Plane, Scene } from 'three';
import { ShadowcatcherPass } from './pipeline/Passes/ShadowcatcherPass.js';
import { ObjectLayers } from '../IViewer.js';
import { type ShadowcatcherConfig } from './ShadowcatcherConfig.js';
import type { SpeckleWebGLRenderer } from './objects/SpeckleWebGLRenderer.js';
export declare class Shadowcatcher {
static readonly MESH_NAME = "Shadowcatcher";
static readonly PLANE_SUBD = 2;
static readonly MAX_TEXTURE_SIZE_SCALE = 0.5;
private planeMesh;
private planeSize;
private displayMaterial;
shadowcatcherPass: ShadowcatcherPass;
private _config;
get shadowcatcherMesh(): Mesh<import("three").BufferGeometry, import("three").Material | import("three").Material[]>;
set configuration(config: ShadowcatcherConfig);
constructor(layer: ObjectLayers, renderlayers: Array<ObjectLayers>);
update(scene: Scene): void;
render(renderer: SpeckleWebGLRenderer): void;
bake(worldBox: Box3, maxTexSize: number, force?: boolean): void;
updateClippingPlanes(planes: Plane[]): void;
private getTextureSize;
private updatePlaneMesh;
private updatePlaneMeshGeometry;
}