@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
42 lines (40 loc) • 1.96 kB
TypeScript
/**
* Updates a uniform of the input material
*
*
*/
import { Material, ShaderMaterial } from 'three';
import { UpdateMatNode } from './_Base';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { GlConnectionPointType } from '../utils/io/connections/Gl';
import { ParamType } from '../../poly/ParamType';
export declare enum AdditionalType {
COLOR = "color",
TEXTURE = "texture"
}
declare class BuilderUniformUpdateMatParamsConfig extends NodeParamsConfig {
/** @param name of the uniform */
uniformName: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.STRING>;
/** @param type of the uniform */
type: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.INTEGER>;
bool: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.BOOLEAN>;
int: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.INTEGER>;
float: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.FLOAT>;
vec2: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.VECTOR2>;
vec3: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.VECTOR3>;
color: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.COLOR>;
vec4: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.VECTOR4>;
texture: import("../utils/params/ParamsConfig").ParamTemplate<ParamType.NODE_PATH>;
}
export declare class BuilderUniformUpdateMatNode extends UpdateMatNode<ShaderMaterial, BuilderUniformUpdateMatParamsConfig> {
paramsConfig: BuilderUniformUpdateMatParamsConfig;
static type(): string;
private _paramConfig;
cook(inputMaterials: Material[]): Promise<void>;
private _handleCustomMaterial;
setType(type: GlConnectionPointType | AdditionalType): void;
static PARAM_CALLBACK_applyCurrentParam(node: BuilderUniformUpdateMatNode): void;
private _applyCurrentParam;
private _updateTexture;
}
export {};