@types/three 0.157.1 → 0.157.2

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.
Files changed (193) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/animation/CCDIKSolver.d.ts +30 -0
  3. three/examples/jsm/animation/MMDAnimationHelper.d.ts +105 -0
  4. three/examples/jsm/animation/MMDPhysics.d.ts +124 -0
  5. three/examples/jsm/cameras/CinematicCamera.d.ts +41 -0
  6. three/examples/jsm/capabilities/WebGL.d.ts +9 -0
  7. three/examples/jsm/controls/FirstPersonControls.d.ts +31 -0
  8. three/examples/jsm/controls/OrbitControls.d.ts +286 -0
  9. three/examples/jsm/controls/TrackballControls.d.ts +58 -0
  10. three/examples/jsm/effects/OutlineEffect.d.ts +36 -0
  11. three/examples/jsm/environments/RoomEnvironment.d.ts +6 -0
  12. three/examples/jsm/exporters/PLYExporter.d.ts +30 -0
  13. three/examples/jsm/exporters/STLExporter.d.ts +21 -0
  14. three/examples/jsm/geometries/TextGeometry.d.ts +115 -0
  15. three/examples/jsm/helpers/RectAreaLightHelper.d.ts +10 -0
  16. three/examples/jsm/helpers/ViewHelper.d.ts +15 -0
  17. three/examples/jsm/libs/fflate.module.d.ts +1 -0
  18. three/examples/jsm/libs/lil-gui.module.min.d.ts +609 -0
  19. three/examples/jsm/libs/tween.module.d.ts +219 -0
  20. three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +3 -0
  21. three/examples/jsm/lines/Line2.d.ts +11 -0
  22. three/examples/jsm/lines/LineGeometry.d.ts +10 -0
  23. three/examples/jsm/lines/LineMaterial.d.ts +31 -0
  24. three/examples/jsm/lines/LineSegments2.d.ts +14 -0
  25. three/examples/jsm/lines/LineSegmentsGeometry.d.ts +23 -0
  26. three/examples/jsm/loaders/DDSLoader.d.ts +16 -0
  27. three/examples/jsm/loaders/DRACOLoader.d.ts +19 -0
  28. three/examples/jsm/loaders/FontLoader.d.ts +27 -0
  29. three/examples/jsm/loaders/GLTFLoader.d.ts +147 -0
  30. three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +18 -0
  31. three/examples/jsm/loaders/KTX2Loader.d.ts +16 -0
  32. three/examples/jsm/loaders/LDrawLoader.d.ts +19 -0
  33. three/examples/jsm/loaders/MMDLoader.d.ts +56 -0
  34. three/examples/jsm/loaders/MTLLoader.d.ts +104 -0
  35. three/examples/jsm/loaders/OBJLoader.d.ts +10 -0
  36. three/examples/jsm/loaders/PCDLoader.d.ts +8 -0
  37. three/examples/jsm/loaders/RGBELoader.d.ts +19 -0
  38. three/examples/jsm/loaders/RGBMLoader.d.ts +32 -0
  39. three/examples/jsm/loaders/SVGLoader.d.ts +68 -0
  40. three/examples/jsm/loaders/TGALoader.d.ts +7 -0
  41. three/examples/jsm/loaders/TTFLoader.d.ts +8 -0
  42. three/examples/jsm/loaders/USDZLoader.d.ts +11 -0
  43. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
  44. three/examples/jsm/modifiers/TessellateModifier.d.ts +9 -0
  45. three/examples/jsm/nodes/Nodes.d.ts +149 -0
  46. three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
  47. three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
  48. three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
  49. three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +13 -0
  50. three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
  51. three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
  52. three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
  53. three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
  54. three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
  55. three/examples/jsm/nodes/accessors/NormalNode.d.ts +12 -0
  56. three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
  57. three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
  58. three/examples/jsm/nodes/accessors/PositionNode.d.ts +21 -0
  59. three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
  60. three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
  61. three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
  62. three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
  63. three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
  64. three/examples/jsm/nodes/accessors/TextureNode.d.ts +14 -0
  65. three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
  66. three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
  67. three/examples/jsm/nodes/code/CodeNode.d.ts +15 -0
  68. three/examples/jsm/nodes/code/ExpressionNode.d.ts +7 -0
  69. three/examples/jsm/nodes/code/FunctionCallNode.d.ts +13 -0
  70. three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
  71. three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
  72. three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
  73. three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
  74. three/examples/jsm/nodes/core/CacheNode.d.ts +10 -0
  75. three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
  76. three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
  77. three/examples/jsm/nodes/core/InputNode.d.ts +16 -0
  78. three/examples/jsm/nodes/core/Node.d.ts +31 -0
  79. three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
  80. three/examples/jsm/nodes/core/NodeBuilder.d.ts +138 -0
  81. three/examples/jsm/nodes/core/NodeCache.d.ts +9 -0
  82. three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
  83. three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
  84. three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
  85. three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
  86. three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
  87. three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
  88. three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
  89. three/examples/jsm/nodes/core/NodeUtils.d.ts +13 -0
  90. three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
  91. three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
  92. three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
  93. three/examples/jsm/nodes/core/StackNode.d.ts +11 -0
  94. three/examples/jsm/nodes/core/TempNode.d.ts +11 -0
  95. three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
  96. three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
  97. three/examples/jsm/nodes/core/VaryingNode.d.ts +8 -0
  98. three/examples/jsm/nodes/core/constants.d.ts +78 -0
  99. three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
  100. three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
  101. three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +18 -0
  102. three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
  103. three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
  104. three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
  105. three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
  106. three/examples/jsm/nodes/display/ViewportNode.d.ts +23 -0
  107. three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
  108. three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
  109. three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
  110. three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
  111. three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
  112. three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
  113. three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
  114. three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
  115. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
  116. three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
  117. three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
  118. three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
  119. three/examples/jsm/nodes/geometry/RangeNode.d.ts +13 -0
  120. three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
  121. three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
  122. three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
  123. three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
  124. three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
  125. three/examples/jsm/nodes/lighting/LightUtils.d.ts +4 -0
  126. three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
  127. three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
  128. three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
  129. three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
  130. three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
  131. three/examples/jsm/nodes/loaders/NodeLoader.d.ts +14 -0
  132. three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
  133. three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +9 -0
  134. three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +9 -0
  135. three/examples/jsm/nodes/materials/Materials.d.ts +17 -0
  136. three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +10 -0
  137. three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
  138. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +18 -0
  139. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +38 -0
  140. three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
  141. three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -0
  142. three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
  143. three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +4 -0
  144. three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +6 -0
  145. three/examples/jsm/nodes/math/CondNode.d.ts +9 -0
  146. three/examples/jsm/nodes/math/MathNode.d.ts +115 -0
  147. three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
  148. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
  149. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +156 -0
  150. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +310 -0
  151. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +166 -0
  152. three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
  153. three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
  154. three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
  155. three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
  156. three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
  157. three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +11 -0
  158. three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
  159. three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
  160. three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
  161. three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +8 -0
  162. three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
  163. three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
  164. three/examples/jsm/nodes/utils/TimerNode.d.ts +19 -0
  165. three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
  166. three/examples/jsm/objects/GroundProjectedSkybox.d.ts +13 -0
  167. three/examples/jsm/objects/MarchingCubes.d.ts +76 -0
  168. three/examples/jsm/objects/Reflector.d.ts +29 -0
  169. three/examples/jsm/postprocessing/EffectComposer.d.ts +31 -0
  170. three/examples/jsm/postprocessing/Pass.d.ts +31 -0
  171. three/examples/jsm/postprocessing/SavePass.d.ts +12 -0
  172. three/examples/jsm/postprocessing/ShaderPass.d.ts +11 -0
  173. three/examples/jsm/renderers/CSS3DRenderer.d.ts +26 -0
  174. three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +17 -0
  175. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +37 -0
  176. three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
  177. three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +10 -0
  178. three/examples/jsm/shaders/BokehShader2.d.ts +42 -0
  179. three/examples/jsm/shaders/ToonShader.d.ts +54 -0
  180. three/examples/jsm/shaders/VelocityShader.d.ts +13 -0
  181. three/examples/jsm/textures/FlakesTexture.d.ts +3 -0
  182. three/examples/jsm/utils/CameraUtils.d.ts +9 -0
  183. three/examples/jsm/utils/GeometryUtils.d.ts +25 -0
  184. three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
  185. three/examples/jsm/utils/ShadowMapViewer.d.ts +24 -0
  186. three/examples/jsm/webxr/VRButton.d.ts +5 -0
  187. three/examples/jsm/webxr/XRButton.d.ts +6 -0
  188. three/examples/jsm/webxr/XRControllerModelFactory.d.ts +21 -0
  189. three/examples/jsm/webxr/XRHandMeshModel.d.ts +11 -0
  190. three/examples/jsm/webxr/XRHandModelFactory.d.ts +25 -0
  191. three/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +24 -0
  192. three/package.json +2 -2
  193. three/src/extras/Earcut.d.ts +15 -0
