UNPKG

@polygonjs/polygonjs

Version:

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

133 lines (132 loc) 9.36 kB
import { Constructor } from '../../../../types/GlobalTypes'; import { NodeParamsConfig } from '../../utils/params/ParamsConfig'; import { PrimitiveMatNode } from '../_Base'; import { Material } from 'three'; import { ShaderMaterialWithCustomMaterials } from '../../../../core/geometry/Material'; export declare function RayMarchingMainParamConfig<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { /** @param maximum number of steps the raymarcher will run */ maxSteps: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.INTEGER>; /** @param maximum distance the raymarcher will step through */ maxDist: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param when the ray reaches this distance from a surface it will stop marching. You can lower this value to increase the precision of the raymarcher */ surfDist: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param precision for normals computation */ normalsBias: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param precision for shadows computation */ shadowBias: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & TBase; export declare function RayMarchingEnvMapParamConfig<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { /** @param toggle if you want to use an environment map */ useEnvMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param specify the environment map COP node */ envMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.NODE_PATH>; /** @param environment intensity */ envMapIntensity: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param environment roughness */ envMapRoughness: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param allow env map rotation */ tEnvMapRotate: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param env map rotation */ envMapRotation: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & TBase; export declare function RayMarchingDebugParamConfig<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { /** @param debug mode */ debug: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param outputs color showing the number of steps required to solve the raymarching */ debugMode: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.INTEGER>; /** @param min steps count */ debugMinSteps: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.INTEGER>; /** @param max steps count */ debugMaxSteps: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.INTEGER>; /** @param min depth */ debugMinDepth: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param max depth */ debugMaxDepth: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & TBase; declare class RayMarchingMaterial extends Material { } declare const RayMarchingParamsConfig_base: { new (...args: any[]): { overrideCustomMaterials: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; createCustomMatDistance: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; shadowDistanceMin: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; shadowDistanceMax: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; createCustomMatDepth: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; shadowDepthMin: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; shadowDepthMax: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & { new (...args: any[]): { /** @param debug mode */ debug: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param outputs color showing the number of steps required to solve the raymarching */ debugMode: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.INTEGER>; /** @param min steps count */ debugMinSteps: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.INTEGER>; /** @param max steps count */ debugMaxSteps: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.INTEGER>; /** @param min depth */ debugMinDepth: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param max depth */ debugMaxDepth: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & { new (...args: any[]): { /** @param toggle if you want to use an environment map */ useEnvMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param specify the environment map COP node */ envMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.NODE_PATH>; /** @param environment intensity */ envMapIntensity: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param environment roughness */ envMapRoughness: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param allow env map rotation */ tEnvMapRotate: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param env map rotation */ envMapRotation: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & { new (...args: any[]): { /** @param maximum number of steps the raymarcher will run */ maxSteps: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.INTEGER>; /** @param maximum distance the raymarcher will step through */ maxDist: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param when the ray reaches this distance from a surface it will stop marching. You can lower this value to increase the precision of the raymarcher */ surfDist: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param precision for normals computation */ normalsBias: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param precision for shadows computation */ shadowBias: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & typeof NodeParamsConfig; declare class RayMarchingParamsConfig extends RayMarchingParamsConfig_base { } declare abstract class RayMarchingMatNode extends PrimitiveMatNode<RayMarchingMaterial, RayMarchingParamsConfig> { } export declare class RayMarchingController { protected node: RayMarchingMatNode; constructor(node: RayMarchingMatNode); updateUniformsFromParams(shaderMaterial: ShaderMaterialWithCustomMaterials): Promise<void>; private _updateDebug; private _updateEnvMap; /** * * uniforms * */ private _updateUniforms; private static _updateUniforms; static updateUniformEnvMapIntensity(node: RayMarchingMatNode): Promise<void>; static _updateUniformEnvMapIntensity(node: RayMarchingMatNode, shaderMaterial: ShaderMaterialWithCustomMaterials): void; static updateUniformEnvMapRoughness(node: RayMarchingMatNode): Promise<void>; static _updateUniformEnvMapRoughness(node: RayMarchingMatNode, shaderMaterial: ShaderMaterialWithCustomMaterials): void; static updateUniformEnvMapRotate(node: RayMarchingMatNode): Promise<void>; static _updateUniformEnvMapRotate(node: RayMarchingMatNode, shaderMaterial: ShaderMaterialWithCustomMaterials): void; } export {};