UNPKG

@google/model-viewer

Version:

Easily display interactive 3D models on the web and in AR!

33 lines (32 loc) 1.17 kB
import { Mesh } from 'three'; import { WebGLRenderer } from 'three'; import ModelScene from './ModelScene'; export interface ShadowGenerationConfig { textureWidth?: number; textureHeight?: number; } declare const $camera: unique symbol; declare const $renderTarget: unique symbol; /** * Creates a mesh that can receive and render pseudo-shadows * only updated when calling its render method. This is different * from non-auto-updating shadows because the resulting material * applied to the mesh is disconnected from the renderer's shadow map * and can be freely rotated and positioned like a regular texture. */ export default class StaticShadow extends Mesh { private [$renderTarget]; private [$camera]; /** * Create a shadow mesh. */ constructor(); intensity: number; /** * Updates the generated static shadow. The size of the camera is dependent * on the current scale of the StaticShadow that will host the texture. * It's expected for the StaticShadow to be facing the light source. */ render(renderer: WebGLRenderer, scene: ModelScene, config?: ShadowGenerationConfig): void; } export {};