UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

87 lines (86 loc) 5.15 kB
import { Constructor } from '../../types/GlobalTypes'; import { Group, Mesh, Color, Vector2, DirectionalLight } from 'three'; import { DefaultOperationParams } from '../operations/_Base'; export interface DirectionalLightParams extends DefaultOperationParams { color: Color; intensity: number; distance: number; showHelper: boolean; name: string; castShadow: boolean; shadowAutoUpdate: boolean; shadowUpdateOnNextRender: boolean; shadowRes: Vector2; shadowSize: Vector2; shadowBias: number; shadowRadius: number; raymarchingPenumbra: number; raymarchingShadowBiasAngle: number; raymarchingShadowBiasDistance: number; } export declare const DEFAULT_DIRECTIONAL_LIGHT_PARAMS: DirectionalLightParams; export declare function DirectionalLightParamConfig<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { light: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FOLDER>; /** @param light color */ color: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.COLOR>; /** @param light intensity */ intensity: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FLOAT>; /** @param light distance */ distance: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FLOAT>; /** @param toggle to show helper */ showHelper: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.BOOLEAN>; /** @param light name */ name: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.STRING>; shadow: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FOLDER>; /** @param toggle on to cast shadows */ castShadow: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.BOOLEAN>; /** @param toggle off if the shadows do not need to be regenerated */ shadowAutoUpdate: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.BOOLEAN>; /** @param press button to update the shadows on next render */ shadowUpdateOnNextRender: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.BOOLEAN>; /** @param shadow resolution */ shadowRes: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.VECTOR2>; /** @param shadow size */ shadowSize: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.VECTOR2>; /** @param shadow bias */ shadowBias: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FLOAT>; /** @param shadows radius. This only has effect when setting the ROP/WebGLRenderer's shadowMapType to VSM */ shadowRadius: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FLOAT>; /** @param display shadow on a plane behind the light */ raymarching: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FOLDER>; /** @param this affects the shadows cast inside raymarchingBuilder materials */ raymarchingPenumbra: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FLOAT>; /** @param shadow bias */ raymarchingShadowBiasAngle: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FLOAT>; /** @param shadow bias */ raymarchingShadowBiasDistance: import("../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../engine/index_all").ParamType.FLOAT>; }; } & TBase; export interface DirectionalLightContainerParams { showHelper: boolean; } export declare class DirectionalLightContainer extends Group { readonly nodeName: string; private _light; private _target; showHelper: boolean; matrixAutoUpdate: boolean; constructor(options: DirectionalLightContainerParams, nodeName: string); light(): DirectionalLight; copy(source: this, recursive?: boolean): this; clone(recursive?: boolean): this; updateHelper(): void; private __helper__; } export declare class CoreDirectionalLightHelper { container: DirectionalLightContainer; object: Mesh; private _lineMaterial; private _cameraHelper; private _square; constructor(container: DirectionalLightContainer); createAndBuildObject(): void; buildHelper(): void; update(): void; }