@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
39 lines (38 loc) • 2.66 kB
TypeScript
/**
* Applies a material to objects
*
* @remarks
* This can assign the material to the top level objects, but also to their children.
*
* This node can also be used to process input materials, without assigning a new one. This can be useful when processing a geometry imported from a File SOP. You may want to swap textures, in which case you could swap the emission texture to the color one. This would allow you to use a mesh basic material, which would be faster to render.
*/
import { TypedSopNode } from './_Base';
import { CoreGroup } from '../../../core/geometry/Group';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { SopType } from '../../poly/registers/nodes/types/Sop';
declare class MaterialSopParamsConfig extends NodeParamsConfig {
/** @param group to assign the material to */
group: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
/** @param toggle on to assign the new material */
assignMat: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param the material node */
material: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>;
/** @param Cloning the material would prevent the material node to have any effect on the processed geometries. But it would allow to have multiple materials, if this was used with a Copy SOP for instance */
cloneMat: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param while cloning the material, you may only want to change basic properties (such as depthWrite or transparent), but you would want to still use the same custom uniforms created by GL/param nodes */
shareCustomUniforms: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param swap one texture with another */
swapCurrentTex: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
/** @param texture to swap */
texSrc0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
/** @param texture to swap */
texDest0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
}
export declare class MaterialSopNode extends TypedSopNode<MaterialSopParamsConfig> {
paramsConfig: MaterialSopParamsConfig;
static type(): SopType;
protected initializeNode(): void;
private _operation;
cook(inputCoreGroups: CoreGroup[]): Promise<void>;
}
export {};