polygonjs-engine
Version:
node-based webgl 3D engine https://polygonjs.com
41 lines (40 loc) • 2.83 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';
declare class MaterialSopParamsConfig extends NodeParamsConfig {
/** @param group to assign the material to */
group: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>;
/** @param toggle on to assign the new material */
assignMat: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param the material node */
material: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.NODE_PATH>;
/** @param toggle on to also assign the material to children */
applyToChildren: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @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("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param while cloning the material, you may only want to change basic properties (such as depthWrite or trasparent), but you would want to still use the same uniforms */
shareUniforms: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param swap one texture with another */
swapCurrentTex: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.BOOLEAN>;
/** @param texture to swap */
texSrc0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>;
/** @param texture to swap */
texDest0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.STRING>;
}
export declare class MaterialSopNode extends TypedSopNode<MaterialSopParamsConfig> {
params_config: MaterialSopParamsConfig;
static type(): string;
static displayedInputNames(): string[];
initializeNode(): void;
private _operation;
cook(input_contents: CoreGroup[]): Promise<void>;
}
export {};