UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

129 lines (128 loc) 8.17 kB
/** * Creates a Mesh Basic 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 { TextureMapControllers } from './utils/TextureMapController'; import { TextureAlphaMapControllers } from './utils/TextureAlphaMapController'; import { ShaderAssemblerBasic } from '../gl/code/assemblers/materials/Basic'; import { TypedBuilderMatNode } from './_BaseBuilder'; import { TextureAOMapControllers } from './utils/TextureAOMapController'; import { AssemblerName } from '../../poly/registers/assemblers/_BaseRegister'; import { UniformFogControllers } from './utils/UniformsFogController'; import { WireframeShaderMaterialControllers } from './utils/WireframeShaderMaterialController'; import { TextureEnvMapSimpleControllers } from './utils/TextureEnvMapSimpleController'; import { Material } from 'three'; import { MeshBasicMaterial } from 'three'; import { CustomMaterialName, IUniforms } from '../../../core/geometry/Material'; import { GlAssemblerController } from '../gl/code/Controller'; import { MatType } from '../../poly/registers/nodes/types/Mat'; interface MeshBasicBuilderControllers extends AdvancedCommonControllers, UniformFogControllers, TextureAlphaMapControllers, TextureAOMapControllers, TextureEnvMapSimpleControllers, TextureMapControllers, UniformsTransparencyControllers, WireframeShaderMaterialControllers { } interface MeshBasicBuilderMaterial extends MeshBasicMaterial { vertexShader: string; fragmentShader: string; uniforms: IUniforms; customMaterials: { [key in CustomMaterialName]?: Material; }; } declare const MeshBasicBuilderMatParamsConfig_base: { new (...args: any[]): { overrideCustomMaterials: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; createCustomMatDistance: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; createCustomMatDepth: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; createCustomMatDepthDOF: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; }; } & { new (...args: any[]): { useFog: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; }; } & { new (...args: any[]): { wireframe: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; wireframeLinewidth: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; }; } & { 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[]): { advanced: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>; }; } & { new (...args: any[]): { useEnvMap: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; envMap: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>; combine: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>; reflectivity: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; refractionRatio: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; }; } & { new (...args: any[]): { useAOMap: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; aoMap: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>; aoMapIntensity: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>; }; } & { new (...args: any[]): { useAlphaMap: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; alphaMap: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>; }; } & { new (...args: any[]): { useMap: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>; map: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.NODE_PATH>; }; } & { new (...args: any[]): { textures: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>; }; } & { 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>; }; } & { new (...args: any[]): { default: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>; }; } & typeof NodeParamsConfig; declare class MeshBasicBuilderMatParamsConfig extends MeshBasicBuilderMatParamsConfig_base { } export declare class MeshBasicBuilderMatNode extends TypedBuilderMatNode<MeshBasicBuilderMaterial, ShaderAssemblerBasic, MeshBasicBuilderMatParamsConfig> { paramsConfig: MeshBasicBuilderMatParamsConfig; static type(): MatType; usedAssembler(): Readonly<AssemblerName.GL_MESH_BASIC>; protected _createAssemblerController(): GlAssemblerController<ShaderAssemblerBasic> | undefined; customMaterialRequested(customName: CustomMaterialName): boolean; readonly controllers: MeshBasicBuilderControllers; protected controllersList: any[]; cook(): Promise<void>; } export {};