UNPKG

@polygonjs/polygonjs

Version:

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

71 lines (70 loc) 5.15 kB
import { Constructor } from '../../../../types/GlobalTypes'; import { TypedMatNode } from '../_Base'; import { BaseTextureMapController } from './_BaseTextureController'; import { NodeParamsConfig } from '../../utils/params/ParamsConfig'; import { MeshStandardMaterial, MeshPhysicalMaterial } from 'three'; import { DefaultOperationParams } from '../../../../core/operations/_Base'; import { TypedNodePathParamValue } from '../../../../core/Walker'; import { MaterialTexturesRecord, SetParamsTextureNodesRecord } from './_BaseController'; export interface MetalnessRoughnessOperationParams extends DefaultOperationParams { useMetalnessMap: boolean; metalnessMap: TypedNodePathParamValue; metalness: number; useRoughnessMap: boolean; roughnessMap: TypedNodePathParamValue; roughness: number; } export declare const METALNESS_ROUGHNESS_OPERATION_DEFAULT_PARAMS: MetalnessRoughnessOperationParams; export declare function MetalnessRoughnessMapParamConfig<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { /** @param toggle if you want to use a metalness map */ useMetalnessMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param specify the metalness map COP node */ metalnessMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.NODE_PATH>; /** @param metalness. It's recommended to either set this value to 0 or to 1, as objects are either metallic or not. Any value in between tends to look like an alien plastic */ metalness: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param toggle if you want to use a roughness map */ useRoughnessMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param specify the roughness map COP node */ roughnessMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.NODE_PATH>; /** @param roughness. When set to 0, reflections from environment maps will be very sharp, or blurred when 1. Any value between 0 and 1 can help modulate this. */ roughness: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & TBase; type TextureMetalnessRoughnessCurrentMaterial = MeshStandardMaterial | MeshPhysicalMaterial; declare const TextureMetalnessMapParamsConfig_base: { new (...args: any[]): { /** @param toggle if you want to use a metalness map */ useMetalnessMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param specify the metalness map COP node */ metalnessMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.NODE_PATH>; /** @param metalness. It's recommended to either set this value to 0 or to 1, as objects are either metallic or not. Any value in between tends to look like an alien plastic */ metalness: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; /** @param toggle if you want to use a roughness map */ useRoughnessMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.BOOLEAN>; /** @param specify the roughness map COP node */ roughnessMap: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.NODE_PATH>; /** @param roughness. When set to 0, reflections from environment maps will be very sharp, or blurred when 1. Any value between 0 and 1 can help modulate this. */ roughness: import("../../utils/params/ParamsConfig").ParamTemplate<import("../../../index_all").ParamType.FLOAT>; }; } & typeof NodeParamsConfig; declare class TextureMetalnessMapParamsConfig extends TextureMetalnessMapParamsConfig_base { } export interface TextureMetalnessRoughnessMapControllers { metalnessRoughnessMap: TextureMetalnessRoughnessMapController; } declare abstract class TextureMetalnessMapMatNode extends TypedMatNode<TextureMetalnessRoughnessCurrentMaterial, TextureMetalnessMapParamsConfig> { controllers: TextureMetalnessRoughnessMapControllers; material(): Promise<TextureMetalnessRoughnessCurrentMaterial | undefined>; } export declare class TextureMetalnessRoughnessMapController extends BaseTextureMapController { protected node: TextureMetalnessMapMatNode; constructor(node: TextureMetalnessMapMatNode); initializeNode(): void; static update(node: TextureMetalnessMapMatNode): Promise<void>; update(): Promise<void>; updateMaterial(material: TextureMetalnessRoughnessCurrentMaterial): Promise<void>; getTextures(material: TextureMetalnessRoughnessCurrentMaterial, record: MaterialTexturesRecord): void; setParamsFromMaterial(material: TextureMetalnessRoughnessCurrentMaterial, record: SetParamsTextureNodesRecord): void; } export {};