@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
70 lines (69 loc) • 4.62 kB
TypeScript
/**
* Creates a Mesh Depth Material, which can be extended with GL nodes.
*
* @remarks
* This node can create children, which will be GL nodes. The GLSL code generated by the nodes will extend the Material.
*
*/
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { UniformsTransparencyControllers } from './utils/UniformsTransparencyController';
import { AdvancedCommonControllers } from './utils/AdvancedCommonController';
import { TypedBuilderMatNode } from './_BaseBuilder';
import { AssemblerName } from '../../poly/registers/assemblers/_BaseRegister';
import { Material } from 'three';
import { MeshDistanceMaterial } from 'three';
import { CustomMaterialName, IUniforms } from '../../../core/geometry/Material';
import { ShaderAssemblerCustomMeshDistance } from '../gl/code/assemblers/materials/custom/mesh/CustomMeshDistance';
import { MatType } from '../../poly/registers/nodes/types/Mat';
interface MeshDistanceBuilderControllers extends AdvancedCommonControllers, UniformsTransparencyControllers {
}
interface MeshDistanceBuilderMaterial extends MeshDistanceMaterial {
vertexShader: string;
fragmentShader: string;
uniforms: IUniforms;
customMaterials: {
[key in CustomMaterialName]?: Material;
};
}
declare const MeshDistanceBuilderMatParamsConfig_base: {
new (...args: any[]): {
doubleSided: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
front: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
overrideShadowSide: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
shadowDoubleSided: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
shadowFront: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
colorWrite: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
depthWrite: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
depthTest: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
premultipliedAlpha: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
blending: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
dithering: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
polygonOffset: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
polygonOffsetFactor: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
polygonOffsetUnits: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
};
} & {
new (...args: any[]): {
setBuilderNode: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
builderNode: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>;
};
} & {
new (...args: any[]): {
transparent: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
opacity: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
alphaTest: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
};
} & typeof NodeParamsConfig;
declare class MeshDistanceBuilderMatParamsConfig extends MeshDistanceBuilderMatParamsConfig_base {
}
export declare class MeshDistanceBuilderMatNode extends TypedBuilderMatNode<MeshDistanceBuilderMaterial, ShaderAssemblerCustomMeshDistance, MeshDistanceBuilderMatParamsConfig> {
paramsConfig: MeshDistanceBuilderMatParamsConfig;
static type(): MatType;
usedAssembler(): Readonly<AssemblerName.GL_MESH_DISTANCE>;
protected _createAssemblerController(): import("../gl/code/Controller").GlAssemblerController<import("../gl/code/assemblers/materials/custom/mesh/CustomMeshDistance").ShaderAssemblerCustomMeshDistanceForRender> | undefined;
customMaterialRequested(customName: CustomMaterialName): boolean;
readonly controllers: MeshDistanceBuilderControllers;
protected controllersList: any[];
cook(): Promise<void>;
}
export {};