@@ -0,0 +1,310 @@
1
+ import TextureNode from '../accessors/TextureNode.js';
2
+ import Node from '../core/Node.js';
3
+
4
+ // shader node utils
5
+ import {
6
+ ShaderNode,
7
+ nodeObject,
8
+ nodeObjects,
9
+ nodeArray,
10
+ nodeProxy,
11
+ nodeImmutable,
12
+ ConvertType,
13
+ Swizzable,
14
+ NodeRepresentation,
15
+ NodeOrType,
16
+ ProxiedObject,
17
+ ProxiedTuple,
18
+ } from './ShaderNode.js';
19
+ import { Material, Texture } from '../../../../src/Three.js';
20
+ import { NodeTypeOption, NodeUserData, NodeValueOption } from '../core/constants.js';
21
+ import { NodeBuilderContext } from '../core/NodeBuilder.js';
22
+ import {
23
+ BitangentNode,
24
+ BufferNode,
25
+ BypassNode,
26
+ CacheNode,
27
+ CameraNode,
28
+ CodeNode,
29
+ CodeNodeInclude,
30
+ ComputeNode,
31
+ ContextNode,
32
+ ExpressionNode,
33
+ FrontFacingNode,
34
+ FunctionCallNode,
35
+ FunctionNode,
36
+ FunctionNodeArguments,
37
+ MaterialNode,
38
+ MaterialReferenceNode,
39
+ MathNode,
40
+ MaxMipLevelNode,
41
+ ModelNode,
42
+ ModelViewProjectionNode,
43
+ NormalNode,
44
+ PointUVNode,
45
+ PositionNode,
46
+ PropertyNode,
47
+ ReferenceNode,
48
+ TangentNode,
49
+ UserDataNode,
50
+ UVNode,
51
+ VarNode,
52
+ VaryingNode,
53
+ } from '../Nodes.js';
54
+ import StorageBufferNode from '../accessors/StorageBufferNode.js';
55
+ import NodeCache from '../core/NodeCache.js';
56
+
57
+ // shader node base
58
+
59
+ export { ShaderNode, nodeObject, nodeObjects, nodeArray, nodeProxy, nodeImmutable, Swizzable };
60
+
61
+ export const color: ConvertType;
62
+
63
+ export const float: ConvertType;
64
+ export const int: ConvertType;
65
+ export const uint: ConvertType;
66
+ export const bool: ConvertType;
67
+
68
+ export const vec2: ConvertType;
69
+ export const ivec2: ConvertType;
70
+ export const uvec2: ConvertType;
71
+ export const bvec2: ConvertType;
72
+
73
+ export const vec3: ConvertType;
74
+ export const ivec3: ConvertType;
75
+ export const uvec3: ConvertType;
76
+ export const bvec3: ConvertType;
77
+
78
+ export const vec4: ConvertType;
79
+ export const ivec4: ConvertType;
80
+ export const uvec4: ConvertType;
81
+ export const bvec4: ConvertType;
82
+
83
+ export const mat3: ConvertType;
84
+ export const imat3: ConvertType;
85
+ export const umat3: ConvertType;
86
+ export const bmat3: ConvertType;
87
+
88
+ export const mat4: ConvertType;
89
+ export const imat4: ConvertType;
90
+ export const umat4: ConvertType;
91
+ export const bmat4: ConvertType;
92
+
93
+ export function uniform(nodeOrType: Node | Swizzable | NodeValueOption): Swizzable;
94
+
95
+ export function attribute(attributeName: string, nodeType: NodeTypeOption): Swizzable;
96
+ export function property(name: string, nodeOrType: Node | NodeTypeOption): Swizzable;
97
+
98
+ export function convert(node: NodeRepresentation, types: NodeTypeOption): Swizzable;
99
+ export function maxMipLevel(texture: Texture): Swizzable<MaxMipLevelNode>;
100
+
101
+ export function bypass(returnNode: NodeRepresentation, callNode: NodeRepresentation): Swizzable<BypassNode>;
102
+ export function cache(node: Node, cache?: NodeCache): Swizzable<CacheNode>;
103
+ export function code(code: string, nodeType?: NodeTypeOption): Swizzable<CodeNode>;
104
+ export function context(node: NodeRepresentation, context: NodeBuilderContext): Swizzable<ContextNode>;
105
+ export function expression(snipped?: string, nodeType?: NodeTypeOption): Swizzable<ExpressionNode>;
106
+
107
+ // definition: const call = nodeProxy(FunctionCallNode);
108
+ export function call<P extends FunctionNodeArguments>(
109
+ functionNode?: FunctionNode<P>,
110
+ parameters?: ProxiedObject<P>,
111
+ ): Swizzable<FunctionCallNode<P>>;
112
+
113
+ export type Fn<P extends FunctionNodeArguments> = P extends readonly [...unknown[]]
114
+ ? ProxiedTuple<P>
115
+ : readonly [ProxiedObject<P>];
116
+
117
+ export function func<P extends FunctionNodeArguments>(
118
+ code: string,
119
+ includes?: CodeNodeInclude[],
120
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
121
+ ): { call: (...params: Fn<P>) => Swizzable };
122
+
123
+ export function fn<P extends FunctionNodeArguments>(
124
+ code: string,
125
+ includes?: CodeNodeInclude[],
126
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
127
+ ): (...params: Fn<P>) => Swizzable;
128
+
129
+ export function label(node: NodeRepresentation, name?: string): Swizzable<VarNode>;
130
+ export function temp(node: NodeRepresentation, name?: string): Swizzable<VarNode>;
131
+ export function vary(node: NodeRepresentation, name?: string): Swizzable<VaryingNode>;
132
+
133
+ // accesors
134
+
135
+ export function buffer(value: ArrayLike<number>, nodeOrType: NodeOrType, count: number): Swizzable<BufferNode>;
136
+ export function storage(value: ArrayLike<number>, nodeOrType: NodeOrType, count: number): Swizzable<StorageBufferNode>;
137
+
138
+ export const cameraProjectionMatrix: Swizzable<CameraNode>;
139
+ export const cameraViewMatrix: Swizzable<CameraNode>;
140
+ export const cameraNormalMatrix: Swizzable<CameraNode>;
141
+ export const cameraWorldMatrix: Swizzable<CameraNode>;
142
+ export const cameraPosition: Swizzable<CameraNode>;
143
+
144
+ export const materialAlphaTest: Swizzable<MaterialNode>;
145
+ export const materialColor: Swizzable<MaterialNode>;
146
+ export const materialEmissive: Swizzable<MaterialNode>;
147
+ export const materialOpacity: Swizzable<MaterialNode>;
148
+ export const materialRoughness: Swizzable<MaterialNode>;
149
+ export const materialMetalness: Swizzable<MaterialNode>;
150
+ export const materialRotation: Swizzable<MaterialNode>;
151
+
152
+ export const diffuseColor: Swizzable<PropertyNode>;
153
+ export const roughness: Swizzable<PropertyNode>;
154
+ export const metalness: Swizzable<PropertyNode>;
155
+ export const alphaTest: Swizzable<PropertyNode>;
156
+ export const specularColor: Swizzable<PropertyNode>;
157
+
158
+ export function reference<T>(name: string, nodeOrType: NodeOrType, object: T): Swizzable<ReferenceNode<T>>;
159
+ export function materialReference(
160
+ name: string,
161
+ nodeOrType: NodeOrType,
162
+ material: Material,
163
+ ): Swizzable<MaterialReferenceNode>;
164
+ export function userData(name: string, inputType: NodeTypeOption, userData?: NodeUserData): Swizzable<UserDataNode>;
165
+
166
+ export function modelViewProjection(position?: NodeRepresentation): Swizzable<ModelViewProjectionNode>;
167
+
168
+ export const normalGeometry: Swizzable<NormalNode>;
169
+ export const normalLocal: Swizzable<NormalNode>;
170
+ export const normalWorld: Swizzable<NormalNode>;
171
+ export const normalView: Swizzable<NormalNode>;
172
+ export const transformedNormalView: Swizzable<VarNode>;
173
+
174
+ export const tangentGeometry: Swizzable<TangentNode>;
175
+ export const tangentLocal: Swizzable<TangentNode>;
176
+ export const tangentView: Swizzable<TangentNode>;
177
+ export const tangentWorld: Swizzable<TangentNode>;
178
+ export const transformedTangentView: Swizzable<MathNode>;
179
+ export const transformedTangentWorld: Swizzable<MathNode>;
180
+
181
+ export const bitangentGeometry: Swizzable<BitangentNode>;
182
+ export const bitangentLocal: Swizzable<BitangentNode>;
183
+ export const bitangentView: Swizzable<BitangentNode>;
184
+ export const bitangentWorld: Swizzable<BitangentNode>;
185
+ export const transformedBitangentView: Swizzable<MathNode>;
186
+ export const transformedBitangentWorld: Swizzable<MathNode>;
187
+
188
+ export const modelViewMatrix: Swizzable<ModelNode>;
189
+ export const modelNormalMatrix: Swizzable<ModelNode>;
190
+ export const modelWorldMatrix: Swizzable<ModelNode>;
191
+ export const modelPosition: Swizzable<ModelNode>;
192
+ export const modelViewPosition: Swizzable<ModelNode>;
193
+
194
+ export const positionGeometry: Swizzable<PositionNode>;
195
+ export const positionLocal: Swizzable<PositionNode>;
196
+ export const positionWorld: Swizzable<PositionNode>;
197
+ export const positionWorldDirection: Swizzable<PositionNode>;
198
+ export const positionView: Swizzable<PositionNode>;
199
+ export const positionViewDirection: Swizzable<PositionNode>;
200
+
201
+ export function texture(
202
+ value: Texture,
203
+ uvNode?: NodeRepresentation,
204
+ levelNode?: NodeRepresentation,
205
+ ): Swizzable<TextureNode>;
206
+ export function sampler(texture: Texture | TextureNode): Swizzable;
207
+ export function uv(index?: number): Swizzable<UVNode>;
208
+ export const pointUV: Swizzable<PointUVNode>;
209
+
210
+ // gpgpu
211
+
212
+ export function compute(node: NodeRepresentation, count: number, workgroupSize: number[]): Swizzable<ComputeNode>;
213
+
214
+ // math
215
+
216
+ export const EPSILON: Swizzable;
217
+ export const INFINITY: Swizzable;
218
+
219
+ export function cond(condNode: NodeRepresentation, ifNode: NodeRepresentation, elseNode: NodeRepresentation): Swizzable;
220
+
221
+ type Operator = (a: NodeRepresentation, b: NodeRepresentation, ...others: NodeRepresentation[]) => Swizzable;
222
+ type Unary = (a: NodeRepresentation) => Swizzable<MathNode>;
223
+ type Binary = (a: NodeRepresentation, b: NodeRepresentation) => Swizzable<MathNode>;
224
+ type Ternary = (a: NodeRepresentation, b: NodeRepresentation, c: NodeRepresentation) => Swizzable<MathNode>;
225
+
226
+ export const add: Operator;
227
+ export const sub: Operator;
228
+ export const mul: Operator;
229
+ export const div: Operator;
230
+ export const remainder: Operator;
231
+ export const equal: Operator;
232
+ export const assign: Operator;
233
+ export const lessThan: Operator;
234
+ export const greaterThan: Operator;
235
+ export const lessThanEqual: Operator;
236
+ export const greaterThanEqual: Operator;
237
+ export const and: Operator;
238
+ export const or: Operator;
239
+ export const xor: Operator;
240
+ export const bitAnd: Operator;
241
+ export const bitOr: Operator;
242
+ export const bitXor: Operator;
243
+ export const shiftLeft: Operator;
244
+ export const shiftRight: Operator;
245
+
246
+ export const radians: Unary;
247
+ export const degrees: Unary;
248
+ export const exp: Unary;
249
+ export const exp2: Unary;
250
+ export const log: Unary;
251
+ export const log2: Unary;
252
+ export const sqrt: Unary;
253
+ export const inversesqrt: Unary;
254
+ export const floor: Unary;
255
+ export const ceil: Unary;
256
+ export const normalize: Unary;
257
+ export const fract: Unary;
258
+ export const sin: Unary;
259
+ export const cos: Unary;
260
+ export const tan: Unary;
261
+ export const asin: Unary;
262
+ export const acos: Unary;
263
+ export const atan: Unary;
264
+ export const abs: Unary;
265
+ export const sign: Unary;
266
+ export const length: Unary;
267
+ export const negate: Unary;
268
+ export const invert: Unary;
269
+ export const dFdx: Unary;
270
+ export const dFdy: Unary;
271
+ export const round: Unary;
272
+ export const reciprocal: Unary;
273
+
274
+ export const atan2: Binary;
275
+ export const min: Binary;
276
+ export const max: Binary;
277
+ export const mod: Binary;
278
+ export const step: Binary;
279
+ export const reflect: Binary;
280
+ export const distance: Binary;
281
+ export const dot: Binary;
282
+ export const cross: Binary;
283
+ export const pow: Binary;
284
+ export const pow2: Binary;
285
+ export const pow3: Binary;
286
+ export const pow4: Binary;
287
+ export const transformDirection: Binary;
288
+
289
+ export const mix: Ternary;
290
+ export const clamp: Ternary;
291
+ export const refract: Ternary;
292
+ export const smoothstep: Ternary;
293
+ export const faceforward: Ternary;
294
+
295
+ // display
296
+
297
+ export const frontFacing: Swizzable<FrontFacingNode>;
298
+ export const faceDirection: Swizzable;
299
+
300
+ // lighting
301
+
302
+ // utils
303
+ export function element(node: NodeRepresentation, indexNode: NodeRepresentation): Swizzable;
304
+
305
+ // miscellaneous
306
+ export const lumaCoeffs: Swizzable<MathNode>;
307
+ export const luminance: Binary;
308
+ export const difference: Binary;
309
+ export const dotNV: Swizzable<MathNode>;
310
+ export const TBNViewMatrix: Swizzable<MathNode>;
@@ -0,0 +1,166 @@
1
+ import Node from '../core/Node.js';
2
+ import RangeNode, { RangeModeBound } from '../geometry/RangeNode.js';
3
+ import { NodeRepresentation, Swizzable } from './ShaderNode.js';
4
+ import {
5
+ CubeTexture,
6
+ InstancedMesh,
7
+ Light,
8
+ SkinnedMesh,
9
+ Texture,
10
+ TextureEncoding,
11
+ ToneMapping,
12
+ } from '../../../../src/Three.js';
13
+ import LightingContextNode, { LightingModelNode } from '../lighting/LightingContextNode.js';
14
+ import {
15
+ BlendModeNode,
16
+ CheckerNode,
17
+ ColorAdjustmentNode,
18
+ ColorSpaceNode,
19
+ CubeTextureNode,
20
+ EquirectUVNode,
21
+ FogNode,
22
+ FogRangeNode,
23
+ FogExp2Node,
24
+ InstanceNode,
25
+ LightsNode,
26
+ MatcapUVNode,
27
+ NormalMapNode,
28
+ OscNode,
29
+ PosterizeNode,
30
+ RemapNode,
31
+ ReflectVectorNode,
32
+ RotateUVNode,
33
+ SkinningNode,
34
+ SpriteSheetUVNode,
35
+ TimerNode,
36
+ ToneMappingNode,
37
+ TriplanarTexturesNode,
38
+ SpecularMIPLevelNode,
39
+ ViewportNode,
40
+ } from '../Nodes.js';
41
+
42
+ //
43
+ // Node Material Shader Syntax
44
+ //
45
+
46
+ // shader node base
47
+
48
+ export * from './ShaderNodeBaseElements.js';
49
+
50
+ // functions
51
+
52
+ export { default as BRDF_GGX } from '../functions/BSDF/BRDF_GGX.js'; // see https://github.com/tc39/proposal-export-default-from
53
+ export { default as BRDF_Lambert } from '../functions/BSDF/BRDF_Lambert.js';
54
+ export { default as D_GGX } from '../functions/BSDF/D_GGX.js';
55
+ export { default as DFGApprox } from '../functions/BSDF/DFGApprox.js';
56
+ export { default as F_Schlick } from '../functions/BSDF/F_Schlick.js';
57
+ export { default as V_GGX_SmithCorrelated } from '../functions/BSDF/V_GGX_SmithCorrelated.js';
58
+
59
+ export { default as getGeometryRoughness } from '../functions/material/getGeometryRoughness.js';
60
+ export { default as getRoughness } from '../functions/material/getRoughness.js';
61
+
62
+ export { default as PhysicalLightingModel } from '../functions/PhysicalLightingModel.js';
63
+
64
+ // accessors
65
+
66
+ export function cubeTexture(
67
+ value: CubeTexture,
68
+ uvNode?: NodeRepresentation,
69
+ levelNode?: NodeRepresentation,
70
+ ): Swizzable<CubeTextureNode>;
71
+ export function instance(instanceMesh: InstancedMesh): Swizzable<InstanceNode>;
72
+ export const reflectVector: Swizzable<ReflectVectorNode>;
73
+ export function skinning(skinnedMesh: SkinnedMesh): Swizzable<SkinningNode>;
74
+
75
+ // display
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
+
82
+ export function saturation(
83
+ colorNode: NodeRepresentation,
84
+ adjustmentNode?: NodeRepresentation,
85
+ ): Swizzable<ColorAdjustmentNode>;
86
+ export function vibrance(
87
+ colorNode: NodeRepresentation,
88
+ adjustmentNode?: NodeRepresentation,
89
+ ): Swizzable<ColorAdjustmentNode>;
90
+ export function hue(colorNode: NodeRepresentation, adjustmentNode?: NodeRepresentation): Swizzable<ColorAdjustmentNode>;
91
+
92
+ export function colorSpace(node: NodeRepresentation, encoding: TextureEncoding): Swizzable<ColorSpaceNode>;
93
+ export function normalMap(node: Node, scaleNode?: Node): Swizzable<NormalMapNode>;
94
+ export function toneMapping(
95
+ mapping: ToneMapping,
96
+ exposure: NodeRepresentation,
97
+ color: NodeRepresentation,
98
+ ): Swizzable<ToneMappingNode>;
99
+
100
+ export function posterize(sourceNode: NodeRepresentation, stepsNode: NodeRepresentation): Swizzable<PosterizeNode>;
101
+
102
+ export const viewportCoordinate: Swizzable<ViewportNode>;
103
+ export const viewportResolution: Swizzable<ViewportNode>;
104
+ export const viewportTopLeft: Swizzable<ViewportNode>;
105
+ export const viewportBottomLeft: Swizzable<ViewportNode>;
106
+ export const viewportTopRight: Swizzable<ViewportNode>;
107
+ export const viewportBottomRight: Swizzable<ViewportNode>;
108
+
109
+ // lighting
110
+
111
+ export function lights(lights: Light[]): Swizzable<LightsNode>;
112
+ export function lightingContext(node: Node, lightingModelNode?: LightingModelNode): Swizzable<LightingContextNode>;
113
+
114
+ // utils
115
+
116
+ export const matcapUV: Swizzable<MatcapUVNode>;
117
+ export const equirectUV: Swizzable<EquirectUVNode>;
118
+
119
+ export function specularMIPLevel(): Swizzable<SpecularMIPLevelNode>;
120
+
121
+ export function oscSine(timeNode?: NodeRepresentation): Swizzable<OscNode>;
122
+ export function oscSquare(timeNode?: NodeRepresentation): Swizzable<OscNode>;
123
+ export function oscTriangle(timeNode?: NodeRepresentation): Swizzable<OscNode>;
124
+ export function oscSawtooth(timeNode?: NodeRepresentation): Swizzable<OscNode>;
125
+
126
+ export function remap(node: Node, inLowNode: Node): Swizzable<RemapNode>;
127
+ export function remapClamp(node: Node, inLowNode: Node): Swizzable<RemapNode>;
128
+
129
+ export function rotateUV(uvNode: Node, rotationNode: Node, centerNode?: Node): Swizzable<RotateUVNode>;
130
+
131
+ export function spritesheetUV(
132
+ countNode: NodeRepresentation,
133
+ uvNode?: NodeRepresentation,
134
+ frameNode?: NodeRepresentation,
135
+ ): Swizzable<SpriteSheetUVNode>;
136
+
137
+ export function timerLocal(timeScale: number, value?: number): Swizzable<TimerNode>;
138
+ export function timerGlobal(timeScale: number, value?: number): Swizzable<TimerNode>;
139
+ export function timerDelta(timeScale: number, value?: number): Swizzable<TimerNode>;
140
+ export const frameId: Swizzable<TimerNode>;
141
+ export function triplanarTextures(
142
+ textureXNode: NodeRepresentation,
143
+ textureYNode?: NodeRepresentation,
144
+ textureZNode?: NodeRepresentation,
145
+ scaleNode?: NodeRepresentation,
146
+ positionNode?: NodeRepresentation,
147
+ normalNode?: NodeRepresentation,
148
+ ): Swizzable<TriplanarTexturesNode>;
149
+ export function triplanarTexture(
150
+ texture: NodeRepresentation,
151
+ ...params: NodeRepresentation[]
152
+ ): Swizzable<TriplanarTexturesNode>;
153
+
154
+ // geometry
155
+
156
+ export function range(min: RangeModeBound, max: RangeModeBound): Swizzable<RangeNode>;
157
+
158
+ // procedural
159
+
160
+ export function checker(uvNode?: NodeRepresentation): Swizzable<CheckerNode>;
161
+
162
+ // fog
163
+
164
+ export function fog(colorNode: NodeRepresentation, factorNode: NodeRepresentation): Swizzable<FogNode>;
165
+ export function rangeFog(colorNode: Node, nearNode: Node, farNode: Node): Swizzable<FogRangeNode>;
166
+ export function exp2Fog(colorNode: Node, densityNode: Node): Swizzable<FogExp2Node>;
@@ -0,0 +1,9 @@
1
+ import Node from '../core/Node.js';
2
+ import { TempNode } from '../Nodes.js';
3
+
4
+ export default class ArrayElementNode extends TempNode {
5
+ node: Node;
6
+ indexNode: Node;
7
+
8
+ constructor(node: Node, indexNode: Node);
9
+ }
@@ -0,0 +1,8 @@
1
+ import Node from '../core/Node.js';
2
+ import { NodeTypeOption } from '../Nodes.js';
3
+
4
+ export default class ConvertNode extends Node {
5
+ node: Node;
6
+ convertTo: NodeTypeOption;
7
+ constructor(node: Node, convertTo: NodeTypeOption);
8
+ }
@@ -0,0 +1,6 @@
1
+ import { PositionNode, TempNode } from '../Nodes.js';
2
+ import { Swizzable } from '../shadernode/ShaderNodeElements.js';
3
+
4
+ export default class EquirectUVNode extends TempNode {
5
+ constructor(dirNode?: Swizzable<PositionNode>);
6
+ }
@@ -0,0 +1,10 @@
1
+ import Node from '../core/Node.js';
2
+ import { TempNode } from '../Nodes.js';
3
+
4
+ /**
5
+ * This node constructs given type from elements, like vec3(a,b,c)
6
+ */
7
+ export default class JoinNode extends TempNode {
8
+ nodes: Node[];
9
+ constructor(nodes: Node[]);
10
+ }
@@ -0,0 +1,5 @@
1
+ import TempNode from '../core/TempNode.js';
2
+
3
+ export default class MatcapUVNode extends TempNode {
4
+ constructor();
5
+ }
@@ -0,0 +1,11 @@
1
+ import UniformNode from '../core/UniformNode.js';
2
+ import { Texture } from '../../../../src/Three.js';
3
+ import { TextureNode } from '../Nodes.js';
4
+
5
+ export default class MaxMipLevelNode extends UniformNode {
6
+ textureNode: TextureNode;
7
+
8
+ constructor(textureNode: TextureNode);
9
+
10
+ get texture(): Texture;
11
+ }
@@ -0,0 +1,19 @@
1
+ import Node from '../core/Node.js';
2
+
3
+ export type OscNodeMethod =
4
+ | typeof OscNode.SINE
5
+ | typeof OscNode.SQUARE
6
+ | typeof OscNode.TRIANGLE
7
+ | typeof OscNode.SAWTOOTH;
8
+
9
+ export default class OscNode extends Node {
10
+ static SINE: 'sine';
11
+ static SQUARE: 'square';
12
+ static TRIANGLE: 'triangle';
13
+ static SAWTOOTH: 'sawtooth';
14
+
15
+ method: OscNodeMethod;
16
+ timeNode: Node;
17
+
18
+ constructor(method: OscNodeMethod, timeNode?: Node);
19
+ }
@@ -0,0 +1,13 @@
1
+ import Node from '../core/Node.js';
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
+ }
@@ -0,0 +1,10 @@
1
+ import TempNode from '../core/TempNode.js';
2
+ import Node from '../core/Node.js';
3
+
4
+ export default class RotateUVNode extends TempNode {
5
+ uvNode: Node;
6
+ rotationNode: Node;
7
+ centerNode: Node;
8
+
9
+ constructor(uvNode: Node, rotationNode: Node, centerNode?: Node);
10
+ }
@@ -0,0 +1,8 @@
1
+ import { Node, TextureNode } from '../Nodes.js';
2
+
3
+ export default class SpecularMIPLevelNode extends Node {
4
+ textureNode: TextureNode;
5
+ roughnessNode: Node | null;
6
+
7
+ constructor(textureNode: TextureNode, roughnessNode?: Node | null);
8
+ }
@@ -0,0 +1,16 @@
1
+ import { SwizzleOption } from '../core/constants.js';
2
+ import Node from '../core/Node.js';
3
+
4
+ /** swizzle node */
5
+ export default class SplitNode extends Node {
6
+ node: Node;
7
+ components: string;
8
+
9
+ /**
10
+ *
11
+ * @param node the input node
12
+ * @param components swizzle like string, default = "x"
13
+ */
14
+ constructor(node: Node, components?: SwizzleOption);
15
+ getVectorLength(): number;
16
+ }
@@ -0,0 +1,9 @@
1
+ import Node from '../core/Node.js';
2
+
3
+ export default class SpriteSheetUVNode extends Node {
4
+ countNode: Node;
5
+ uvNode: Node;
6
+ frameNode: Node;
7
+
8
+ constructor(countNode: Node, uvNode?: Node, frameNode?: Node);
9
+ }
@@ -0,0 +1,19 @@
1
+ import UniformNode from '../core/UniformNode.js';
2
+
3
+ export type TimerNodeScope =
4
+ | typeof TimerNode.LOCAL
5
+ | typeof TimerNode.GLOBAL
6
+ | typeof TimerNode.DELTA
7
+ | typeof TimerNode.FRAME;
8
+
9
+ export default class TimerNode extends UniformNode {
10
+ static LOCAL: 'local';
11
+ static GLOBAL: 'global';
12
+ static DELTA: 'delta';
13
+ static FRAME: 'frame';
14
+
15
+ scope: TimerNodeScope;
16
+ scale: number;
17
+
18
+ constructor(scope?: TimerNodeScope, scale?: number, value?: number);
19
+ }
@@ -0,0 +1,22 @@
1
+ import Node from '../core/Node.js';
2
+ import { PositionNode, Swizzable, TextureNode } from '../Nodes.js';
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
+ }
@@ -0,0 +1,13 @@
1
+ import { Mesh, IcosahedronGeometry, ShaderMaterial, Texture } from '../../../src/Three.js';
2
+
3
+ export class GroundProjectedSkybox extends Mesh<IcosahedronGeometry, ShaderMaterial> {
4
+ constructor(texture: Texture, options?: { height?: number; radius?: number });
5
+
6
+ set radius(radius: number);
7
+
8
+ get radius(): number;
9
+
10
+ set height(height: number);
11
+
12
+ get height(): number;
13
+ }