UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

34 lines (33 loc) 1.2 kB
import { RGBAColor } from "../engine/js-extensions/index.js"; import { Behaviour } from "./Component.js"; /** * The mode of the ShadowCatcher. * - ShadowMask: only renders shadows. * - Additive: renders shadows additively. * - Occluder: occludes light. */ declare enum ShadowMode { ShadowMask = 0, Additive = 1, Occluder = 2 } /** * ShadowCatcher can be added to an Object3D to make it render shadows (or light) in the scene. It can also be used to create a shadow mask, or to occlude light. * If the GameObject is a Mesh, it will apply a shadow-catching material to it - otherwise it will create a quad with the shadow-catching material. * * Note that ShadowCatcher meshes are not raycastable by default; if you want them to be raycastable, change the layers in `onEnable()`. * @category Rendering * @group Components */ export declare class ShadowCatcher extends Behaviour { mode: ShadowMode; shadowColor: RGBAColor; private targetMesh?; /** @internal */ start(): void; applyLightBlendMaterial(): void; applyShadowMaterial(): void; applyOccluderMaterial(): void; private applyMaterialOptions; } export {};