@types/three 0.157.1 → 0.158.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/Addons.d.ts +290 -0
- three/examples/jsm/animation/CCDIKSolver.d.ts +30 -0
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +105 -0
- three/examples/jsm/animation/MMDPhysics.d.ts +124 -0
- three/examples/jsm/cameras/CinematicCamera.d.ts +41 -0
- three/examples/jsm/capabilities/WebGL.d.ts +9 -0
- three/examples/jsm/controls/OrbitControls.d.ts +304 -0
- three/examples/jsm/controls/TrackballControls.d.ts +58 -0
- three/examples/jsm/effects/OutlineEffect.d.ts +36 -0
- three/examples/jsm/environments/RoomEnvironment.d.ts +6 -0
- three/examples/jsm/exporters/PLYExporter.d.ts +30 -0
- three/examples/jsm/exporters/STLExporter.d.ts +21 -0
- three/examples/jsm/helpers/RectAreaLightHelper.d.ts +10 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +15 -0
- three/examples/jsm/libs/fflate.module.d.ts +1 -0
- three/examples/jsm/libs/lil-gui.module.min.d.ts +609 -0
- three/examples/jsm/libs/tween.module.d.ts +219 -0
- three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +3 -0
- three/examples/jsm/lines/Line2.d.ts +11 -0
- three/examples/jsm/lines/LineGeometry.d.ts +10 -0
- three/examples/jsm/lines/LineMaterial.d.ts +31 -0
- three/examples/jsm/lines/LineSegments2.d.ts +14 -0
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +23 -0
- three/examples/jsm/loaders/DDSLoader.d.ts +16 -0
- three/examples/jsm/loaders/DRACOLoader.d.ts +19 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +147 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +17 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +19 -0
- three/examples/jsm/loaders/LogLuvLoader.d.ts +1 -1
- three/examples/jsm/loaders/MMDLoader.d.ts +56 -0
- three/examples/jsm/loaders/MTLLoader.d.ts +104 -0
- three/examples/jsm/loaders/OBJLoader.d.ts +10 -0
- three/examples/jsm/loaders/PCDLoader.d.ts +8 -0
- three/examples/jsm/loaders/RGBELoader.d.ts +19 -0
- three/examples/jsm/loaders/SVGLoader.d.ts +68 -0
- three/examples/jsm/loaders/TGALoader.d.ts +7 -0
- three/examples/jsm/loaders/TTFLoader.d.ts +8 -0
- three/examples/jsm/loaders/USDZLoader.d.ts +11 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
- three/examples/jsm/math/Capsule.d.ts +0 -1
- three/examples/jsm/misc/MD2CharacterComplex.d.ts +9 -1
- three/examples/jsm/nodes/Nodes.d.ts +149 -0
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +21 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +14 -0
- three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +15 -0
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +7 -0
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +13 -0
- three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
- three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +10 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
- three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +16 -0
- three/examples/jsm/nodes/core/Node.d.ts +31 -0
- three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +138 -0
- three/examples/jsm/nodes/core/NodeCache.d.ts +9 -0
- three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
- three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
- three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
- three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
- three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
- three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeUtils.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
- three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
- three/examples/jsm/nodes/core/StackNode.d.ts +11 -0
- three/examples/jsm/nodes/core/TempNode.d.ts +11 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
- three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +8 -0
- three/examples/jsm/nodes/core/constants.d.ts +78 -0
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +18 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
- three/examples/jsm/nodes/display/ViewportNode.d.ts +23 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +13 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
- three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
- three/examples/jsm/nodes/lighting/LightUtils.d.ts +4 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
- three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
- three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
- three/examples/jsm/nodes/loaders/NodeLoader.d.ts +14 -0
- three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
- three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +9 -0
- three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +9 -0
- three/examples/jsm/nodes/materials/Materials.d.ts +17 -0
- three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +10 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +18 -0
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +38 -0
- three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -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/CondNode.d.ts +9 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +115 -0
- three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +156 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +310 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +166 -0
- three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +11 -0
- three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +8 -0
- three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +19 -0
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
- three/examples/jsm/objects/Reflector.d.ts +29 -0
- three/examples/jsm/objects/ReflectorForSSRPass.d.ts +1 -0
- three/examples/jsm/objects/Refractor.d.ts +2 -1
- three/examples/jsm/physics/AmmoPhysics.d.ts +2 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +2 -1
- three/examples/jsm/postprocessing/EffectComposer.d.ts +31 -0
- three/examples/jsm/postprocessing/Pass.d.ts +31 -0
- three/examples/jsm/postprocessing/SavePass.d.ts +12 -0
- three/examples/jsm/postprocessing/ShaderPass.d.ts +11 -0
- three/examples/jsm/renderers/CSS3DRenderer.d.ts +26 -0
- three/examples/jsm/renderers/SVGRenderer.d.ts +2 -1
- three/examples/jsm/renderers/common/Backend.d.ts +15 -0
- three/examples/jsm/renderers/common/Info.d.ts +15 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +42 -0
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +17 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +37 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +9 -0
- three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +11 -0
- three/examples/jsm/shaders/AfterimageShader.d.ts +1 -0
- three/examples/jsm/shaders/BasicShader.d.ts +1 -0
- three/examples/jsm/shaders/BlendShader.d.ts +1 -0
- three/examples/jsm/shaders/BokehShader.d.ts +1 -0
- three/examples/jsm/shaders/BokehShader2.d.ts +44 -0
- three/examples/jsm/shaders/BrightnessContrastShader.d.ts +1 -0
- three/examples/jsm/shaders/ColorCorrectionShader.d.ts +1 -0
- three/examples/jsm/shaders/DOFMipMapShader.d.ts +1 -0
- three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +1 -0
- three/examples/jsm/shaders/FXAAShader.d.ts +1 -0
- three/examples/jsm/shaders/FocusShader.d.ts +1 -0
- three/examples/jsm/shaders/FreiChenShader.d.ts +1 -0
- three/examples/jsm/shaders/GodRaysShader.d.ts +4 -0
- three/examples/jsm/shaders/HalftoneShader.d.ts +1 -0
- three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +1 -0
- three/examples/jsm/shaders/HueSaturationShader.d.ts +1 -0
- three/examples/jsm/shaders/KaleidoShader.d.ts +1 -0
- three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +1 -0
- three/examples/jsm/shaders/LuminosityShader.d.ts +1 -0
- three/examples/jsm/shaders/MirrorShader.d.ts +1 -0
- three/examples/jsm/shaders/NormalMapShader.d.ts +1 -0
- three/examples/jsm/shaders/OutputShader.d.ts +1 -0
- three/examples/jsm/shaders/SAOShader.d.ts +1 -0
- three/examples/jsm/shaders/SMAAShader.d.ts +3 -0
- three/examples/jsm/shaders/SSAOShader.d.ts +3 -0
- three/examples/jsm/shaders/SSRShader.d.ts +3 -0
- three/examples/jsm/shaders/SobelOperatorShader.d.ts +1 -0
- three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +1 -0
- three/examples/jsm/shaders/TechnicolorShader.d.ts +1 -0
- three/examples/jsm/shaders/TriangleBlurShader.d.ts +1 -0
- three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +1 -0
- three/examples/jsm/shaders/VelocityShader.d.ts +14 -0
- three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +1 -0
- three/examples/jsm/shaders/WaterRefractionShader.d.ts +1 -0
- three/examples/jsm/utils/GPUStatsPanel.d.ts +12 -0
- three/examples/jsm/utils/GeometryUtils.d.ts +25 -0
- three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
- three/examples/jsm/webxr/VRButton.d.ts +5 -0
- three/examples/jsm/webxr/XRButton.d.ts +6 -0
- three/examples/jsm/webxr/XRControllerModelFactory.d.ts +21 -0
- three/examples/jsm/webxr/XREstimatedLight.d.ts +32 -0
- three/examples/jsm/webxr/XRHandMeshModel.d.ts +11 -0
- three/examples/jsm/webxr/XRHandModelFactory.d.ts +25 -0
- three/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +24 -0
- three/package.json +3 -2
- three/src/cameras/CubeCamera.d.ts +1 -2
- three/src/constants.d.ts +21 -10
- three/src/core/Object3D.d.ts +4 -4
- three/src/core/Raycaster.d.ts +1 -0
- three/src/extras/Earcut.d.ts +15 -0
- three/src/extras/core/Curve.d.ts +1 -1
- three/src/geometries/CapsuleGeometry.d.ts +1 -1
- three/src/helpers/AxesHelper.d.ts +2 -2
- three/src/helpers/Box3Helper.d.ts +2 -2
- three/src/lights/Light.d.ts +1 -2
- three/src/materials/Material.d.ts +20 -2
- three/src/materials/MeshPhysicalMaterial.d.ts +8 -6
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/math/Matrix4.d.ts +2 -1
- three/src/objects/SkinnedMesh.d.ts +9 -8
- three/src/renderers/WebGLRenderer.d.ts +12 -2
- three/src/scenes/Scene.d.ts +2 -2
- three/src/textures/DepthTexture.d.ts +3 -3
- three/src/textures/Texture.d.ts +2 -2
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Color, Matrix3, Matrix4, Vector2, Vector3, Vector4 } from '../../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
// disable automatic export, we have some private declarations
|
|
4
|
+
export const NodeShaderStage: {
|
|
5
|
+
VERTEX: 'vertex';
|
|
6
|
+
FRAGMENT: 'fragment';
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const NodeUpdateType: {
|
|
10
|
+
NONE: 'none';
|
|
11
|
+
FRAME: 'frame';
|
|
12
|
+
RENDER: 'render';
|
|
13
|
+
OBJECT: 'object';
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type NodeValueOption = Color | Vector2 | Vector3 | Vector4 | Matrix3 | Matrix4 | boolean | number;
|
|
17
|
+
export type NodeUpdateTypeOption = 'none' | 'frame' | 'object';
|
|
18
|
+
export type NodeShaderStageOption = 'vertex' | 'fragment' | 'compute';
|
|
19
|
+
export type NodeTypeOption =
|
|
20
|
+
| 'bool'
|
|
21
|
+
| 'int'
|
|
22
|
+
| 'float'
|
|
23
|
+
| 'vec2'
|
|
24
|
+
| 'vec3'
|
|
25
|
+
| 'vec4'
|
|
26
|
+
| 'mat3'
|
|
27
|
+
| 'mat4'
|
|
28
|
+
| 'code' /* CodeNode */
|
|
29
|
+
| 'color' /* NodeUtis.getValueType */
|
|
30
|
+
| 'uint'
|
|
31
|
+
| 'int' /* NodeBuilder.getComponentType */
|
|
32
|
+
| 'void'
|
|
33
|
+
| 'property'
|
|
34
|
+
| 'sampler'
|
|
35
|
+
| 'texture'
|
|
36
|
+
| 'cubeTexture' /* NodeBuilder.isReference */
|
|
37
|
+
| 'ivec2'
|
|
38
|
+
| 'uvec2'
|
|
39
|
+
| 'bvec2' /* ShaderNodeBaseElements */
|
|
40
|
+
| 'ivec3'
|
|
41
|
+
| 'uvec3'
|
|
42
|
+
| 'bvec3'
|
|
43
|
+
| 'ivec4'
|
|
44
|
+
| 'uvec4'
|
|
45
|
+
| 'bvec4'
|
|
46
|
+
| 'imat3'
|
|
47
|
+
| 'umat3'
|
|
48
|
+
| 'bmat3'
|
|
49
|
+
| 'imat4'
|
|
50
|
+
| 'umat4'
|
|
51
|
+
| 'bmat4';
|
|
52
|
+
|
|
53
|
+
// can be defined with string template type in Typescript 4.1
|
|
54
|
+
export type SwizzleOption = string;
|
|
55
|
+
|
|
56
|
+
/** Should be the same type as Object3D.userData */
|
|
57
|
+
export interface NodeUserData {
|
|
58
|
+
[key: string]: any;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** generic key value type,curretly used by nodes */
|
|
62
|
+
export interface AnyObject {
|
|
63
|
+
[key: string]: any;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** a generic JSON type, used by nodes only */
|
|
67
|
+
export type AnyJson = any;
|
|
68
|
+
|
|
69
|
+
export const NodeType: {
|
|
70
|
+
BOOLEAN: 'bool';
|
|
71
|
+
INTEGER: 'int';
|
|
72
|
+
FLOAT: 'float';
|
|
73
|
+
VECTOR2: 'vec2';
|
|
74
|
+
VECTOR3: 'vec3';
|
|
75
|
+
VECTOR4: 'vec4';
|
|
76
|
+
MATRIX3: 'mat3';
|
|
77
|
+
MATRIX4: 'mat4';
|
|
78
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import TempNode from '../core/TempNode.js';
|
|
2
|
+
import { ShaderNode } from '../shadernode/ShaderNodeBaseElements.js';
|
|
3
|
+
import { Node } from '../Nodes.js';
|
|
4
|
+
|
|
5
|
+
export const BurnNode: ShaderNode<{ base: Node; blendNode: Node }>;
|
|
6
|
+
|
|
7
|
+
export const DodgeNode: ShaderNode<{ base: Node; blendNode: Node }>;
|
|
8
|
+
|
|
9
|
+
export const ScreenNode: ShaderNode<{ base: Node; blendNode: Node }>;
|
|
10
|
+
|
|
11
|
+
export const OverlayNode: ShaderNode<{ base: Node; blendNode: Node }>;
|
|
12
|
+
|
|
13
|
+
export type BlendMode =
|
|
14
|
+
| typeof BlendModeNode.BURN
|
|
15
|
+
| typeof BlendModeNode.DODGE
|
|
16
|
+
| typeof BlendModeNode.SCREEN
|
|
17
|
+
| typeof BlendModeNode.OVERLAY;
|
|
18
|
+
|
|
19
|
+
export default class BlendModeNode extends TempNode {
|
|
20
|
+
static BURN: 'burn';
|
|
21
|
+
static DODGE: 'dodge';
|
|
22
|
+
static SCREEN: 'screen';
|
|
23
|
+
static OVERLAY: 'overlay';
|
|
24
|
+
|
|
25
|
+
baseNode: Node;
|
|
26
|
+
blendMode: BlendMode;
|
|
27
|
+
blendNode: Node;
|
|
28
|
+
|
|
29
|
+
constructor(blendMode: BlendMode, baseNode: Node, blendNode: Node);
|
|
30
|
+
|
|
31
|
+
setup(): Node;
|
|
32
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import TempNode from '../core/TempNode.js';
|
|
2
|
+
import { Node } from '../Nodes.js';
|
|
3
|
+
|
|
4
|
+
export type ColorAdjustmentMethod =
|
|
5
|
+
| typeof ColorAdjustmentNode.SATURATION
|
|
6
|
+
| typeof ColorAdjustmentNode.VIBRANCE
|
|
7
|
+
| typeof ColorAdjustmentNode.HUE;
|
|
8
|
+
|
|
9
|
+
export default class ColorAdjustmentNode extends TempNode {
|
|
10
|
+
static SATURATION: 'saturation';
|
|
11
|
+
static VIBRANCE: 'vibrance';
|
|
12
|
+
static HUE: 'hue';
|
|
13
|
+
|
|
14
|
+
method: ColorAdjustmentMethod;
|
|
15
|
+
|
|
16
|
+
colorNode: Node;
|
|
17
|
+
adjustmentNode: Node;
|
|
18
|
+
|
|
19
|
+
constructor(method: ColorAdjustmentMethod, colorNode: Node, adjustmentNode?: Node);
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import TempNode from '../core/TempNode.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
|
|
4
|
+
export type ColorSpaceNodeMethod =
|
|
5
|
+
| typeof ColorSpaceNode.LINEAR_TO_LINEAR
|
|
6
|
+
| typeof ColorSpaceNode.LINEAR_TO_sRGB
|
|
7
|
+
| typeof ColorSpaceNode.sRGB_TO_LINEAR;
|
|
8
|
+
|
|
9
|
+
export default class ColorSpaceNode extends TempNode {
|
|
10
|
+
static LINEAR_TO_LINEAR: 'LinearToLinear';
|
|
11
|
+
static LINEAR_TO_sRGB: 'LinearTosRGB';
|
|
12
|
+
static sRGB_TO_LINEAR: 'sRGBToLinear';
|
|
13
|
+
|
|
14
|
+
method: ColorSpaceNodeMethod;
|
|
15
|
+
node: Node;
|
|
16
|
+
|
|
17
|
+
constructor(method: ColorSpaceNodeMethod | null, node: Node);
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import TempNode from '../core/TempNode.js';
|
|
2
|
+
import { NormalMapTypes } from '../../../../src/Three.js';
|
|
3
|
+
import Node from '../core/Node.js';
|
|
4
|
+
|
|
5
|
+
export default class NormalMapNode extends TempNode {
|
|
6
|
+
node: Node;
|
|
7
|
+
scaleNode: Node | null;
|
|
8
|
+
|
|
9
|
+
normalMapType: NormalMapTypes;
|
|
10
|
+
|
|
11
|
+
constructor(node: Node, scaleNode?: Node | null);
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import TempNode from '../core/TempNode.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import { ToneMapping } from '../../../../src/Three.js';
|
|
4
|
+
|
|
5
|
+
// exposure only
|
|
6
|
+
export const LinearToneMappingNode: Node;
|
|
7
|
+
|
|
8
|
+
export default class ToneMappingNode extends TempNode {
|
|
9
|
+
toneMapping: ToneMapping;
|
|
10
|
+
exposureNode: Node;
|
|
11
|
+
colorNode: Node | null;
|
|
12
|
+
|
|
13
|
+
constructor(toneMapping: ToneMapping, exposureNode?: Node, colorNode?: Node | null);
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Node from '../core/Node.js';
|
|
2
|
+
|
|
3
|
+
export type ViewportNodeScope =
|
|
4
|
+
| typeof ViewportNode.COORDINATE
|
|
5
|
+
| typeof ViewportNode.RESOLUTION
|
|
6
|
+
| typeof ViewportNode.TOP_LEFT
|
|
7
|
+
| typeof ViewportNode.BOTTOM_LEFT
|
|
8
|
+
| typeof ViewportNode.TOP_RIGHT
|
|
9
|
+
| typeof ViewportNode.BOTTOM_RIGHT;
|
|
10
|
+
|
|
11
|
+
export default class ViewportNode extends Node {
|
|
12
|
+
static COORDINATE: 'coordinate';
|
|
13
|
+
static RESOLUTION: 'resolution';
|
|
14
|
+
static TOP_LEFT: 'topLeft';
|
|
15
|
+
static BOTTOM_LEFT: 'bottomLeft';
|
|
16
|
+
static TOP_RIGHT: 'topRight';
|
|
17
|
+
static BOTTOM_RIGHT: 'bottomRight';
|
|
18
|
+
|
|
19
|
+
scope: ViewportNodeScope;
|
|
20
|
+
isViewportNode: true;
|
|
21
|
+
|
|
22
|
+
constructor(scope: ViewportNodeScope);
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShaderNode } from '../../shadernode/ShaderNodeElements.js';
|
|
2
|
+
import Node from '../../core/Node.js';
|
|
3
|
+
|
|
4
|
+
// Analytical approximation of the DFG LUT, one half of the
|
|
5
|
+
// split-sum approximation used in indirect specular lighting.
|
|
6
|
+
// via 'environmentBRDF' from "Physically Based Shading on Mobile"
|
|
7
|
+
// https://www.unrealengine.com/blog/physically-based-shading-on-mobile
|
|
8
|
+
declare const DFGApprox: ShaderNode<{ roughness: Node }>;
|
|
9
|
+
|
|
10
|
+
export default DFGApprox;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements.js';
|
|
2
|
+
import Node from '../../core/Node.js';
|
|
3
|
+
|
|
4
|
+
// Microfacet Models for Refraction through Rough Surfaces - equation (33)
|
|
5
|
+
// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html
|
|
6
|
+
// alpha is "roughness squared" in Disney’s reparameterization
|
|
7
|
+
declare const D_GGX: ShaderNode<{ alpha: Node; dotNH: Node }>;
|
|
8
|
+
|
|
9
|
+
export default D_GGX;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ShaderNode } from '../shadernode/ShaderNodeElements.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
|
|
4
|
+
declare const PhysicalLightingModel: {
|
|
5
|
+
direct: ShaderNode<{ lightDirection: Node; lightColor: Node; reflectedLight: Node }>;
|
|
6
|
+
indirectDiffuse: ShaderNode<{ irradiance: Node; reflectedLight: Node }>;
|
|
7
|
+
indirectSpecular: ShaderNode<{ radiance: Node; iblIrradiance: Node; reflectedLight: Node }>;
|
|
8
|
+
ambientOcclusion: ShaderNode<{ ambientOcclusion: Node; reflectedLight: Node }>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default PhysicalLightingModel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Color, Vector2, Vector3, Vector4 } from '../../../../src/Three.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import NodeBuilder from '../core/NodeBuilder.js';
|
|
4
|
+
|
|
5
|
+
export type RangeModeBound = number | Color | Vector2 | Vector3 | Vector4;
|
|
6
|
+
|
|
7
|
+
export default class RangeNode extends Node {
|
|
8
|
+
min: RangeModeBound;
|
|
9
|
+
max: RangeModeBound;
|
|
10
|
+
|
|
11
|
+
constructor(min: RangeModeBound, max: RangeModeBound);
|
|
12
|
+
getVectorLength(builder: NodeBuilder): number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Node from '../core/Node.js';
|
|
2
|
+
|
|
3
|
+
export default class ComputeNode extends Node {
|
|
4
|
+
isComputeNode: true;
|
|
5
|
+
|
|
6
|
+
count: number;
|
|
7
|
+
workgroupSize: number[];
|
|
8
|
+
dispatchCount: number;
|
|
9
|
+
|
|
10
|
+
constructor(computeNode: Node, count: number, workgroupSize?: number[]);
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import LightingNode from './LightingNode.js';
|
|
2
|
+
import { Light } from '../../../../src/Three.js';
|
|
3
|
+
import Node from '../core/Node.js';
|
|
4
|
+
|
|
5
|
+
export default class AnalyticLightNode<T extends Light> extends LightingNode {
|
|
6
|
+
light: T | null;
|
|
7
|
+
colorNode: Node;
|
|
8
|
+
|
|
9
|
+
constructor(light?: T | null);
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import AnalyticLightNode from './AnalyticLightNode.js';
|
|
2
|
+
import Object3DNode from '../accessors/Object3DNode.js';
|
|
3
|
+
import { HemisphereLight } from '../../../../src/Three.js';
|
|
4
|
+
import Node from '../core/Node.js';
|
|
5
|
+
|
|
6
|
+
export default class HemisphereLightNode extends AnalyticLightNode<HemisphereLight> {
|
|
7
|
+
lightPositionNode: Object3DNode;
|
|
8
|
+
lightDirectionNode: Node;
|
|
9
|
+
|
|
10
|
+
groundColorNode: Node;
|
|
11
|
+
|
|
12
|
+
constructor(light?: HemisphereLight | null);
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import ContextNode from '../core/ContextNode.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import { ShaderNode } from '../Nodes.js';
|
|
4
|
+
|
|
5
|
+
export interface LightingModelNode {
|
|
6
|
+
indirectDiffuse?: ShaderNode;
|
|
7
|
+
indirectSpecular?: ShaderNode;
|
|
8
|
+
ambientOcclusion?: ShaderNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default class LightingContextNode extends ContextNode {
|
|
12
|
+
lightingModelNode: LightingModelNode | null;
|
|
13
|
+
|
|
14
|
+
constructor(node: Node, lightingModelNode?: LightingModelNode | null);
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Light } from '../../../../src/Three.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import LightingNode from './LightingNode.js';
|
|
4
|
+
|
|
5
|
+
export default class LightsNode extends Node {
|
|
6
|
+
lightNodes: LightingNode[];
|
|
7
|
+
|
|
8
|
+
constructor(lightNodes?: LightingNode[]);
|
|
9
|
+
|
|
10
|
+
get hasLight(): boolean;
|
|
11
|
+
getLightNodeByHash(hash: string): LightingNode | null;
|
|
12
|
+
|
|
13
|
+
fromLights(lights: Light[]): this;
|
|
14
|
+
|
|
15
|
+
static setReference<T extends Light>(
|
|
16
|
+
lightClass: { new (): T },
|
|
17
|
+
lightNodeClass: { new (light: T): LightingNode },
|
|
18
|
+
): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import AnalyticLightNode from './AnalyticLightNode.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import { PointLight } from '../../../../src/Three.js';
|
|
4
|
+
|
|
5
|
+
export default class PointLightNode extends AnalyticLightNode<PointLight> {
|
|
6
|
+
cutoffDistanceNode: Node;
|
|
7
|
+
decayExponentNode: Node;
|
|
8
|
+
|
|
9
|
+
constructor(light?: PointLight | null);
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import AnalyticLightNode from './AnalyticLightNode.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import { SpotLight } from '../../../../src/Three.js';
|
|
4
|
+
|
|
5
|
+
export default class PointLightNode extends AnalyticLightNode<SpotLight> {
|
|
6
|
+
directionNode: Node;
|
|
7
|
+
|
|
8
|
+
coneCosNode: Node;
|
|
9
|
+
penumbraCosNode: Node;
|
|
10
|
+
|
|
11
|
+
cutoffDistanceNode: Node;
|
|
12
|
+
decayExponentNode: Node;
|
|
13
|
+
|
|
14
|
+
constructor(light?: SpotLight | null);
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Loader, LoadingManager, Texture } from '../../../../src/Three.js';
|
|
2
|
+
import { Node, AnyJson } from '../Nodes.js';
|
|
3
|
+
|
|
4
|
+
export interface NodeLoaderResult {
|
|
5
|
+
[hash: string]: Node;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default class NodeLoader extends Loader<NodeLoaderResult> {
|
|
9
|
+
constructor(manager?: LoadingManager);
|
|
10
|
+
|
|
11
|
+
parseNodes(json: AnyJson): NodeLoaderResult;
|
|
12
|
+
parse(json: AnyJson): Node;
|
|
13
|
+
setTextures(textures: { [key: string]: Texture }): this;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NodeLoaderResult } from './NodeLoader.js';
|
|
2
|
+
import { Material, ObjectLoader, Texture } from '../../../../src/Three.js';
|
|
3
|
+
import { AnyJson } from '../core/constants.js';
|
|
4
|
+
|
|
5
|
+
export default class NodeObjectLoader extends ObjectLoader {
|
|
6
|
+
parseNodes(json: AnyJson, textures: { [key: string]: Texture }): NodeLoaderResult;
|
|
7
|
+
|
|
8
|
+
parseMaterials(json: AnyJson, textures: { [key: string]: Texture }): { [key: string]: Material };
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import NodeMaterial from './NodeMaterial.js';
|
|
2
|
+
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
3
|
+
|
|
4
|
+
export default class LineBasicNodeMaterial extends NodeMaterial {
|
|
5
|
+
isLineBasicNodeMaterial: true;
|
|
6
|
+
|
|
7
|
+
constructor(parameters?: ShaderMaterialParameters);
|
|
8
|
+
copy(source: LineBasicNodeMaterial): this;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import NodeMaterial from './NodeMaterial.js';
|
|
2
|
+
import LineBasicNodeMaterial from './LineBasicNodeMaterial.js';
|
|
3
|
+
import MeshBasicNodeMaterial from './MeshBasicNodeMaterial.js';
|
|
4
|
+
import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js';
|
|
5
|
+
import PointsNodeMaterial from './PointsNodeMaterial.js';
|
|
6
|
+
import SpriteNodeMaterial from './SpriteNodeMaterial.js';
|
|
7
|
+
import MeshPhysicalNodeMaterial from './MeshPhysicalNodeMaterial.js';
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
NodeMaterial,
|
|
11
|
+
LineBasicNodeMaterial,
|
|
12
|
+
MeshBasicNodeMaterial,
|
|
13
|
+
MeshPhysicalNodeMaterial,
|
|
14
|
+
MeshStandardNodeMaterial,
|
|
15
|
+
PointsNodeMaterial,
|
|
16
|
+
SpriteNodeMaterial,
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import NodeMaterial from './NodeMaterial.js';
|
|
2
|
+
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
3
|
+
|
|
4
|
+
export default class MeshBasicNodeMaterial extends NodeMaterial {
|
|
5
|
+
isMeshBasicNodeMaterial: true;
|
|
6
|
+
lights: true;
|
|
7
|
+
|
|
8
|
+
constructor(paramters?: ShaderMaterialParameters);
|
|
9
|
+
copy(source: MeshBasicNodeMaterial): this;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
2
|
+
import { Swizzable, CheckerNode, Node } from '../Nodes.js';
|
|
3
|
+
|
|
4
|
+
import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js';
|
|
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,18 @@
|
|
|
1
|
+
import { ShaderMaterialParameters } from '../../../../src/Three.js';
|
|
2
|
+
import Node from '../core/Node.js';
|
|
3
|
+
import NodeMaterial from './NodeMaterial.js';
|
|
4
|
+
|
|
5
|
+
export default class MeshStandardNodeMaterial extends NodeMaterial {
|
|
6
|
+
isMeshStandardNodeMaterial: true;
|
|
7
|
+
|
|
8
|
+
emissiveNode: Node | null;
|
|
9
|
+
|
|
10
|
+
metalnessNode: Node | null;
|
|
11
|
+
roughnessNode: Node | null;
|
|
12
|
+
|
|
13
|
+
clearcoatNode: Node | null;
|
|
14
|
+
clearcoatRoughnessNode: Node | null;
|
|
15
|
+
|
|
16
|
+
constructor(paramters?: ShaderMaterialParameters);
|
|
17
|
+
copy(source: MeshStandardNodeMaterial): this;
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Material, ShaderMaterial } from '../../../../src/Three.js';
|
|
2
|
+
import NodeBuilder from '../core/NodeBuilder.js';
|
|
3
|
+
import Node from '../core/Node.js';
|
|
4
|
+
import { LightingModelNode } from '../lighting/LightingContextNode.js';
|
|
5
|
+
|
|
6
|
+
export default class NodeMaterial extends ShaderMaterial {
|
|
7
|
+
isNodeMaterial: true;
|
|
8
|
+
|
|
9
|
+
type: string;
|
|
10
|
+
|
|
11
|
+
lights: true;
|
|
12
|
+
normals: true;
|
|
13
|
+
|
|
14
|
+
lightsNode: Node | null;
|
|
15
|
+
envNode: Node | null;
|
|
16
|
+
|
|
17
|
+
colorNode: Node | null;
|
|
18
|
+
normalNode: Node | null;
|
|
19
|
+
opacityNode: Node | null;
|
|
20
|
+
backdropNode: Node | null;
|
|
21
|
+
backdropAlphaNode: Node | null;
|
|
22
|
+
alphaTestNode: Node | null;
|
|
23
|
+
|
|
24
|
+
positionNode: Node | null;
|
|
25
|
+
|
|
26
|
+
constructor();
|
|
27
|
+
|
|
28
|
+
build(builder: NodeBuilder): void;
|
|
29
|
+
customProgramCacheKey(): string;
|
|
30
|
+
generatePosition(builder: NodeBuilder): void;
|
|
31
|
+
generateDiffuseColor(builder: NodeBuilder): void;
|
|
32
|
+
generateLight(
|
|
33
|
+
builder: NodeBuilder,
|
|
34
|
+
lights: { diffuseColorNode: Node; lightingModelNode: LightingModelNode; lightsNode?: Node },
|
|
35
|
+
): void;
|
|
36
|
+
generateOutput(builder: NodeBuilder, lights: { diffuseColorNode: Node; outgoingLightNode: Node }): void;
|
|
37
|
+
static fromMaterial(m: Material): NodeMaterial;
|
|
38
|
+
}
|