@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
86 lines (85 loc) • 6.05 kB
TypeScript
/**
* Creates a material for which you can write GLSL code
*
*
*/
import { ShaderMaterial } from 'three';
import { PrimitiveMatNode } from './_Base';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { AdvancedCommonControllers } from './utils/AdvancedCommonController';
import { UniformsTransparencyControllers } from './utils/UniformsTransparencyController';
import { WireframeShaderMaterialControllers } from './utils/WireframeShaderMaterialController';
import { FogControllers } from './utils/FogController';
import { Constructor } from '../../../types/GlobalTypes';
export declare const VERTEX_DEFAULT = "\nvarying vec3 vWorldPosition;\n\nvoid main() {\n\n\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n\tvWorldPosition = worldPosition.xyz;\n\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}";
interface CodeControllers extends AdvancedCommonControllers, FogControllers, UniformsTransparencyControllers, WireframeShaderMaterialControllers {
}
export declare function CodeParamConfig<TBase extends Constructor>(Base: TBase): {
new (...args: any[]): {
vertexShader: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
vertex: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
fragmentShader: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
fragment: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
extensions: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
clipCullDistance: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
multiDraw: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
};
} & TBase;
declare const CodeMatParamsConfig_base: {
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[]): {
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[]): {
advanced: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
};
} & {
new (...args: any[]): {
vertexShader: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
vertex: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
fragmentShader: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
fragment: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
extensions: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
clipCullDistance: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
multiDraw: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.BOOLEAN>;
};
} & typeof NodeParamsConfig;
declare class CodeMatParamsConfig extends CodeMatParamsConfig_base {
}
export declare class CodeMatNode extends PrimitiveMatNode<ShaderMaterial, CodeMatParamsConfig> {
paramsConfig: CodeMatParamsConfig;
static type(): string;
createMaterial(): ShaderMaterial;
readonly controllers: CodeControllers;
protected controllersList: any[];
cook(): Promise<void>;
}
export {};