@types/three 0.143.2 → 0.146.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- three/README.md +1 -1
- three/examples/jsm/animation/CCDIKSolver.d.ts +2 -1
- three/examples/jsm/animation/MMDPhysics.d.ts +6 -1
- three/examples/jsm/controls/FirstPersonControls.d.ts +4 -1
- three/examples/jsm/csm/CSM.d.ts +1 -1
- three/examples/jsm/csm/CSMHelper.d.ts +1 -0
- three/examples/jsm/environments/RoomEnvironment.d.ts +1 -0
- three/examples/jsm/helpers/OctreeHelper.d.ts +3 -0
- three/examples/jsm/helpers/VertexNormalsHelper.d.ts +2 -0
- three/examples/jsm/helpers/VertexTangentsHelper.d.ts +2 -0
- three/examples/jsm/interactive/SelectionHelper.d.ts +1 -3
- three/examples/jsm/libs/stats.module.d.ts +1 -1
- three/examples/jsm/loaders/PCDLoader.d.ts +1 -1
- three/examples/jsm/loaders/RGBELoader.d.ts +0 -1
- three/examples/jsm/loaders/TIFFLoader.d.ts +16 -0
- three/examples/jsm/loaders/USDZLoader.d.ts +18 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
- three/examples/jsm/math/ColorConverter.d.ts +0 -2
- three/examples/jsm/misc/GPUComputationRenderer.d.ts +1 -0
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -2
- three/examples/jsm/misc/Volume.d.ts +1 -1
- three/examples/jsm/modifiers/CurveModifier.d.ts +6 -6
- three/examples/jsm/nodes/Nodes.d.ts +21 -3
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +1 -6
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +2 -0
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
- three/examples/jsm/nodes/core/CodeNode.d.ts +2 -2
- three/examples/jsm/nodes/core/FunctionCallNode.d.ts +5 -5
- three/examples/jsm/nodes/core/FunctionNode.d.ts +6 -4
- three/examples/jsm/nodes/core/Node.d.ts +1 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +4 -3
- three/examples/jsm/nodes/core/NodeUtils.d.ts +1 -0
- three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
- three/examples/jsm/nodes/core/constants.d.ts +13 -13
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
- three/examples/jsm/nodes/materials/Materials.d.ts +8 -6
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +4 -0
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +6 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +1 -2
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +2 -2
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +10 -8
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +49 -9
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +30 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +6 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
- three/examples/jsm/objects/ReflectorForSSRPass.d.ts +4 -4
- three/examples/jsm/postprocessing/BloomPass.d.ts +1 -1
- three/examples/jsm/postprocessing/BokehPass.d.ts +0 -2
- three/examples/jsm/postprocessing/EffectComposer.d.ts +1 -0
- three/examples/jsm/postprocessing/Pass.d.ts +2 -0
- three/examples/jsm/postprocessing/SSRPass.d.ts +3 -3
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +15 -3
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +6 -6
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +1 -1
- three/examples/jsm/shaders/AfterimageShader.d.ts +4 -4
- three/examples/jsm/shaders/BleachBypassShader.d.ts +3 -3
- three/examples/jsm/shaders/BlendShader.d.ts +5 -5
- three/examples/jsm/shaders/BokehShader.d.ts +9 -9
- three/examples/jsm/shaders/BokehShader2.d.ts +26 -26
- three/examples/jsm/shaders/BrightnessContrastShader.d.ts +4 -4
- three/examples/jsm/shaders/ColorCorrectionShader.d.ts +5 -5
- three/examples/jsm/shaders/ColorifyShader.d.ts +3 -3
- three/examples/jsm/shaders/ConvolutionShader.d.ts +4 -4
- three/examples/jsm/shaders/CopyShader.d.ts +3 -3
- three/examples/jsm/shaders/DOFMipMapShader.d.ts +5 -5
- three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +9 -9
- three/examples/jsm/shaders/DigitalGlitch.d.ts +12 -12
- three/examples/jsm/shaders/DotScreenShader.d.ts +6 -6
- three/examples/jsm/shaders/FXAAShader.d.ts +3 -3
- three/examples/jsm/shaders/FilmShader.d.ts +7 -7
- three/examples/jsm/shaders/FocusShader.d.ts +6 -6
- three/examples/jsm/shaders/FreiChenShader.d.ts +3 -3
- three/examples/jsm/shaders/GammaCorrectionShader.d.ts +2 -2
- three/examples/jsm/shaders/GodRaysShader.d.ts +12 -12
- three/examples/jsm/shaders/HalftoneShader.d.ts +14 -14
- three/examples/jsm/shaders/HorizontalBlurShader.d.ts +3 -3
- three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +4 -4
- three/examples/jsm/shaders/HueSaturationShader.d.ts +4 -4
- three/examples/jsm/shaders/KaleidoShader.d.ts +4 -4
- three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +6 -6
- three/examples/jsm/shaders/LuminosityShader.d.ts +2 -2
- three/examples/jsm/shaders/MirrorShader.d.ts +3 -3
- three/examples/jsm/shaders/NormalMapShader.d.ts +5 -5
- three/examples/jsm/shaders/PixelShader.d.ts +4 -4
- three/examples/jsm/shaders/RGBShiftShader.d.ts +4 -4
- three/examples/jsm/shaders/SAOShader.d.ts +15 -15
- three/examples/jsm/shaders/SMAAShader.d.ts +10 -10
- three/examples/jsm/shaders/SSAOShader.d.ts +19 -19
- three/examples/jsm/shaders/SepiaShader.d.ts +3 -3
- three/examples/jsm/shaders/SobelOperatorShader.d.ts +3 -3
- three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +30 -30
- three/examples/jsm/shaders/TechnicolorShader.d.ts +2 -2
- three/examples/jsm/shaders/ToneMapShader.d.ts +7 -7
- three/examples/jsm/shaders/ToonShader.d.ts +26 -26
- three/examples/jsm/shaders/TriangleBlurShader.d.ts +3 -3
- three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +3 -3
- three/examples/jsm/shaders/VelocityShader.d.ts +13 -0
- three/examples/jsm/shaders/VerticalBlurShader.d.ts +3 -3
- three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +4 -4
- three/examples/jsm/shaders/VignetteShader.d.ts +4 -4
- three/examples/jsm/shaders/VolumeShader.d.ts +7 -7
- three/examples/jsm/shaders/WaterRefractionShader.d.ts +6 -6
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +1 -0
- three/examples/jsm/utils/CameraUtils.d.ts +1 -1
- three/examples/jsm/utils/SceneUtils.d.ts +9 -1
- three/index.d.ts +1 -1
- three/package.json +3 -3
- three/src/Three.d.ts +3 -1
- three/src/constants.d.ts +0 -5
- three/src/core/BufferAttribute.d.ts +0 -4
- three/src/core/BufferGeometry.d.ts +0 -1
- three/src/core/Object3D.d.ts +11 -2
- three/src/extras/core/ShapePath.d.ts +1 -1
- three/src/geometries/BoxGeometry.d.ts +0 -2
- three/src/geometries/CapsuleGeometry.d.ts +0 -2
- three/src/geometries/CircleGeometry.d.ts +0 -2
- three/src/geometries/ConeGeometry.d.ts +0 -2
- three/src/geometries/CylinderGeometry.d.ts +0 -2
- three/src/geometries/DodecahedronGeometry.d.ts +0 -2
- three/src/geometries/ExtrudeGeometry.d.ts +0 -2
- three/src/geometries/IcosahedronGeometry.d.ts +0 -2
- three/src/geometries/LatheGeometry.d.ts +0 -2
- three/src/geometries/OctahedronGeometry.d.ts +0 -2
- three/src/geometries/PlaneGeometry.d.ts +0 -2
- three/src/geometries/PolyhedronGeometry.d.ts +0 -2
- three/src/geometries/RingGeometry.d.ts +0 -2
- three/src/geometries/ShapeGeometry.d.ts +0 -2
- three/src/geometries/SphereGeometry.d.ts +0 -2
- three/src/geometries/TetrahedronGeometry.d.ts +0 -2
- three/src/geometries/TorusGeometry.d.ts +0 -2
- three/src/geometries/TorusKnotGeometry.d.ts +0 -2
- three/src/geometries/TubeGeometry.d.ts +0 -2
- three/src/helpers/ArrowHelper.d.ts +4 -0
- three/src/helpers/Box3Helper.d.ts +2 -0
- three/src/helpers/BoxHelper.d.ts +2 -0
- three/src/helpers/GridHelper.d.ts +1 -4
- three/src/helpers/PlaneHelper.d.ts +2 -0
- three/src/helpers/PolarGridHelper.d.ts +2 -0
- three/src/helpers/SkeletonHelper.d.ts +2 -0
- three/src/loaders/DataTextureLoader.d.ts +1 -1
- three/src/materials/LineBasicMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +52 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +5 -0
- three/src/materials/ShaderMaterial.d.ts +1 -1
- three/src/math/ColorManagement.d.ts +11 -1
- three/src/math/Euler.d.ts +13 -11
- three/src/math/Quaternion.d.ts +10 -6
- three/src/renderers/WebGL3DRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLArrayRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLCubeRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLMultipleRenderTargets.d.ts +1 -1
- three/src/renderers/WebGLRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLRenderer.d.ts +1 -5
- three/src/renderers/shaders/UniformsLib.d.ts +3 -2
- three/src/renderers/shaders/UniformsUtils.d.ts +0 -1
- three/src/renderers/webgl/WebGLCapabilities.d.ts +1 -0
- three/src/scenes/Scene.d.ts +2 -5
- three/src/textures/CanvasTexture.d.ts +2 -2
- three/src/textures/CompressedArrayTexture.d.ts +17 -0
- three/src/textures/Texture.d.ts +5 -1
- three/examples/jsm/nodes/core/NodeVary.d.ts +0 -6
- three/examples/jsm/renderers/webgl/nodes/WebGLPhysicalContextNode.d.ts +0 -13
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import NodeMaterial from '
|
|
2
|
-
import LineBasicNodeMaterial from '
|
|
3
|
-
import MeshBasicNodeMaterial from '
|
|
4
|
-
import MeshStandardNodeMaterial from '
|
|
5
|
-
import PointsNodeMaterial from '
|
|
6
|
-
import SpriteNodeMaterial from '
|
|
1
|
+
import NodeMaterial from './NodeMaterial';
|
|
2
|
+
import LineBasicNodeMaterial from './LineBasicNodeMaterial';
|
|
3
|
+
import MeshBasicNodeMaterial from './MeshBasicNodeMaterial';
|
|
4
|
+
import MeshStandardNodeMaterial from './MeshStandardNodeMaterial';
|
|
5
|
+
import PointsNodeMaterial from './PointsNodeMaterial';
|
|
6
|
+
import SpriteNodeMaterial from './SpriteNodeMaterial';
|
|
7
|
+
import MeshPhysicalNodeMaterial from './MeshPhysicalNodeMaterial';
|
|
7
8
|
|
|
8
9
|
export {
|
|
9
10
|
NodeMaterial,
|
|
10
11
|
LineBasicNodeMaterial,
|
|
11
12
|
MeshBasicNodeMaterial,
|
|
13
|
+
MeshPhysicalNodeMaterial,
|
|
12
14
|
MeshStandardNodeMaterial,
|
|
13
15
|
PointsNodeMaterial,
|
|
14
16
|
SpriteNodeMaterial,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ShaderMaterialParameters } from '../../../../src/Three';
|
|
2
|
+
import { Swizzable, CheckerNode, Node } from '../Nodes';
|
|
3
|
+
|
|
4
|
+
import MeshStandardNodeMaterial from './MeshStandardNodeMaterial';
|
|
5
|
+
|
|
6
|
+
export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial {
|
|
7
|
+
iridescenceNode: null | Swizzable<CheckerNode>;
|
|
8
|
+
iridescenceIORNode: null | Swizzable;
|
|
9
|
+
iridescenceThicknessNode: null | Swizzable;
|
|
10
|
+
|
|
11
|
+
specularIntensityNode: Node | null;
|
|
12
|
+
specularColorNode: Node | null;
|
|
13
|
+
|
|
14
|
+
transmissionNode: Node | null;
|
|
15
|
+
thicknessNode: Node | null;
|
|
16
|
+
attenuationDistanceNode: Node | null;
|
|
17
|
+
attenuationColorNode: Node | null;
|
|
18
|
+
|
|
19
|
+
constructor(parameters: ShaderMaterialParameters);
|
|
20
|
+
|
|
21
|
+
copy(source: MeshPhysicalNodeMaterial): this;
|
|
22
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { mx_hsvtorgb, mx_rgbtohsv } from './lib/mx_hsv';
|
|
2
|
+
import { Swizzable } from '../shadernode/ShaderNodeElements';
|
|
3
|
+
import { UVNode, MathNode } from '../Nodes';
|
|
4
|
+
import { NodeRepresentation } from '../shadernode/ShaderNode';
|
|
5
|
+
|
|
6
|
+
export function mx_aastep(threshold?: NodeRepresentation, value?: NodeRepresentation): Swizzable<MathNode>;
|
|
7
|
+
|
|
8
|
+
export function mx_ramplr(
|
|
9
|
+
valuel?: NodeRepresentation,
|
|
10
|
+
valuer?: NodeRepresentation,
|
|
11
|
+
texcoord?: Swizzable<UVNode>,
|
|
12
|
+
): Swizzable<MathNode>;
|
|
13
|
+
export function mx_ramptb(
|
|
14
|
+
valuet?: NodeRepresentation,
|
|
15
|
+
valueb?: NodeRepresentation,
|
|
16
|
+
texcoord?: Swizzable<UVNode>,
|
|
17
|
+
): Swizzable<MathNode>;
|
|
18
|
+
|
|
19
|
+
export function mx_splitlr(
|
|
20
|
+
valuel?: NodeRepresentation,
|
|
21
|
+
valuer?: NodeRepresentation,
|
|
22
|
+
center?: NodeRepresentation,
|
|
23
|
+
texcoord?: Swizzable<UVNode>,
|
|
24
|
+
): Swizzable<MathNode>;
|
|
25
|
+
export function mx_splittb(
|
|
26
|
+
valuet?: NodeRepresentation,
|
|
27
|
+
valueb?: NodeRepresentation,
|
|
28
|
+
center?: NodeRepresentation,
|
|
29
|
+
texcoord?: Swizzable<UVNode>,
|
|
30
|
+
): Swizzable<MathNode>;
|
|
31
|
+
|
|
32
|
+
export function mx_transform_uv(
|
|
33
|
+
uv_scale?: NodeRepresentation,
|
|
34
|
+
uv_offset?: NodeRepresentation,
|
|
35
|
+
uv_geo?: Swizzable<UVNode>,
|
|
36
|
+
): Swizzable;
|
|
37
|
+
|
|
38
|
+
export function mx_noise_float(
|
|
39
|
+
texcoord?: Swizzable<UVNode>,
|
|
40
|
+
amplitude?: NodeRepresentation,
|
|
41
|
+
pivot?: NodeRepresentation,
|
|
42
|
+
): Swizzable;
|
|
43
|
+
export function mx_noise_vec2(
|
|
44
|
+
texcoord?: Swizzable<UVNode>,
|
|
45
|
+
amplitude?: NodeRepresentation,
|
|
46
|
+
pivot?: NodeRepresentation,
|
|
47
|
+
): Swizzable;
|
|
48
|
+
export function mx_noise_vec3(
|
|
49
|
+
texcoord?: Swizzable<UVNode>,
|
|
50
|
+
amplitude?: NodeRepresentation,
|
|
51
|
+
pivot?: NodeRepresentation,
|
|
52
|
+
): Swizzable;
|
|
53
|
+
export function mx_noise_vec4(
|
|
54
|
+
texcoord?: Swizzable<UVNode>,
|
|
55
|
+
amplitude?: NodeRepresentation,
|
|
56
|
+
pivot?: NodeRepresentation,
|
|
57
|
+
): Swizzable;
|
|
58
|
+
|
|
59
|
+
export function mx_worley_noise_float(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
|
|
60
|
+
export function mx_worley_noise_vec2(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
|
|
61
|
+
export function mx_worley_noise_vec3(texcoord?: Swizzable<UVNode>, jitter?: NodeRepresentation): Swizzable;
|
|
62
|
+
|
|
63
|
+
export function mx_cell_noise_float(texcoord?: Swizzable<UVNode>): Swizzable;
|
|
64
|
+
|
|
65
|
+
export function mx_fractal_noise_float(
|
|
66
|
+
position?: Swizzable<UVNode>,
|
|
67
|
+
octaves?: NodeRepresentation,
|
|
68
|
+
lacunarity?: NodeRepresentation,
|
|
69
|
+
diminish?: NodeRepresentation,
|
|
70
|
+
amplitude?: NodeRepresentation,
|
|
71
|
+
): Swizzable;
|
|
72
|
+
export function mx_fractal_noise_vec2(
|
|
73
|
+
position?: Swizzable<UVNode>,
|
|
74
|
+
octaves?: NodeRepresentation,
|
|
75
|
+
lacunarity?: NodeRepresentation,
|
|
76
|
+
diminish?: NodeRepresentation,
|
|
77
|
+
amplitude?: NodeRepresentation,
|
|
78
|
+
): Swizzable;
|
|
79
|
+
export function mx_fractal_noise_vec3(
|
|
80
|
+
position?: Swizzable<UVNode>,
|
|
81
|
+
octaves?: NodeRepresentation,
|
|
82
|
+
lacunarity?: NodeRepresentation,
|
|
83
|
+
diminish?: NodeRepresentation,
|
|
84
|
+
amplitude?: NodeRepresentation,
|
|
85
|
+
): Swizzable;
|
|
86
|
+
export function mx_fractal_noise_vec4(
|
|
87
|
+
position?: Swizzable<UVNode>,
|
|
88
|
+
octaves?: NodeRepresentation,
|
|
89
|
+
lacunarity?: NodeRepresentation,
|
|
90
|
+
diminish?: NodeRepresentation,
|
|
91
|
+
amplitude?: NodeRepresentation,
|
|
92
|
+
): Swizzable;
|
|
93
|
+
|
|
94
|
+
export { mx_hsvtorgb, mx_rgbtohsv };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Fn, Node, Swizzable } from '../../Nodes';
|
|
2
|
+
|
|
3
|
+
export function mx_perlin_noise_float(...params: Fn<[Node]>): Swizzable;
|
|
4
|
+
export function mx_cell_noise_float(...params: Fn<[Node]>): Swizzable;
|
|
5
|
+
export function mx_worley_noise_float(...params: Fn<[Node]>): Swizzable;
|
|
6
|
+
export function mx_fractal_noise_float(...params: Fn<[Node, Node, Node, Node]>): Swizzable;
|
|
@@ -27,7 +27,6 @@ export type MathNodeMethod1 =
|
|
|
27
27
|
| typeof MathNode.INVERT
|
|
28
28
|
| typeof MathNode.DFDX
|
|
29
29
|
| typeof MathNode.DFDY
|
|
30
|
-
| typeof MathNode.SATURATE
|
|
31
30
|
| typeof MathNode.ROUND;
|
|
32
31
|
|
|
33
32
|
export type MathNodeMethod2 =
|
|
@@ -80,8 +79,8 @@ export default class MathNode extends TempNode {
|
|
|
80
79
|
static INVERT: 'invert';
|
|
81
80
|
static DFDX: 'dFdx';
|
|
82
81
|
static DFDY: 'dFdy';
|
|
83
|
-
static SATURATE: 'saturate';
|
|
84
82
|
static ROUND: 'round';
|
|
83
|
+
static RECIPROCAL: 'reciprocal';
|
|
85
84
|
|
|
86
85
|
// 2 inputs
|
|
87
86
|
|
|
@@ -7,17 +7,19 @@ export type Swizzable<T extends Node = Node> = T &
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
/** anything that can be passed to {@link nodeObject} and returns a proxy */
|
|
10
|
-
export type NodeRepresentation = number | boolean | Node | Swizzable
|
|
10
|
+
export type NodeRepresentation<T extends Node = Node> = number | boolean | Node | Swizzable<T>;
|
|
11
11
|
|
|
12
12
|
/** anything that can be passed to {@link nodeObject} */
|
|
13
13
|
export type NodeObjectOption = NodeRepresentation | string;
|
|
14
14
|
|
|
15
|
-
// same logic as in ShaderNodeObject
|
|
15
|
+
// same logic as in ShaderNodeObject: number,boolean,node->swizzable, otherwise do nothing
|
|
16
16
|
export type NodeObject<T> = T extends Node ? Swizzable<T> : T extends number | boolean ? Swizzable<ConstNode> : T;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// opposite of NodeObject: node -> node|swizzable|boolean|number, otherwise do nothing
|
|
19
|
+
type Proxied<T> = T extends Node ? NodeRepresentation<T> : T;
|
|
19
20
|
// https://github.com/microsoft/TypeScript/issues/42435#issuecomment-765557874
|
|
20
|
-
type
|
|
21
|
+
export type ProxiedTuple<T extends readonly [...unknown[]]> = [...{ [index in keyof T]: Proxied<T[index]> }];
|
|
22
|
+
export type ProxiedObject<T> = { [index in keyof T]: Proxied<T[index]> };
|
|
21
23
|
type RemoveTail<T extends readonly [...unknown[]]> = T extends [unknown, ...infer X] ? X : [];
|
|
22
24
|
type RemoveHeadAndTail<T extends readonly [...unknown[]]> = T extends [unknown, ...infer X, unknown] ? X : [];
|
|
23
25
|
|
|
@@ -121,22 +123,22 @@ export function nodeArray<T extends NodeObjectOption[]>(obj: readonly [...T]): N
|
|
|
121
123
|
|
|
122
124
|
export function nodeProxy<T>(
|
|
123
125
|
nodeClass: T,
|
|
124
|
-
): (...params:
|
|
126
|
+
): (...params: ProxiedTuple<GetConstructors<T>>) => Swizzable<ConstructedNode<T>>;
|
|
125
127
|
|
|
126
128
|
export function nodeProxy<T, S extends GetPossibleScopes<T>>(
|
|
127
129
|
nodeClass: T,
|
|
128
130
|
scope: S,
|
|
129
|
-
): (...params:
|
|
131
|
+
): (...params: ProxiedTuple<RemoveTail<GetConstructorsByScope<T, S>>>) => Swizzable<ConstructedNode<T>>;
|
|
130
132
|
|
|
131
133
|
export function nodeProxy<T, S extends GetPossibleScopes<T>>(
|
|
132
134
|
nodeClass: T,
|
|
133
135
|
scope: S,
|
|
134
136
|
factor: NodeObjectOption,
|
|
135
|
-
): (...params:
|
|
137
|
+
): (...params: ProxiedTuple<RemoveHeadAndTail<GetConstructorsByScope<T, S>>>) => Swizzable<ConstructedNode<T>>;
|
|
136
138
|
|
|
137
139
|
export function nodeImmutable<T>(
|
|
138
140
|
nodeClass: T,
|
|
139
|
-
...params:
|
|
141
|
+
...params: ProxiedTuple<GetConstructors<T>>
|
|
140
142
|
): Swizzable<ConstructedNode<T>>;
|
|
141
143
|
|
|
142
144
|
export class ShaderNode<T = {}, R extends Node = Node> {
|
|
@@ -13,22 +13,26 @@ import {
|
|
|
13
13
|
Swizzable,
|
|
14
14
|
NodeRepresentation,
|
|
15
15
|
NodeOrType,
|
|
16
|
+
ProxiedObject,
|
|
17
|
+
ProxiedTuple,
|
|
16
18
|
} from './ShaderNode';
|
|
17
19
|
import { Material, Texture } from '../../../../src/Three';
|
|
18
20
|
import { NodeTypeOption, NodeUserData, NodeValueOption } from '../core/constants';
|
|
19
21
|
import { NodeBuilderContext } from '../core/NodeBuilder';
|
|
20
22
|
import {
|
|
23
|
+
BitangentNode,
|
|
21
24
|
BufferNode,
|
|
22
25
|
BypassNode,
|
|
23
26
|
CameraNode,
|
|
24
27
|
CodeNode,
|
|
28
|
+
CodeNodeInclude,
|
|
25
29
|
ComputeNode,
|
|
26
30
|
ContextNode,
|
|
27
|
-
ConvertNode,
|
|
28
31
|
ExpressionNode,
|
|
29
32
|
FrontFacingNode,
|
|
30
33
|
FunctionCallNode,
|
|
31
34
|
FunctionNode,
|
|
35
|
+
FunctionNodeArguments,
|
|
32
36
|
InstanceIndexNode,
|
|
33
37
|
MaterialNode,
|
|
34
38
|
MaterialReferenceNode,
|
|
@@ -40,6 +44,7 @@ import {
|
|
|
40
44
|
PositionNode,
|
|
41
45
|
PropertyNode,
|
|
42
46
|
ReferenceNode,
|
|
47
|
+
TangentNode,
|
|
43
48
|
UserDataNode,
|
|
44
49
|
UVNode,
|
|
45
50
|
VarNode,
|
|
@@ -83,22 +88,39 @@ export const imat4: ConvertType;
|
|
|
83
88
|
export const umat4: ConvertType;
|
|
84
89
|
export const bmat4: ConvertType;
|
|
85
90
|
|
|
86
|
-
export function func(code: string): ShaderNode<FunctionNode>;
|
|
87
|
-
|
|
88
91
|
export function uniform(nodeOrType: Node | Swizzable | NodeValueOption): Swizzable;
|
|
89
92
|
|
|
90
93
|
export function attribute(attributeName: string, nodeType: NodeTypeOption): Swizzable;
|
|
91
94
|
export function property(name: string, nodeOrType: Node | NodeTypeOption): Swizzable;
|
|
92
95
|
|
|
96
|
+
export function convert(node: NodeRepresentation, types: NodeTypeOption): Swizzable;
|
|
97
|
+
|
|
93
98
|
export function bypass(returnNode: NodeRepresentation, callNode: NodeRepresentation): Swizzable<BypassNode>;
|
|
94
99
|
export function code(code: string, nodeType?: NodeTypeOption): Swizzable<CodeNode>;
|
|
95
100
|
export function context(node: NodeRepresentation, context: NodeBuilderContext): Swizzable<ContextNode>;
|
|
96
101
|
export function expression(snipped?: string, nodeType?: NodeTypeOption): Swizzable<ExpressionNode>;
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
// definition: const call = nodeProxy(FunctionCallNode);
|
|
104
|
+
export function call<P extends FunctionNodeArguments>(
|
|
105
|
+
functionNode?: FunctionNode<P>,
|
|
106
|
+
parameters?: ProxiedObject<P>,
|
|
107
|
+
): Swizzable<FunctionCallNode<P>>;
|
|
108
|
+
|
|
109
|
+
export type Fn<P extends FunctionNodeArguments> = P extends readonly [...unknown[]]
|
|
110
|
+
? ProxiedTuple<P>
|
|
111
|
+
: readonly [ProxiedObject<P>];
|
|
112
|
+
|
|
113
|
+
// tslint:disable:no-unnecessary-generics
|
|
114
|
+
export function func<P extends FunctionNodeArguments>(
|
|
115
|
+
code: string,
|
|
116
|
+
includes?: CodeNodeInclude[],
|
|
117
|
+
): { call: (...params: Fn<P>) => Swizzable };
|
|
118
|
+
|
|
119
|
+
export function fn<P extends FunctionNodeArguments>(
|
|
120
|
+
code: string,
|
|
121
|
+
includes?: CodeNodeInclude[],
|
|
122
|
+
): (...params: Fn<P>) => Swizzable;
|
|
123
|
+
// tslint:enable:no-unnecessary-generics
|
|
102
124
|
|
|
103
125
|
export const instanceIndex: Swizzable<InstanceIndexNode>;
|
|
104
126
|
export function label(node: NodeRepresentation, name?: string): Swizzable<VarNode>;
|
|
@@ -146,6 +168,20 @@ export const normalWorld: Swizzable<NormalNode>;
|
|
|
146
168
|
export const normalView: Swizzable<NormalNode>;
|
|
147
169
|
export const transformedNormalView: Swizzable<VarNode>;
|
|
148
170
|
|
|
171
|
+
export const tangentGeometry: Swizzable<TangentNode>;
|
|
172
|
+
export const tangentLocal: Swizzable<TangentNode>;
|
|
173
|
+
export const tangentView: Swizzable<TangentNode>;
|
|
174
|
+
export const tangentWorld: Swizzable<TangentNode>;
|
|
175
|
+
export const transformedTangentView: Swizzable<MathNode>;
|
|
176
|
+
export const transformedTangentWorld: Swizzable<MathNode>;
|
|
177
|
+
|
|
178
|
+
export const bitangentGeometry: Swizzable<BitangentNode>;
|
|
179
|
+
export const bitangentLocal: Swizzable<BitangentNode>;
|
|
180
|
+
export const bitangentView: Swizzable<BitangentNode>;
|
|
181
|
+
export const bitangentWorld: Swizzable<BitangentNode>;
|
|
182
|
+
export const transformedBitangentView: Swizzable<MathNode>;
|
|
183
|
+
export const transformedBitangentWorld: Swizzable<MathNode>;
|
|
184
|
+
|
|
149
185
|
export const modelViewMatrix: Swizzable<ModelNode>;
|
|
150
186
|
export const modelNormalMatrix: Swizzable<ModelNode>;
|
|
151
187
|
export const modelWorldMatrix: Swizzable<ModelNode>;
|
|
@@ -155,6 +191,7 @@ export const modelViewPosition: Swizzable<ModelNode>;
|
|
|
155
191
|
export const positionGeometry: Swizzable<PositionNode>;
|
|
156
192
|
export const positionLocal: Swizzable<PositionNode>;
|
|
157
193
|
export const positionWorld: Swizzable<PositionNode>;
|
|
194
|
+
export const positionWorldDirection: Swizzable<PositionNode>;
|
|
158
195
|
export const positionView: Swizzable<PositionNode>;
|
|
159
196
|
export const positionViewDirection: Swizzable<PositionNode>;
|
|
160
197
|
|
|
@@ -228,8 +265,8 @@ export const negate: Unary;
|
|
|
228
265
|
export const invert: Unary;
|
|
229
266
|
export const dFdx: Unary;
|
|
230
267
|
export const dFdy: Unary;
|
|
231
|
-
export const saturate: Unary;
|
|
232
268
|
export const round: Unary;
|
|
269
|
+
export const reciprocal: Unary;
|
|
233
270
|
|
|
234
271
|
export const atan2: Binary;
|
|
235
272
|
export const min: Binary;
|
|
@@ -263,5 +300,8 @@ export const faceDirection: Swizzable;
|
|
|
263
300
|
export function element(node: NodeRepresentation, indexNode: NodeRepresentation): Swizzable;
|
|
264
301
|
|
|
265
302
|
// miscellaneous
|
|
303
|
+
export const lumaCoeffs: Swizzable<MathNode>;
|
|
304
|
+
export const luminance: Binary;
|
|
305
|
+
export const difference: Binary;
|
|
266
306
|
export const dotNV: Swizzable<MathNode>;
|
|
267
|
-
export const
|
|
307
|
+
export const TBNViewMatrix: Swizzable<MathNode>;
|
|
@@ -12,10 +12,12 @@ import {
|
|
|
12
12
|
} from '../../../../src/Three';
|
|
13
13
|
import LightingContextNode, { LightingModelNode } from '../lighting/LightingContextNode';
|
|
14
14
|
import {
|
|
15
|
+
BlendModeNode,
|
|
15
16
|
CheckerNode,
|
|
16
17
|
ColorAdjustmentNode,
|
|
17
18
|
ColorSpaceNode,
|
|
18
19
|
CubeTextureNode,
|
|
20
|
+
EquirectUVNode,
|
|
19
21
|
FogNode,
|
|
20
22
|
FogRangeNode,
|
|
21
23
|
InstanceNode,
|
|
@@ -24,12 +26,15 @@ import {
|
|
|
24
26
|
MaxMipLevelNode,
|
|
25
27
|
NormalMapNode,
|
|
26
28
|
OscNode,
|
|
29
|
+
PosterizeNode,
|
|
30
|
+
RemapNode,
|
|
27
31
|
ReflectVectorNode,
|
|
28
32
|
RotateUVNode,
|
|
29
33
|
SkinningNode,
|
|
30
34
|
SpriteSheetUVNode,
|
|
31
35
|
TimerNode,
|
|
32
36
|
ToneMappingNode,
|
|
37
|
+
TriplanarTexturesNode,
|
|
33
38
|
} from '../Nodes';
|
|
34
39
|
|
|
35
40
|
//
|
|
@@ -69,6 +74,11 @@ export function skinning(skinnedMesh: SkinnedMesh): Swizzable<SkinningNode>;
|
|
|
69
74
|
|
|
70
75
|
// display
|
|
71
76
|
|
|
77
|
+
export function burn(baseNode: NodeRepresentation, blendNode?: NodeRepresentation): Swizzable<BlendModeNode>;
|
|
78
|
+
export function dodge(baseNode: NodeRepresentation, blendNode?: NodeRepresentation): Swizzable<BlendModeNode>;
|
|
79
|
+
export function overlay(baseNode: NodeRepresentation, blendNode?: NodeRepresentation): Swizzable<BlendModeNode>;
|
|
80
|
+
export function screen(baseNode: NodeRepresentation, blendNode?: NodeRepresentation): Swizzable<BlendModeNode>;
|
|
81
|
+
|
|
72
82
|
export function saturation(
|
|
73
83
|
colorNode: NodeRepresentation,
|
|
74
84
|
adjustmentNode?: NodeRepresentation,
|
|
@@ -87,6 +97,8 @@ export function toneMapping(
|
|
|
87
97
|
color: NodeRepresentation,
|
|
88
98
|
): Swizzable<ToneMappingNode>;
|
|
89
99
|
|
|
100
|
+
export function posterize(sourceNode: NodeRepresentation, stepsNode: NodeRepresentation): Swizzable<PosterizeNode>;
|
|
101
|
+
|
|
90
102
|
// lighting
|
|
91
103
|
|
|
92
104
|
export function lights(lights: Light[]): Swizzable<LightsNode>;
|
|
@@ -95,6 +107,8 @@ export function lightingContext(node: Node, lightingModelNode?: LightingModelNod
|
|
|
95
107
|
// utils
|
|
96
108
|
|
|
97
109
|
export const matcapUV: Swizzable<MatcapUVNode>;
|
|
110
|
+
export const equirectUV: Swizzable<EquirectUVNode>;
|
|
111
|
+
|
|
98
112
|
export function maxMipLevel(texture: Texture): Swizzable<MaxMipLevelNode>;
|
|
99
113
|
|
|
100
114
|
export function oscSine(timeNode?: NodeRepresentation): Swizzable<OscNode>;
|
|
@@ -102,6 +116,9 @@ export function oscSquare(timeNode?: NodeRepresentation): Swizzable<OscNode>;
|
|
|
102
116
|
export function oscTriangle(timeNode?: NodeRepresentation): Swizzable<OscNode>;
|
|
103
117
|
export function oscSawtooth(timeNode?: NodeRepresentation): Swizzable<OscNode>;
|
|
104
118
|
|
|
119
|
+
export function remap(node: Node, inLowNode: Node): Swizzable<RemapNode>;
|
|
120
|
+
export function remapClamp(node: Node, inLowNode: Node): Swizzable<RemapNode>;
|
|
121
|
+
|
|
105
122
|
export function rotateUV(uvNode: Node, rotationNode: Node, centerNode?: Node): Swizzable<RotateUVNode>;
|
|
106
123
|
|
|
107
124
|
export function spritesheetUV(
|
|
@@ -113,6 +130,19 @@ export function spritesheetUV(
|
|
|
113
130
|
export function timerLocal(timeScale: number, value?: number): Swizzable<TimerNode>;
|
|
114
131
|
export function timerGlobal(timeScale: number, value?: number): Swizzable<TimerNode>;
|
|
115
132
|
export function timerDelta(timeScale: number, value?: number): Swizzable<TimerNode>;
|
|
133
|
+
export const frameId: Swizzable<TimerNode>;
|
|
134
|
+
export function triplanarTextures(
|
|
135
|
+
textureXNode: NodeRepresentation,
|
|
136
|
+
textureYNode?: NodeRepresentation,
|
|
137
|
+
textureZNode?: NodeRepresentation,
|
|
138
|
+
scaleNode?: NodeRepresentation,
|
|
139
|
+
positionNode?: NodeRepresentation,
|
|
140
|
+
normalNode?: NodeRepresentation,
|
|
141
|
+
): Swizzable<TriplanarTexturesNode>;
|
|
142
|
+
export function triplanarTexture(
|
|
143
|
+
texture: NodeRepresentation,
|
|
144
|
+
...params: NodeRepresentation[]
|
|
145
|
+
): Swizzable<TriplanarTexturesNode>;
|
|
116
146
|
|
|
117
147
|
// geometry
|
|
118
148
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Node from '../core/Node';
|
|
2
|
+
|
|
3
|
+
export default class RemapNode extends Node {
|
|
4
|
+
node: Node;
|
|
5
|
+
inLowNode: Node;
|
|
6
|
+
inHighNode: Node;
|
|
7
|
+
outLowNode: Node;
|
|
8
|
+
outHighNode: Node;
|
|
9
|
+
|
|
10
|
+
doClamp: boolean;
|
|
11
|
+
|
|
12
|
+
constructor(node: Node, inLowNode: Node, inHighNode: Node, outLowNode: Node, outHighNode: Node);
|
|
13
|
+
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import UniformNode from '../core/UniformNode';
|
|
2
2
|
|
|
3
|
-
export type TimerNodeScope =
|
|
3
|
+
export type TimerNodeScope =
|
|
4
|
+
| typeof TimerNode.LOCAL
|
|
5
|
+
| typeof TimerNode.GLOBAL
|
|
6
|
+
| typeof TimerNode.DELTA
|
|
7
|
+
| typeof TimerNode.FRAME;
|
|
4
8
|
|
|
5
9
|
export default class TimerNode extends UniformNode {
|
|
6
10
|
static LOCAL: 'local';
|
|
7
11
|
static GLOBAL: 'global';
|
|
8
12
|
static DELTA: 'delta';
|
|
13
|
+
static FRAME: 'frame';
|
|
9
14
|
|
|
10
15
|
scope: TimerNodeScope;
|
|
11
16
|
scale: number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Node from '../core/Node';
|
|
2
|
+
import { PositionNode, Swizzable, TextureNode } from '../Nodes';
|
|
3
|
+
|
|
4
|
+
export default class TriplanarTexturesNode extends Node {
|
|
5
|
+
textureXNode: TextureNode;
|
|
6
|
+
textureYNode: TextureNode | null;
|
|
7
|
+
textureZNode: TextureNode | null;
|
|
8
|
+
|
|
9
|
+
scaleNode: Swizzable;
|
|
10
|
+
|
|
11
|
+
positionNode: Swizzable<PositionNode>;
|
|
12
|
+
normalNode: Swizzable<PositionNode>;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
textureXNode: Node,
|
|
16
|
+
textureYNode?: TextureNode | null,
|
|
17
|
+
textureZNode?: TextureNode | null,
|
|
18
|
+
scaleNode?: Swizzable,
|
|
19
|
+
positionNode?: Swizzable<PositionNode>,
|
|
20
|
+
normalNode?: Swizzable<PositionNode>,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -21,7 +21,7 @@ export interface ReflectorShader {
|
|
|
21
21
|
fragmentShader: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export interface
|
|
24
|
+
export interface ReflectorForSSRPassOptions {
|
|
25
25
|
clipBias?: number | undefined;
|
|
26
26
|
textureWidth?: number | undefined;
|
|
27
27
|
textureHeight?: number | undefined;
|
|
@@ -30,9 +30,9 @@ export interface ReflectorOptions {
|
|
|
30
30
|
shader?: ReflectorShader | undefined;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export class
|
|
33
|
+
export class ReflectorForSSRPass<TGeometry extends BufferGeometry = BufferGeometry> extends Mesh<TGeometry> {
|
|
34
34
|
type: 'ReflectorForSSRPass';
|
|
35
|
-
options:
|
|
35
|
+
options: ReflectorForSSRPassOptions;
|
|
36
36
|
|
|
37
37
|
static ReflectorShader: ReflectorShader;
|
|
38
38
|
|
|
@@ -49,7 +49,7 @@ export class Reflector<TGeometry extends BufferGeometry = BufferGeometry> extend
|
|
|
49
49
|
|
|
50
50
|
renderTarget: WebGLRenderTarget;
|
|
51
51
|
|
|
52
|
-
constructor(geometry: TGeometry, options:
|
|
52
|
+
constructor(geometry: TGeometry, options: ReflectorForSSRPassOptions);
|
|
53
53
|
|
|
54
54
|
doRender: (renderer: WebGLRenderer, scene: Scene, camera: Camera) => void;
|
|
55
55
|
|
|
@@ -3,7 +3,7 @@ import { WebGLRenderTarget, ShaderMaterial } from '../../../src/Three';
|
|
|
3
3
|
import { Pass } from './Pass';
|
|
4
4
|
|
|
5
5
|
export class BloomPass extends Pass {
|
|
6
|
-
constructor(strength?: number, kernelSize?: number, sigma?: number
|
|
6
|
+
constructor(strength?: number, kernelSize?: number, sigma?: number);
|
|
7
7
|
renderTargetX: WebGLRenderTarget;
|
|
8
8
|
renderTargetY: WebGLRenderTarget;
|
|
9
9
|
copyUniforms: object;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ColorRepresentation,
|
|
13
13
|
} from '../../../src/Three';
|
|
14
14
|
import { Pass, FullScreenQuad } from '../postprocessing/Pass';
|
|
15
|
-
import {
|
|
15
|
+
import { ReflectorForSSRPass } from '../objects/ReflectorForSSRPass';
|
|
16
16
|
|
|
17
17
|
export interface SSRPassParams {
|
|
18
18
|
renderer: WebGLRenderer;
|
|
@@ -23,7 +23,7 @@ export interface SSRPassParams {
|
|
|
23
23
|
selects: Mesh[] | null;
|
|
24
24
|
isPerspectiveCamera?: boolean | undefined;
|
|
25
25
|
isBouncing?: boolean | undefined;
|
|
26
|
-
groundReflector:
|
|
26
|
+
groundReflector: ReflectorForSSRPass | null;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export class SSRPass extends Pass {
|
|
@@ -33,7 +33,7 @@ export class SSRPass extends Pass {
|
|
|
33
33
|
renderer: WebGLRenderer;
|
|
34
34
|
scene: Scene;
|
|
35
35
|
camera: Camera;
|
|
36
|
-
groundReflector:
|
|
36
|
+
groundReflector: ReflectorForSSRPass | null;
|
|
37
37
|
opacity: number;
|
|
38
38
|
output: number;
|
|
39
39
|
maxDistance: number;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import Node from '../../../nodes/core/Node
|
|
1
|
+
import Node from '../../../nodes/core/Node';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export interface SlotNodeParameters<TNode extends Node = Node> {
|
|
4
|
+
node?: TNode;
|
|
5
|
+
nodeType?: string;
|
|
6
|
+
source?: string | null;
|
|
7
|
+
target?: string | null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default class SlotNode<TNode extends Node = Node> extends Node {
|
|
11
|
+
inclusionType: 'replace';
|
|
12
|
+
node: TNode | null;
|
|
13
|
+
source: null;
|
|
14
|
+
target: null;
|
|
15
|
+
|
|
16
|
+
constructor(params: SlotNodeParameters<TNode>);
|
|
5
17
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import NodeBuilder from '../../../nodes/core/NodeBuilder
|
|
1
|
+
import NodeBuilder from '../../../nodes/core/NodeBuilder';
|
|
2
2
|
import { Texture, TextureEncoding, Renderer, Object3D } from '../../../../../src/Three';
|
|
3
|
-
import Node from '../../../nodes/core/Node
|
|
4
|
-
import SlotNode from './SlotNode
|
|
5
|
-
import { NodeShaderStageOption } from '../../../nodes/core/constants
|
|
3
|
+
import Node from '../../../nodes/core/Node';
|
|
4
|
+
import SlotNode from './SlotNode';
|
|
5
|
+
import { NodeShaderStageOption } from '../../../nodes/core/constants';
|
|
6
6
|
|
|
7
7
|
export class WebGLNodeBuilder extends NodeBuilder {
|
|
8
8
|
constructor(
|
|
@@ -39,10 +39,10 @@ export class WebGLNodeBuilder extends NodeBuilder {
|
|
|
39
39
|
|
|
40
40
|
getVarys(shaderStage: string): string;
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
addCode(shaderStage: string, source: string, code: string, scope?: this): string;
|
|
43
43
|
addCodeAfterInclude(shaderStage: string, snippet: string, code: string): string;
|
|
44
44
|
|
|
45
|
-
replaceCode(shaderStage: string, source: string, target: string): void;
|
|
45
|
+
replaceCode(shaderStage: string, source: string, target: string, scope?: this): void;
|
|
46
46
|
parseInclude(shaderStage: string, ...includes: string[]): void;
|
|
47
47
|
getTextureEncodingFromMap(map: Texture): TextureEncoding;
|
|
48
48
|
|