UNPKG

@polygonjs/polygonjs

Version:

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

62 lines (61 loc) 3.75 kB
import { Constructor } from '../../../../types/GlobalTypes'; import { TypedMatNode } from '../_Base'; import { BaseTextureMapController } from './_BaseTextureController'; import { NodeParamsConfig } from '../../utils/params/ParamsConfig'; import { MeshStandardMaterial, MeshPhysicalMaterial, Material, Vector3 } from 'three'; import { DefaultOperationParams } from '../../../../core/operations/_Base'; import { TypedNodePathParamValue } from '../../../../core/Walker'; import { MaterialTexturesRecord, SetParamsTextureNodesRecord } from './_BaseController'; export interface EnvMapOperationParams extends DefaultOperationParams { useEnvMap: boolean; envMap: TypedNodePathParamValue; envMapIntensity: number; envMapRotation: Vector3; } export declare const ENV_MAP_OPERATION_DEFAULT_PARAMS: EnvMapOperationParams; export declare function EnvMapParamConfig<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 rotation */ envMapRotation: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.VECTOR3>; }; } & TBase; type TextureEnvMapControllerCurrentMaterial = MeshStandardMaterial | MeshPhysicalMaterial; export declare function isValidEnvMapMaterial(material?: Material): material is TextureEnvMapControllerCurrentMaterial; declare const TextureEnvMapParamsConfig_base: { 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 rotation */ envMapRotation: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.VECTOR3>; }; } & typeof NodeParamsConfig; declare class TextureEnvMapParamsConfig extends TextureEnvMapParamsConfig_base { } export interface TextureEnvMapControllers { envMap: TextureEnvMapController; } declare abstract class TextureEnvMapMatNode extends TypedMatNode<TextureEnvMapControllerCurrentMaterial, TextureEnvMapParamsConfig> { controllers: TextureEnvMapControllers; material(): Promise<TextureEnvMapControllerCurrentMaterial | undefined>; } export declare class TextureEnvMapController extends BaseTextureMapController { protected node: TextureEnvMapMatNode; constructor(node: TextureEnvMapMatNode); initializeNode(): void; static update(node: TextureEnvMapMatNode): Promise<void>; update(): Promise<void>; updateMaterial(material: TextureEnvMapControllerCurrentMaterial): Promise<void>; getTextures(material: TextureEnvMapControllerCurrentMaterial, record: MaterialTexturesRecord): void; setParamsFromMaterial(material: TextureEnvMapControllerCurrentMaterial, record: SetParamsTextureNodesRecord): void; } export {};