@types/three 0.150.2 → 0.151.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/controls/MapControls.d.ts +21 -0
- three/examples/jsm/controls/OrbitControls.d.ts +1 -5
- three/examples/jsm/controls/PointerLockControls.d.ts +3 -0
- three/examples/jsm/controls/TrackballControls.d.ts +2 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +3 -4
- three/examples/jsm/loaders/GLTFLoader.d.ts +2 -4
- three/examples/jsm/loaders/SVGLoader.d.ts +15 -3
- three/examples/jsm/nodes/Nodes.d.ts +130 -226
- three/examples/jsm/nodes/{core → code}/CodeNode.d.ts +2 -3
- three/examples/jsm/nodes/{core → code}/ExpressionNode.d.ts +2 -2
- three/examples/jsm/nodes/{core → code}/FunctionCallNode.d.ts +2 -2
- three/examples/jsm/nodes/{core → code}/FunctionNode.d.ts +4 -4
- three/examples/jsm/nodes/core/InputNode.d.ts +4 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +1 -3
- three/examples/jsm/nodes/core/NodeUtils.d.ts +8 -2
- three/examples/jsm/nodes/core/{VaryNode.d.ts → VaryingNode.d.ts} +1 -1
- three/examples/jsm/nodes/fog/FogNode.d.ts +1 -1
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +2 -1
- three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +2 -2
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +2 -2
- three/examples/jsm/objects/{GroundProjectedEnv.d.ts → GroundProjectedSkybox.d.ts} +1 -1
- three/examples/jsm/postprocessing/Pass.d.ts +2 -0
- three/examples/jsm/renderers/CSS2DRenderer.d.ts +2 -1
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +0 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +12 -2
- three/index.d.ts +1 -1
- three/package.json +2 -2
- three/src/Three.d.ts +1 -0
- three/src/core/Raycaster.d.ts +1 -0
- three/src/extras/DataUtils.d.ts +13 -0
- three/src/extras/Earcut.d.ts +12 -0
- three/src/extras/ImageUtils.d.ts +20 -20
- three/src/extras/PMREMGenerator.d.ts +66 -0
- three/src/extras/ShapeUtils.d.ts +19 -1
- three/src/extras/core/Curve.d.ts +86 -31
- three/src/extras/core/CurvePath.d.ts +46 -4
- three/src/extras/core/Interpolations.d.ts +36 -0
- three/src/extras/core/Path.d.ts +122 -15
- three/src/extras/core/Shape.d.ts +56 -6
- three/src/extras/core/ShapePath.d.ts +73 -8
- three/src/extras/curves/ArcCurve.d.ts +35 -3
- three/src/extras/curves/CatmullRomCurve3.d.ts +62 -15
- three/src/extras/curves/CubicBezierCurve.d.ts +48 -7
- three/src/extras/curves/CubicBezierCurve3.d.ts +48 -7
- three/src/extras/curves/EllipseCurve.d.ts +73 -18
- three/src/extras/curves/LineCurve.d.ts +26 -5
- three/src/extras/curves/LineCurve3.d.ts +26 -5
- three/src/extras/curves/QuadraticBezierCurve.d.ts +44 -6
- three/src/extras/curves/QuadraticBezierCurve3.d.ts +44 -6
- three/src/extras/curves/SplineCurve.d.ts +39 -3
- three/src/helpers/ArrowHelper.d.ts +47 -16
- three/src/helpers/AxesHelper.d.ts +35 -3
- three/src/helpers/Box3Helper.d.ts +28 -4
- three/src/helpers/BoxHelper.d.ts +44 -4
- three/src/helpers/CameraHelper.d.ts +38 -19
- three/src/helpers/DirectionalLightHelper.d.ts +57 -10
- three/src/helpers/GridHelper.d.ts +32 -6
- three/src/helpers/HemisphereLightHelper.d.ts +56 -3
- three/src/helpers/PlaneHelper.d.ts +31 -8
- three/src/helpers/PointLightHelper.d.ts +54 -6
- three/src/helpers/PolarGridHelper.d.ts +35 -8
- three/src/helpers/SkeletonHelper.d.ts +56 -8
- three/src/helpers/SpotLightHelper.d.ts +59 -4
- three/src/lights/AmbientLight.d.ts +23 -10
- three/src/lights/AmbientLightProbe.d.ts +18 -0
- three/src/lights/DirectionalLight.d.ts +75 -20
- three/src/lights/DirectionalLightShadow.d.ts +68 -2
- three/src/lights/HemisphereLight.d.ts +45 -12
- three/src/lights/HemisphereLightProbe.d.ts +19 -0
- three/src/lights/Light.d.ts +40 -43
- three/src/lights/LightProbe.d.ts +32 -5
- three/src/lights/LightShadow.d.ts +100 -18
- three/src/lights/PointLight.d.ts +57 -12
- three/src/lights/PointLightShadow.d.ts +18 -2
- three/src/lights/RectAreaLight.d.ts +60 -8
- three/src/lights/SpotLight.d.ts +105 -20
- three/src/lights/SpotLightShadow.d.ts +63 -3
- three/src/materials/LineBasicMaterial.d.ts +7 -1
- three/src/materials/MeshDistanceMaterial.d.ts +0 -15
- three/src/math/Color.d.ts +23 -2
- three/src/math/Quaternion.d.ts +6 -0
- three/src/math/Triangle.d.ts +40 -0
- three/src/math/Vector2.d.ts +5 -0
- three/src/math/Vector3.d.ts +10 -3
- three/src/objects/InstancedMesh.d.ts +22 -30
- three/src/objects/LineSegments.d.ts +2 -0
- three/src/objects/Skeleton.d.ts +5 -1
- three/src/objects/SkinnedMesh.d.ts +37 -25
- three/src/renderers/WebGLRenderer.d.ts +16 -0
- three/src/renderers/shaders/ShaderChunk.d.ts +58 -37
- three/src/renderers/shaders/UniformsLib.d.ts +88 -57
- three/src/textures/Texture.d.ts +5 -22
- three/examples/jsm/nodes/lighting/PunctualLightNode.d.ts +0 -12
three/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 28 Apr 2023 20:02:51 GMT
|
|
12
12
|
* Dependencies: [@types/fflate](https://npmjs.com/package/@types/fflate), [@types/lil-gui](https://npmjs.com/package/@types/lil-gui), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr)
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OrbitControls } from './OrbitControls';
|
|
2
|
+
import { Camera } from '../../../src/Three';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* MapControls performs orbiting, dollying (zooming), and panning.
|
|
6
|
+
* Unlike TrackballControls, it maintains the "up" direction
|
|
7
|
+
* object.up (+Y by default).
|
|
8
|
+
*
|
|
9
|
+
* Orbit - right mouse, or left mouse + ctrl/meta/shiftKey / touch:
|
|
10
|
+
* two-finger rotate
|
|
11
|
+
* Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
|
|
12
|
+
* Pan - left mouse, or arrow keys / touch: one-finger move
|
|
13
|
+
*
|
|
14
|
+
* @param object - The camera to be controlled. The camera must not
|
|
15
|
+
* be a child of another object, unless that object is the scene itself.
|
|
16
|
+
* @param domElement - The HTML element used for
|
|
17
|
+
* event listeners.
|
|
18
|
+
*/
|
|
19
|
+
export class MapControls extends OrbitControls {
|
|
20
|
+
constructor(object: Camera, domElement?: HTMLElement);
|
|
21
|
+
}
|
|
@@ -214,7 +214,7 @@ export class OrbitControls {
|
|
|
214
214
|
/**
|
|
215
215
|
* Used internally by the .saveState and .reset methods.
|
|
216
216
|
*/
|
|
217
|
-
|
|
217
|
+
zoom0: number;
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* Update the controls. Must be called after any manual changes
|
|
@@ -276,7 +276,3 @@ export class OrbitControls {
|
|
|
276
276
|
|
|
277
277
|
dispatchEvent(event: { type: string; target: any }): void;
|
|
278
278
|
}
|
|
279
|
-
|
|
280
|
-
export class MapControls extends OrbitControls {
|
|
281
|
-
constructor(object: Camera, domElement?: HTMLElement);
|
|
282
|
-
}
|
|
@@ -3,6 +3,7 @@ import { Camera, EventDispatcher, Vector3 } from '../../../src/Three';
|
|
|
3
3
|
export class PointerLockControls extends EventDispatcher {
|
|
4
4
|
constructor(camera: Camera, domElement?: HTMLElement);
|
|
5
5
|
|
|
6
|
+
camera: Camera;
|
|
6
7
|
domElement: HTMLElement;
|
|
7
8
|
|
|
8
9
|
// API
|
|
@@ -12,6 +13,8 @@ export class PointerLockControls extends EventDispatcher {
|
|
|
12
13
|
minPolarAngle: number;
|
|
13
14
|
maxPolarAngle: number;
|
|
14
15
|
|
|
16
|
+
pointerSpeed: number;
|
|
17
|
+
|
|
15
18
|
connect(): void;
|
|
16
19
|
disconnect(): void;
|
|
17
20
|
dispose(): void;
|
|
@@ -20,6 +20,8 @@ export class TrackballControls extends EventDispatcher {
|
|
|
20
20
|
dynamicDampingFactor: number;
|
|
21
21
|
minDistance: number;
|
|
22
22
|
maxDistance: number;
|
|
23
|
+
minZoom: number;
|
|
24
|
+
maxZoom: number;
|
|
23
25
|
keys: string[];
|
|
24
26
|
mouseButtons: { LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE };
|
|
25
27
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Object3D, Vector3, WebGLRenderer } from '../../../src/Three';
|
|
2
|
-
import { Octree } from '../math/Octree';
|
|
1
|
+
import { Camera, Object3D, Vector3, WebGLRenderer } from '../../../src/Three';
|
|
3
2
|
|
|
4
3
|
export class ViewHelper extends Object3D {
|
|
5
4
|
animating: boolean;
|
|
@@ -7,10 +6,10 @@ export class ViewHelper extends Object3D {
|
|
|
7
6
|
|
|
8
7
|
readonly isViewHelper: true;
|
|
9
8
|
|
|
10
|
-
constructor(camera:
|
|
9
|
+
constructor(camera: Camera, domElement: HTMLElement);
|
|
11
10
|
|
|
12
11
|
render(renderer: WebGLRenderer): void;
|
|
13
|
-
handleClick(event:
|
|
12
|
+
handleClick(event: MouseEvent): boolean;
|
|
14
13
|
update(delta: number): void;
|
|
15
14
|
dispose(): void;
|
|
16
15
|
}
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
TextureLoader,
|
|
17
17
|
FileLoader,
|
|
18
18
|
ImageBitmapLoader,
|
|
19
|
+
Skeleton,
|
|
19
20
|
} from '../../../src/Three';
|
|
20
21
|
|
|
21
22
|
import { DRACOLoader } from './DRACOLoader';
|
|
@@ -131,10 +132,7 @@ export class GLTFParser {
|
|
|
131
132
|
) => Promise<BufferGeometry[]>;
|
|
132
133
|
loadMesh: (meshIndex: number) => Promise<Group | Mesh | SkinnedMesh>;
|
|
133
134
|
loadCamera: (cameraIndex: number) => Promise<Camera>;
|
|
134
|
-
loadSkin: (skinIndex: number) => Promise<
|
|
135
|
-
joints: number[];
|
|
136
|
-
inverseBindMatrices?: BufferAttribute | InterleavedBufferAttribute | undefined;
|
|
137
|
-
}>;
|
|
135
|
+
loadSkin: (skinIndex: number) => Promise<Skeleton>;
|
|
138
136
|
loadAnimation: (animationIndex: number) => Promise<AnimationClip>;
|
|
139
137
|
loadNode: (nodeIndex: number) => Promise<Object3D>;
|
|
140
138
|
loadScene: () => Promise<Group>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Loader, LoadingManager, ShapePath, BufferGeometry, Vector3, Shape } from '../../../src/Three';
|
|
1
|
+
import { Loader, LoadingManager, ShapePath, BufferGeometry, Vector3, Shape, Vector2 } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export interface SVGResultPaths extends ShapePath {
|
|
4
4
|
userData?:
|
|
@@ -43,14 +43,25 @@ export class SVGLoader extends Loader {
|
|
|
43
43
|
lineCap?: string,
|
|
44
44
|
miterLimit?: number,
|
|
45
45
|
): StrokeStyle;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Generates a stroke with some witdh around the given path.
|
|
49
|
+
* @remarks The path can be open or closed (last point equals to first point)
|
|
50
|
+
* @param points Array of Vector2D (the path). Minimum 2 points.
|
|
51
|
+
* @param style Object with SVG properties as returned by SVGLoader.getStrokeStyle(), or SVGLoader.parse() in the path.userData.style object
|
|
52
|
+
* @param arcDivisions Arc divisions for round joins and endcaps. (Optional)
|
|
53
|
+
* @param minDistance Points closer to this distance will be merged. (Optional)
|
|
54
|
+
* @returns BufferGeometry with stroke triangles (In plane z = 0). UV coordinates are generated ('u' along path. 'v' across it, from left to right)
|
|
55
|
+
*/
|
|
46
56
|
static pointsToStroke(
|
|
47
|
-
points:
|
|
57
|
+
points: Vector2[],
|
|
48
58
|
style: StrokeStyle,
|
|
49
59
|
arcDivisions?: number,
|
|
50
60
|
minDistance?: number,
|
|
51
61
|
): BufferGeometry;
|
|
62
|
+
|
|
52
63
|
static pointsToStrokeWithBuffers(
|
|
53
|
-
points:
|
|
64
|
+
points: Vector2[],
|
|
54
65
|
style: StrokeStyle,
|
|
55
66
|
arcDivisions?: number,
|
|
56
67
|
minDistance?: number,
|
|
@@ -59,5 +70,6 @@ export class SVGLoader extends Loader {
|
|
|
59
70
|
uvs?: number[],
|
|
60
71
|
vertexOffset?: number,
|
|
61
72
|
): number;
|
|
73
|
+
|
|
62
74
|
static createShapes(shapePath: ShapePath): Shape[];
|
|
63
75
|
}
|
|
@@ -1,245 +1,149 @@
|
|
|
1
|
+
// constants
|
|
2
|
+
export * from './core/constants';
|
|
3
|
+
|
|
1
4
|
// core
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import TempNode from './core/TempNode';
|
|
27
|
-
import UniformNode from './core/UniformNode';
|
|
28
|
-
import VarNode from './core/VarNode';
|
|
29
|
-
import VaryNode from './core/VaryNode';
|
|
5
|
+
export { default as ArrayUniformNode } from './core/ArrayUniformNode';
|
|
6
|
+
export { default as AttributeNode } from './core/AttributeNode';
|
|
7
|
+
export { default as BypassNode } from './core/BypassNode';
|
|
8
|
+
export { default as CacheNode } from './core/CacheNode';
|
|
9
|
+
export { default as ConstNode } from './core/ConstNode';
|
|
10
|
+
export { default as ContextNode } from './core/ContextNode';
|
|
11
|
+
export { default as InstanceIndexNode } from './core/InstanceIndexNode';
|
|
12
|
+
export { default as Node } from './core/Node';
|
|
13
|
+
export { default as NodeAttribute } from './core/NodeAttribute';
|
|
14
|
+
export { default as NodeBuilder } from './core/NodeBuilder';
|
|
15
|
+
export { default as NodeCache } from './core/NodeCache';
|
|
16
|
+
export { default as NodeCode } from './core/NodeCode';
|
|
17
|
+
export { default as NodeFrame } from './core/NodeFrame';
|
|
18
|
+
export { default as NodeFunctionInput } from './core/NodeFunctionInput';
|
|
19
|
+
export { default as NodeKeywords } from './core/NodeKeywords';
|
|
20
|
+
export { default as NodeUniform } from './core/NodeUniform';
|
|
21
|
+
export { default as NodeVar } from './core/NodeVar';
|
|
22
|
+
export { default as NodeVarying } from './core/NodeVarying';
|
|
23
|
+
export { default as PropertyNode } from './core/PropertyNode';
|
|
24
|
+
export { default as StackNode } from './core/StackNode';
|
|
25
|
+
export { default as TempNode } from './core/TempNode';
|
|
26
|
+
export { default as UniformNode } from './core/UniformNode';
|
|
27
|
+
export { default as VarNode } from './core/VarNode';
|
|
28
|
+
export { default as VaryingNode } from './core/VaryingNode';
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
import BitangentNode, { BitangentNodeScope } from './accessors/BitangentNode';
|
|
33
|
-
import BufferNode from './accessors/BufferNode';
|
|
34
|
-
import CameraNode, { CameraNodeScope } from './accessors/CameraNode';
|
|
35
|
-
import CubeTextureNode from './accessors/CubeTextureNode';
|
|
36
|
-
import InstanceNode from './accessors/InstanceNode';
|
|
37
|
-
import MaterialNode, { MaterialNodeScope } from './accessors/MaterialNode';
|
|
38
|
-
import MaterialReferenceNode from './accessors/MaterialReferenceNode';
|
|
39
|
-
import ModelNode from './accessors/ModelNode';
|
|
40
|
-
import ModelViewProjectionNode from './accessors/ModelViewProjectionNode';
|
|
41
|
-
import NormalNode, { NormalNodeScope } from './accessors/NormalNode';
|
|
42
|
-
import Object3DNode, { Object3DNodeScope } from './accessors/Object3DNode';
|
|
43
|
-
import PointUVNode from './accessors/PointUVNode';
|
|
44
|
-
import PositionNode, { PositionNodeScope } from './accessors/PositionNode';
|
|
45
|
-
import ReferenceNode from './accessors/ReferenceNode';
|
|
46
|
-
import ReflectVectorNode from './accessors/ReflectVectorNode';
|
|
47
|
-
import SkinningNode from './accessors/SkinningNode';
|
|
48
|
-
import TangentNode, { TangentNodeScope } from './accessors/TangentNode';
|
|
49
|
-
import TextureNode from './accessors/TextureNode';
|
|
50
|
-
import UVNode from './accessors/UVNode';
|
|
51
|
-
import UserDataNode from './accessors/UserDataNode';
|
|
30
|
+
export * as NodeUtils from './core/NodeUtils.js';
|
|
52
31
|
|
|
53
|
-
//
|
|
54
|
-
|
|
32
|
+
// math
|
|
33
|
+
export {
|
|
34
|
+
default as MathNode,
|
|
35
|
+
MathNodeMethod1,
|
|
36
|
+
MathNodeMethod2,
|
|
37
|
+
MathNodeMethod3,
|
|
38
|
+
MathNodeMethod,
|
|
39
|
+
} from './math/MathNode';
|
|
40
|
+
export { default as OperatorNode, OperatorNodeOp } from './math/OperatorNode';
|
|
41
|
+
export { default as CondNode } from './math/CondNode';
|
|
55
42
|
|
|
56
|
-
//
|
|
57
|
-
|
|
43
|
+
// utils
|
|
44
|
+
export { default as ArrayElementNode } from './utils/ArrayElementNode';
|
|
45
|
+
export { default as ConvertNode } from './utils/ConvertNode';
|
|
46
|
+
export { default as EquirectUVNode } from './utils/EquirectUVNode';
|
|
47
|
+
export { default as JoinNode } from './utils/JoinNode';
|
|
48
|
+
export { default as MatcapUVNode } from './utils/MatcapUVNode';
|
|
49
|
+
export { default as MaxMipLevelNode } from './utils/MaxMipLevelNode';
|
|
50
|
+
export { default as OscNode, OscNodeMethod } from './utils/OscNode';
|
|
51
|
+
export { default as RemapNode } from './utils/RemapNode';
|
|
52
|
+
export { default as RotateUVNode } from './utils/RotateUVNode';
|
|
53
|
+
export { default as SpecularMIPLevelNode } from './utils/SpecularMIPLevelNode';
|
|
54
|
+
export { default as SplitNode } from './utils/SplitNode';
|
|
55
|
+
export { default as SpriteSheetUVNode } from './utils/SpriteSheetUVNode';
|
|
56
|
+
export { default as TimerNode, TimerNodeScope } from './utils/TimerNode';
|
|
57
|
+
export { default as TriplanarTexturesNode } from './utils/TriplanarTexturesNode';
|
|
58
|
+
|
|
59
|
+
// shader node
|
|
60
|
+
export * from './shadernode/ShaderNodeElements';
|
|
61
|
+
|
|
62
|
+
// accessors
|
|
63
|
+
export { default as BitangentNode, BitangentNodeScope } from './accessors/BitangentNode';
|
|
64
|
+
export { default as BufferNode } from './accessors/BufferNode';
|
|
65
|
+
export { default as CameraNode, CameraNodeScope } from './accessors/CameraNode';
|
|
66
|
+
export { default as CubeTextureNode } from './accessors/CubeTextureNode';
|
|
67
|
+
export { default as InstanceNode } from './accessors/InstanceNode';
|
|
68
|
+
export { default as MaterialNode, MaterialNodeScope } from './accessors/MaterialNode';
|
|
69
|
+
export { default as MaterialReferenceNode } from './accessors/MaterialReferenceNode';
|
|
70
|
+
export { default as ModelNode } from './accessors/ModelNode';
|
|
71
|
+
export { default as ModelViewProjectionNode } from './accessors/ModelViewProjectionNode';
|
|
72
|
+
export { default as NormalNode, NormalNodeScope } from './accessors/NormalNode';
|
|
73
|
+
export { default as Object3DNode, Object3DNodeScope as OObject3DNodeScope } from './accessors/Object3DNode';
|
|
74
|
+
export { default as PointUVNode } from './accessors/PointUVNode';
|
|
75
|
+
export { default as PositionNode, PositionNodeScope } from './accessors/PositionNode';
|
|
76
|
+
export { default as ReferenceNode } from './accessors/ReferenceNode';
|
|
77
|
+
export { default as ReflectVectorNode } from './accessors/ReflectVectorNode';
|
|
78
|
+
export { default as SkinningNode } from './accessors/SkinningNode';
|
|
79
|
+
export { default as TangentNode, TangentNodeScope } from './accessors/TangentNode';
|
|
80
|
+
export { default as TextureNode } from './accessors/TextureNode';
|
|
81
|
+
export { default as UVNode } from './accessors/UVNode';
|
|
82
|
+
export { default as UserDataNode } from './accessors/UserDataNode';
|
|
58
83
|
|
|
59
84
|
// display
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
85
|
+
export { default as BlendModeNode, BlendMode } from './display/BlendModeNode';
|
|
86
|
+
export { default as ColorAdjustmentNode, ColorAdjustmentMethod } from './display/ColorAdjustmentNode';
|
|
87
|
+
export { default as ColorSpaceNode, ColorSpaceNodeMethod } from './display/ColorSpaceNode';
|
|
88
|
+
export { default as FrontFacingNode } from './display/FrontFacingNode';
|
|
89
|
+
export { default as NormalMapNode } from './display/NormalMapNode';
|
|
90
|
+
export { default as PosterizeNode } from './display/PosterizeNode';
|
|
91
|
+
export { default as ToneMappingNode } from './display/ToneMappingNode';
|
|
92
|
+
export { default as ViewportNode } from './display/ViewportNode';
|
|
68
93
|
|
|
69
|
-
//
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
94
|
+
// code
|
|
95
|
+
export { default as ExpressionNode } from './code/ExpressionNode';
|
|
96
|
+
export { default as CodeNode, CodeNodeInclude } from './code/CodeNode';
|
|
97
|
+
export { default as FunctionCallNode } from './code/FunctionCallNode';
|
|
98
|
+
export { default as FunctionNode, FunctionNodeArguments } from './code/FunctionNode';
|
|
73
99
|
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
import LightingContextNode, { LightingModelNode } from './lighting/LightingContextNode';
|
|
79
|
-
import HemisphereLightNode from './lighting/HemisphereLightNode';
|
|
80
|
-
import EnvironmentNode from './lighting/EnvironmentNode';
|
|
81
|
-
import AONode from './lighting/AONode';
|
|
82
|
-
import AnalyticLightNode from './lighting/AnalyticLightNode';
|
|
100
|
+
// fog
|
|
101
|
+
export { default as FogNode } from './fog/FogNode';
|
|
102
|
+
export { default as FogRangeNode } from './fog/FogRangeNode';
|
|
103
|
+
export { default as FogExp2Node } from './fog/FogExp2Node';
|
|
83
104
|
|
|
84
|
-
//
|
|
105
|
+
// geometry
|
|
106
|
+
export { default as RangeNode, RangeModeBound } from './geometry/RangeNode';
|
|
85
107
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
import EquirectUVNode from './utils/EquirectUVNode';
|
|
89
|
-
import JoinNode from './utils/JoinNode';
|
|
90
|
-
import MatcapUVNode from './utils/MatcapUVNode';
|
|
91
|
-
import MaxMipLevelNode from './utils/MaxMipLevelNode';
|
|
92
|
-
import OscNode, { OscNodeMethod } from './utils/OscNode';
|
|
93
|
-
import RemapNode from './utils/RemapNode';
|
|
94
|
-
import RotateUVNode from './utils/RotateUVNode';
|
|
95
|
-
import SpecularMIPLevelNode from './utils/SpecularMIPLevelNode';
|
|
96
|
-
import SplitNode from './utils/SplitNode';
|
|
97
|
-
import SpriteSheetUVNode from './utils/SpriteSheetUVNode';
|
|
98
|
-
import TimerNode, { TimerNodeScope } from './utils/TimerNode';
|
|
99
|
-
import TriplanarTexturesNode from './utils/TriplanarTexturesNode';
|
|
108
|
+
// gpgpu
|
|
109
|
+
export { default as ComputeNode } from './gpgpu/ComputeNode';
|
|
100
110
|
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
111
|
+
// lighting
|
|
112
|
+
export { default as PointLightNode } from './lighting/PointLightNode';
|
|
113
|
+
export { default as SpotLightNode } from './lighting/SpotLightNode';
|
|
114
|
+
export { default as LightsNode } from './lighting/LightsNode';
|
|
115
|
+
export { default as LightingNode } from './lighting/LightingNode';
|
|
116
|
+
export { default as LightingContextNode, LightingModelNode } from './lighting/LightingContextNode';
|
|
117
|
+
export { default as HemisphereLightNode } from './lighting/HemisphereLightNode';
|
|
118
|
+
export { default as EnvironmentNode } from './lighting/EnvironmentNode';
|
|
119
|
+
export { default as AONode } from './lighting/AONode';
|
|
120
|
+
export { default as AnalyticLightNode } from './lighting/AnalyticLightNode';
|
|
105
121
|
|
|
106
122
|
// procedural
|
|
107
|
-
|
|
108
|
-
// fog
|
|
109
|
-
import FogNode from './fog/FogNode';
|
|
110
|
-
import FogRangeNode from './fog/FogRangeNode';
|
|
111
|
-
import FogExp2Node from './fog/FogExp2Node';
|
|
123
|
+
export { default as CheckerNode } from './procedural/CheckerNode';
|
|
112
124
|
|
|
113
|
-
//
|
|
114
|
-
export
|
|
125
|
+
// loaders
|
|
126
|
+
export { default as NodeLoader } from './loaders/NodeLoader';
|
|
127
|
+
export { default as NodeObjectLoader } from './loaders/NodeObjectLoader';
|
|
128
|
+
export { default as NodeMaterialLoader } from './loaders/NodeMaterialLoader';
|
|
115
129
|
|
|
116
130
|
// materials
|
|
117
131
|
export * from './materials/Materials';
|
|
118
132
|
|
|
119
|
-
//
|
|
120
|
-
export * from './
|
|
133
|
+
// materialX
|
|
134
|
+
export * from './materialx/MaterialXNodes';
|
|
121
135
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
InstanceIndexNode,
|
|
137
|
-
Node,
|
|
138
|
-
NodeAttribute,
|
|
139
|
-
NodeBuilder,
|
|
140
|
-
NodeCache,
|
|
141
|
-
NodeCode,
|
|
142
|
-
NodeFrame,
|
|
143
|
-
NodeFunctionInput,
|
|
144
|
-
NodeKeywords,
|
|
145
|
-
NodeUniform,
|
|
146
|
-
NodeVar,
|
|
147
|
-
NodeVarying,
|
|
148
|
-
PropertyNode,
|
|
149
|
-
StackNode,
|
|
150
|
-
TempNode,
|
|
151
|
-
UniformNode,
|
|
152
|
-
VarNode,
|
|
153
|
-
VaryNode,
|
|
154
|
-
// geometry
|
|
155
|
-
RangeNode,
|
|
156
|
-
RangeModeBound,
|
|
157
|
-
// gpgpu
|
|
158
|
-
ComputeNode,
|
|
159
|
-
// accessors
|
|
160
|
-
BitangentNode,
|
|
161
|
-
BitangentNodeScope,
|
|
162
|
-
BufferNode,
|
|
163
|
-
CameraNode,
|
|
164
|
-
CameraNodeScope,
|
|
165
|
-
CubeTextureNode,
|
|
166
|
-
InstanceNode,
|
|
167
|
-
MaterialNode,
|
|
168
|
-
MaterialNodeScope,
|
|
169
|
-
MaterialReferenceNode,
|
|
170
|
-
ModelNode,
|
|
171
|
-
ModelViewProjectionNode,
|
|
172
|
-
NormalNode,
|
|
173
|
-
NormalNodeScope,
|
|
174
|
-
Object3DNode,
|
|
175
|
-
Object3DNodeScope as OObject3DNodeScope,
|
|
176
|
-
PointUVNode,
|
|
177
|
-
PositionNode,
|
|
178
|
-
PositionNodeScope,
|
|
179
|
-
ReferenceNode,
|
|
180
|
-
ReflectVectorNode,
|
|
181
|
-
SkinningNode,
|
|
182
|
-
TangentNode,
|
|
183
|
-
TangentNodeScope,
|
|
184
|
-
TextureNode,
|
|
185
|
-
UVNode,
|
|
186
|
-
UserDataNode,
|
|
187
|
-
// display
|
|
188
|
-
BlendModeNode,
|
|
189
|
-
BlendMode,
|
|
190
|
-
ColorAdjustmentNode,
|
|
191
|
-
ColorAdjustmentMethod,
|
|
192
|
-
ColorSpaceNode,
|
|
193
|
-
ColorSpaceNodeMethod,
|
|
194
|
-
FrontFacingNode,
|
|
195
|
-
NormalMapNode,
|
|
196
|
-
PosterizeNode,
|
|
197
|
-
ToneMappingNode,
|
|
198
|
-
ViewportNode,
|
|
199
|
-
// math
|
|
200
|
-
MathNode,
|
|
201
|
-
MathNodeMethod1,
|
|
202
|
-
MathNodeMethod2,
|
|
203
|
-
MathNodeMethod3,
|
|
204
|
-
MathNodeMethod,
|
|
205
|
-
OperatorNode,
|
|
206
|
-
OperatorNodeOp,
|
|
207
|
-
CondNode,
|
|
208
|
-
// lighting
|
|
209
|
-
PunctualLightNode,
|
|
210
|
-
LightsNode,
|
|
211
|
-
LightingNode,
|
|
212
|
-
LightingContextNode,
|
|
213
|
-
LightingModelNode,
|
|
214
|
-
HemisphereLightNode,
|
|
215
|
-
EnvironmentNode,
|
|
216
|
-
AONode,
|
|
217
|
-
AnalyticLightNode,
|
|
218
|
-
// utils
|
|
219
|
-
ArrayElementNode,
|
|
220
|
-
ConvertNode,
|
|
221
|
-
EquirectUVNode,
|
|
222
|
-
JoinNode,
|
|
223
|
-
MatcapUVNode,
|
|
224
|
-
MaxMipLevelNode,
|
|
225
|
-
OscNode,
|
|
226
|
-
OscNodeMethod,
|
|
227
|
-
RemapNode,
|
|
228
|
-
RotateUVNode,
|
|
229
|
-
SpecularMIPLevelNode,
|
|
230
|
-
SplitNode,
|
|
231
|
-
SpriteSheetUVNode,
|
|
232
|
-
TimerNode,
|
|
233
|
-
TimerNodeScope,
|
|
234
|
-
TriplanarTexturesNode,
|
|
235
|
-
// procedural
|
|
236
|
-
CheckerNode,
|
|
237
|
-
// fog
|
|
238
|
-
FogNode,
|
|
239
|
-
FogRangeNode,
|
|
240
|
-
FogExp2Node,
|
|
241
|
-
// loaders
|
|
242
|
-
NodeLoader,
|
|
243
|
-
NodeObjectLoader,
|
|
244
|
-
NodeMaterialLoader,
|
|
245
|
-
};
|
|
136
|
+
// functions
|
|
137
|
+
export { default as BRDF_GGX } from './functions/BSDF/BRDF_GGX';
|
|
138
|
+
export { default as BRDF_Lambert } from './functions/BSDF/BRDF_Lambert';
|
|
139
|
+
export { default as D_GGX } from './functions/BSDF/D_GGX';
|
|
140
|
+
export { default as DFGApprox } from './functions/BSDF/DFGApprox';
|
|
141
|
+
export { default as F_Schlick } from './functions/BSDF/F_Schlick';
|
|
142
|
+
export { default as V_GGX_SmithCorrelated } from './functions/BSDF/V_GGX_SmithCorrelated';
|
|
143
|
+
|
|
144
|
+
export { default as getDistanceAttenuation } from './functions/light/getDistanceAttenuation';
|
|
145
|
+
|
|
146
|
+
export { default as getGeometryRoughness } from './functions/material/getGeometryRoughness';
|
|
147
|
+
export { default as getRoughness } from './functions/material/getRoughness';
|
|
148
|
+
|
|
149
|
+
export { default as physicalLightingModel } from './functions/PhysicalLightingModel';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import NodeBuilder from './NodeBuilder';
|
|
1
|
+
import Node from '../core/Node';
|
|
2
|
+
import NodeBuilder from '../core/NodeBuilder';
|
|
4
3
|
|
|
5
4
|
export interface CodeNodeInclude {
|
|
6
5
|
build(builder: NodeBuilder): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import FunctionNode from './FunctionNode';
|
|
2
|
-
import TempNode from '
|
|
3
|
-
import Node from '
|
|
2
|
+
import TempNode from '../core/TempNode';
|
|
3
|
+
import Node from '../core/Node';
|
|
4
4
|
|
|
5
5
|
export default class FunctionCallNode<P extends Node[] | { [name: string]: Node }> extends TempNode {
|
|
6
6
|
functionNode: FunctionNode<P>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import CodeNode, { CodeNodeInclude } from './CodeNode';
|
|
2
2
|
import FunctionCallNode from './FunctionCallNode';
|
|
3
|
-
import NodeBuilder from '
|
|
4
|
-
import NodeFunction from '
|
|
5
|
-
import NodeFunctionInput from '
|
|
6
|
-
import Node from '
|
|
3
|
+
import NodeBuilder from '../core/NodeBuilder';
|
|
4
|
+
import NodeFunction from '../core/NodeFunction';
|
|
5
|
+
import NodeFunctionInput from '../core/NodeFunctionInput';
|
|
6
|
+
import Node from '../core/Node';
|
|
7
7
|
|
|
8
8
|
export type FunctionNodeArguments = Node[] | { [name: string]: Node };
|
|
9
9
|
|
|
@@ -2,11 +2,15 @@ import { NodeTypeOption, NodeValueOption } from './constants';
|
|
|
2
2
|
import Node from './Node';
|
|
3
3
|
import NodeBuilder from './NodeBuilder';
|
|
4
4
|
|
|
5
|
+
export type Precision = 'low' | 'medium' | 'high';
|
|
6
|
+
|
|
5
7
|
export default abstract class InputNode extends Node {
|
|
6
8
|
isInputNode: true;
|
|
7
9
|
value: NodeValueOption;
|
|
10
|
+
precision: Precision | null;
|
|
8
11
|
|
|
9
12
|
constructor(value: NodeValueOption, nodeType?: NodeTypeOption | null);
|
|
10
13
|
|
|
11
14
|
getInputType(builder: NodeBuilder): string | null;
|
|
15
|
+
setPrecision(precision: Precision): this;
|
|
12
16
|
}
|
|
@@ -64,12 +64,10 @@ export default abstract class NodeBuilder {
|
|
|
64
64
|
shaderStage: NodeShaderStageOption | null;
|
|
65
65
|
buildStage: BuildStageOption | null;
|
|
66
66
|
stack: Node[];
|
|
67
|
-
get node(): Node;
|
|
68
67
|
|
|
69
|
-
addStack(node: Node): void;
|
|
70
|
-
removeStack(node: Node): void;
|
|
71
68
|
setHashNode(node: Node, hash: string): void;
|
|
72
69
|
addNode(node: Node): void;
|
|
70
|
+
get currentNode(): Node;
|
|
73
71
|
getMethod(method: string): string;
|
|
74
72
|
getNodeFromHash(hash: string): Node;
|
|
75
73
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { NodeValueOption } from './constants';
|
|
2
2
|
import Node from './Node';
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export interface NodeChild {
|
|
5
|
+
property: string;
|
|
6
|
+
index?: number | string;
|
|
7
|
+
childNode: Node;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function getCacheKey(object: Node): string;
|
|
11
|
+
export function getNodeChildren(object: Node): Generator<NodeChild, void>;
|
|
5
12
|
export function getValueType(value: NodeValueOption): string | null;
|
|
6
13
|
export function getValueFromType(type: string, ...params: number[]): NodeValueOption | null;
|
|
7
|
-
export function getCacheKey(object: Node): string;
|