@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
27 lines (26 loc) • 1.23 kB
TypeScript
import { IUniform } from 'three';
import { ParamType } from '../../../../poly/ParamType';
import { ParamInitValuesTypeMap } from '../../../../params/types/ParamInitValuesTypeMap';
import { BaseNodeType } from '../../../_Base';
import { BaseParamType } from '../../../../params/_Base';
import { BaseParamConfig } from '../../../utils/code/configs/BaseParamConfig';
export interface GlParamConfigJSON<T extends ParamType> {
type: T;
name: string;
defaultValue: ParamInitValuesTypeMap[T];
uniformName: string;
}
export declare class GlParamConfig<T extends ParamType> extends BaseParamConfig<T> {
private _uniformName;
private _uniform;
constructor(_type: T, _name: string, _defaultValue: ParamInitValuesTypeMap[T], _uniformName: string);
toJSON(): GlParamConfigJSON<T>;
static fromJSON(json: GlParamConfigJSON<ParamType>): GlParamConfig<ParamType>;
uniformName(): string;
uniform(): IUniform<any>;
private _createUniform;
protected _callback(node: BaseNodeType, param: BaseParamType): void;
static callback(param: BaseParamType, uniform: IUniform): void;
static uniformByType(type: ParamType): IUniform;
private static setUniformValueFromTextureFromNodePathParam;
}