@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
53 lines (52 loc) • 3.56 kB
TypeScript
import { CustomMaterialName } from './../../../core/geometry/Material';
import { Constructor, valueof } from '../../../types/GlobalTypes';
import { PrimitiveMatNode } from './_Base';
import { GlAssemblerController } from '../gl/code/Controller';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { ShaderAssemblerMaterial } from '../gl/code/assemblers/materials/_BaseMaterial';
import { MaterialPersistedConfig } from '../gl/code/assemblers/materials/MaterialPersistedConfig';
import { GlNodeChildrenMap } from '../../poly/registers/nodes/Gl';
import { BaseGlNodeType } from '../gl/_Base';
import { MaterialWithCustomMaterials } from '../../../core/geometry/Material';
import { NodeContext } from '../../poly/NodeContext';
import { NodeCreateOptions } from '../utils/hierarchy/ChildrenController';
export declare function BaseBuilderParamConfig<TBase extends Constructor>(Base: TBase): {
new (...args: any[]): {
/** @param if toggled on, the shader will be built from the gl nodes of another material. This can be useful to have multiple materials use the same gl network, but still set the uniforms differently */
setBuilderNode: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param builder node */
builderNode: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>;
};
} & TBase;
declare const MatBuilderParamsConfig_base: {
new (...args: any[]): {
/** @param if toggled on, the shader will be built from the gl nodes of another material. This can be useful to have multiple materials use the same gl network, but still set the uniforms differently */
setBuilderNode: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param builder node */
builderNode: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>;
};
} & typeof NodeParamsConfig;
declare class MatBuilderParamsConfig extends MatBuilderParamsConfig_base {
}
export declare abstract class TypedBuilderMatNode<M extends MaterialWithCustomMaterials, A extends ShaderAssemblerMaterial, K extends MatBuilderParamsConfig> extends PrimitiveMatNode<M, K> {
protected _assemblerController: GlAssemblerController<A> | undefined;
protected _childrenControllerContext: NodeContext;
readonly persisted_config: MaterialPersistedConfig;
createMaterial(): M;
assemblerController(): GlAssemblerController<A> | undefined;
protected abstract _createAssemblerController(): GlAssemblerController<A> | undefined;
customMaterialRequested(customName: CustomMaterialName): boolean;
createNode<S extends keyof GlNodeChildrenMap>(node_class: S, options?: NodeCreateOptions): GlNodeChildrenMap[S];
createNode<K extends valueof<GlNodeChildrenMap>>(node_class: Constructor<K>, options?: NodeCreateOptions): K;
children(): BaseGlNodeType[];
nodesByType<K extends keyof GlNodeChildrenMap>(type: K): GlNodeChildrenMap[K][];
childrenAllowed(): boolean;
sceneReadonly(): boolean;
compileIfRequired(material: M): void;
protected _compile(material: M): void;
private _setAssemblerGlParentNode;
static PARAM_CALLBACK_setCompileRequired(node: BaseBuilderMatNodeType): void;
private PARAM_CALLBACK_setCompileRequired;
}
export type BaseBuilderMatNodeType = TypedBuilderMatNode<MaterialWithCustomMaterials, ShaderAssemblerMaterial, MatBuilderParamsConfig>;
export {};