@types/three 0.173.0 → 0.175.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.
Files changed (136) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +1 -1
  3. three/examples/jsm/animation/CCDIKSolver.d.ts +3 -2
  4. three/examples/jsm/controls/PointerLockControls.d.ts +4 -1
  5. three/examples/jsm/geometries/ParametricFunctions.d.ts +8 -0
  6. three/examples/jsm/interactive/HTMLMesh.d.ts +9 -2
  7. three/examples/jsm/loaders/LUTImageLoader.d.ts +2 -2
  8. three/examples/jsm/loaders/MTLLoader.d.ts +2 -1
  9. three/examples/jsm/misc/Timer.d.ts +13 -2
  10. three/examples/jsm/objects/Reflector.d.ts +1 -0
  11. three/examples/jsm/postprocessing/HalftonePass.d.ts +1 -1
  12. three/examples/jsm/postprocessing/LUTPass.d.ts +1 -1
  13. three/examples/jsm/postprocessing/SMAAPass.d.ts +1 -1
  14. three/examples/jsm/transpiler/AST.d.ts +218 -1
  15. three/examples/jsm/transpiler/TSLEncoder.d.ts +35 -1
  16. three/examples/jsm/tsl/math/Bayer.d.ts +4 -0
  17. three/examples/jsm/tsl/utils/Raymarching.d.ts +9 -0
  18. three/examples/jsm/webxr/VRButton.d.ts +4 -2
  19. three/package.json +2 -2
  20. three/src/Three.TSL.d.ts +7 -1
  21. three/src/Three.d.ts +6 -1
  22. three/src/animation/AnimationAction.d.ts +219 -19
  23. three/src/animation/AnimationClip.d.ts +140 -28
  24. three/src/animation/AnimationMixer.d.ts +100 -8
  25. three/src/animation/AnimationObjectGroup.d.ts +55 -14
  26. three/src/animation/AnimationUtils.d.ts +154 -43
  27. three/src/animation/KeyframeTrack.d.ts +134 -25
  28. three/src/animation/PropertyBinding.d.ts +89 -31
  29. three/src/animation/PropertyMixer.d.ts +62 -5
  30. three/src/animation/tracks/BooleanKeyframeTrack.d.ts +12 -4
  31. three/src/animation/tracks/ColorKeyframeTrack.d.ts +10 -4
  32. three/src/animation/tracks/NumberKeyframeTrack.d.ts +10 -4
  33. three/src/animation/tracks/QuaternionKeyframeTrack.d.ts +10 -4
  34. three/src/animation/tracks/StringKeyframeTrack.d.ts +12 -4
  35. three/src/animation/tracks/VectorKeyframeTrack.d.ts +10 -4
  36. three/src/constants.d.ts +2 -2
  37. three/src/core/BufferAttribute.d.ts +11 -0
  38. three/src/core/BufferGeometry.d.ts +1 -3
  39. three/src/core/Raycaster.d.ts +4 -0
  40. three/src/extras/Controls.d.ts +1 -1
  41. three/src/extras/Earcut.d.ts +5 -3
  42. three/src/extras/ImageUtils.d.ts +1 -0
  43. three/src/extras/PMREMGenerator.d.ts +15 -2
  44. three/src/geometries/TorusGeometry.d.ts +5 -6
  45. three/src/lights/PointLight.d.ts +1 -1
  46. three/src/loaders/FileLoader.d.ts +2 -2
  47. three/src/loaders/LoaderUtils.d.ts +0 -5
  48. three/src/materials/Material.d.ts +3 -0
  49. three/src/materials/nodes/NodeMaterial.d.ts +2 -1
  50. three/src/materials/nodes/VolumeNodeMaterial.d.ts +14 -2
  51. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +4 -4
  52. three/src/nodes/Nodes.d.ts +2 -2
  53. three/src/nodes/TSL.d.ts +1 -0
  54. three/src/nodes/accessors/BufferAttributeNode.d.ts +36 -26
  55. three/src/nodes/accessors/Lights.d.ts +1 -1
  56. three/src/nodes/accessors/MaterialProperties.d.ts +5 -0
  57. three/src/nodes/accessors/ModelNode.d.ts +1 -0
  58. three/src/nodes/accessors/Object3DNode.d.ts +7 -5
  59. three/src/nodes/accessors/SkinningNode.d.ts +4 -3
  60. three/src/nodes/accessors/StorageTextureNode.d.ts +2 -2
  61. three/src/nodes/accessors/Texture3DNode.d.ts +2 -2
  62. three/src/nodes/accessors/TextureNode.d.ts +3 -1
  63. three/src/nodes/code/ExpressionNode.d.ts +3 -2
  64. three/src/nodes/code/ScriptableNode.d.ts +1 -1
  65. three/src/nodes/code/ScriptableValueNode.d.ts +1 -1
  66. three/src/nodes/core/LightingModel.d.ts +13 -28
  67. three/src/nodes/core/Node.d.ts +24 -24
  68. three/src/nodes/core/NodeAttribute.d.ts +3 -3
  69. three/src/nodes/core/NodeCache.d.ts +2 -2
  70. three/src/nodes/core/NodeParser.d.ts +1 -1
  71. three/src/nodes/core/NodeUniform.d.ts +4 -4
  72. three/src/nodes/core/NodeVar.d.ts +4 -4
  73. three/src/nodes/core/NodeVarying.d.ts +2 -2
  74. three/src/nodes/core/StructTypeNode.d.ts +3 -3
  75. three/src/nodes/core/UniformNode.d.ts +7 -7
  76. three/src/nodes/core/constants.d.ts +0 -1
  77. three/src/nodes/display/PassNode.d.ts +10 -1
  78. three/src/nodes/functions/BSDF/LTC.d.ts +5 -1
  79. three/src/nodes/functions/VolumetricLightingModel.d.ts +6 -0
  80. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +1 -12
  81. three/src/nodes/lighting/AnalyticLightNode.d.ts +13 -1
  82. three/src/nodes/lighting/LightingContextNode.d.ts +18 -4
  83. three/src/nodes/lighting/LightsNode.d.ts +24 -0
  84. three/src/nodes/lighting/PointLightNode.d.ts +8 -7
  85. three/src/nodes/lighting/ShadowBaseNode.d.ts +3 -0
  86. three/src/nodes/math/ConditionalNode.d.ts +4 -4
  87. three/src/nodes/math/MathNode.d.ts +20 -12
  88. three/src/nodes/math/OperatorNode.d.ts +57 -26
  89. three/src/nodes/tsl/TSLBase.d.ts +1 -0
  90. three/src/nodes/tsl/TSLCore.d.ts +3 -0
  91. three/src/nodes/utils/DebugNode.d.ts +20 -0
  92. three/src/nodes/utils/ReflectorNode.d.ts +1 -0
  93. three/src/nodes/utils/SpriteSheetUVNode.d.ts +2 -2
  94. three/src/objects/LOD.d.ts +4 -3
  95. three/src/renderers/common/Animation.d.ts +6 -6
  96. three/src/renderers/common/Attributes.d.ts +2 -2
  97. three/src/renderers/common/BindGroup.d.ts +2 -2
  98. three/src/renderers/common/Binding.d.ts +2 -2
  99. three/src/renderers/common/Buffer.d.ts +3 -3
  100. three/src/renderers/common/BufferUtils.d.ts +7 -8
  101. three/src/renderers/common/BundleGroup.d.ts +2 -2
  102. three/src/renderers/common/ChainMap.d.ts +3 -3
  103. three/src/renderers/common/ClippingContext.d.ts +3 -3
  104. three/src/renderers/common/Color4.d.ts +8 -8
  105. three/src/renderers/common/ComputePipeline.d.ts +1 -1
  106. three/src/renderers/common/CubeRenderTarget.d.ts +6 -0
  107. three/src/renderers/common/DataMap.d.ts +2 -2
  108. three/src/renderers/common/Geometries.d.ts +4 -4
  109. three/src/renderers/common/Info.d.ts +2 -2
  110. three/src/renderers/common/Pipeline.d.ts +1 -1
  111. three/src/renderers/common/Pipelines.d.ts +9 -9
  112. three/src/renderers/common/ProgrammableStage.d.ts +4 -4
  113. three/src/renderers/common/RenderContext.d.ts +2 -2
  114. three/src/renderers/common/RenderContexts.d.ts +3 -3
  115. three/src/renderers/common/RenderList.d.ts +11 -11
  116. three/src/renderers/common/RenderObject.d.ts +13 -13
  117. three/src/renderers/common/RenderObjects.d.ts +3 -3
  118. three/src/renderers/common/RenderPipeline.d.ts +1 -1
  119. three/src/renderers/common/Renderer.d.ts +143 -108
  120. three/src/renderers/common/Textures.d.ts +6 -6
  121. three/src/renderers/common/TimestampQueryPool.d.ts +13 -1
  122. three/src/renderers/common/Uniform.d.ts +13 -13
  123. three/src/renderers/common/UniformBuffer.d.ts +1 -1
  124. three/src/renderers/common/UniformsGroup.d.ts +13 -13
  125. three/src/renderers/common/XRManager.d.ts +79 -15
  126. three/src/renderers/common/XRRenderTarget.d.ts +4 -4
  127. three/src/renderers/common/extras/PMREMGenerator.d.ts +9 -2
  128. three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -3
  129. three/src/renderers/common/nodes/NodeLibrary.d.ts +11 -11
  130. three/src/renderers/common/nodes/NodeUniform.d.ts +9 -9
  131. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +1 -1
  132. three/src/renderers/common/nodes/Nodes.d.ts +11 -11
  133. three/src/renderers/webgl/WebGLState.d.ts +7 -6
  134. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +1 -1
  135. three/src/textures/CanvasTexture.d.ts +1 -1
  136. three/examples/jsm/geometries/ParametricGeometries.d.ts +0 -32
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: Fri, 31 Jan 2025 19:32:17 GMT
11
+ * Last updated: Fri, 28 Mar 2025 18:39:32 GMT
12
12
  * Dependencies: [@tweenjs/tween.js](https://npmjs.com/package/@tweenjs/tween.js), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [@webgpu/types](https://npmjs.com/package/@webgpu/types), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
13
13
 
14
14
  # Credits
@@ -46,7 +46,7 @@ export * from "./exporters/USDZExporter.js";
46
46
  export * from "./geometries/BoxLineGeometry.js";
47
47
  export * from "./geometries/ConvexGeometry.js";
48
48
  export * from "./geometries/DecalGeometry.js";
49
- export * from "./geometries/ParametricGeometries.js";
49
+ export * from "./geometries/ParametricFunctions.js";
50
50
  export * from "./geometries/ParametricGeometry.js";
51
51
  export * from "./geometries/RoundedBoxGeometry.js";
52
52
  export * from "./geometries/TeapotGeometry.js";
@@ -14,6 +14,7 @@ export interface IK {
14
14
  minAngle?: number | undefined;
15
15
  maxAngle?: number | undefined;
16
16
  target: number;
17
+ blendFactor?: number | undefined;
17
18
  }
18
19
 
19
20
  export class CCDIKSolver {
@@ -22,8 +23,8 @@ export class CCDIKSolver {
22
23
 
23
24
  constructor(mesh: SkinnedMesh, iks?: IK[]);
24
25
 
25
- update(): this;
26
- updateOne(ik: IK): this;
26
+ update(globalBlendFactor?: number): this;
27
+ updateOne(ik: IK, overrideBlend?: number): this;
27
28
  createHelper(sphereSize?: number): CCDIKHelper;
28
29
  }
29
30
 
@@ -74,8 +74,11 @@ declare class PointerLockControls extends Controls<PointerLockControlsEventMap>
74
74
 
75
75
  /**
76
76
  * Activates the pointer lock.
77
+ *
78
+ * @param {boolean} [unadjustedMovement=false] - Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead.
79
+ * Setting it to true will disable mouse acceleration.
77
80
  */
78
- lock(): void;
81
+ lock(unadjustedMovement?: boolean): void;
79
82
 
80
83
  /**
81
84
  * Exits the pointer lock.
@@ -0,0 +1,8 @@
1
+ import { Vector3 } from "three";
2
+
3
+ declare function klein(v: number, u: number, target: Vector3): void;
4
+ declare function plane(u: number, v: number, target: Vector3): void;
5
+ declare function mobius(u: number, t: number, target: Vector3): void;
6
+ declare function mobius3d(u: number, t: number, target: Vector3): void;
7
+
8
+ export { klein, mobius, mobius3d, plane };
@@ -1,6 +1,13 @@
1
- import { Mesh, MeshBasicMaterial, PlaneGeometry } from "three";
1
+ import { Mesh, MeshBasicMaterial, Object3DEventMap, PlaneGeometry } from "three";
2
2
 
3
- export class HTMLMesh extends Mesh<PlaneGeometry, MeshBasicMaterial> {
3
+ export interface HTMLMeshEventMap extends Object3DEventMap {
4
+ mousedown: { data: { x: number; y: number } };
5
+ mousemove: { data: { x: number; y: number } };
6
+ mouseup: { data: { x: number; y: number } };
7
+ click: { data: { x: number; y: number } };
8
+ }
9
+
10
+ export class HTMLMesh extends Mesh<PlaneGeometry, MeshBasicMaterial, HTMLMeshEventMap> {
4
11
  constructor(dom: HTMLElement);
5
12
  dispose(): void;
6
13
  }
@@ -1,4 +1,4 @@
1
- import { Data3DTexture, Loader, Texture } from "three";
1
+ import { Data3DTexture, Loader, LoadingManager, Texture } from "three";
2
2
 
3
3
  export interface LUTImageResult {
4
4
  size: number;
@@ -8,7 +8,7 @@ export interface LUTImageResult {
8
8
  export class LUTImageLoader extends Loader<LUTImageResult> {
9
9
  flip: boolean;
10
10
 
11
- constructor(flipVertical?: boolean);
11
+ constructor(manager?: LoadingManager);
12
12
 
13
13
  getImageData(texture: Texture): ImageData;
14
14
 
@@ -38,8 +38,8 @@ export class MTLLoader extends Loader<MTLLoader.MaterialCreator> {
38
38
  }
39
39
 
40
40
  export interface MaterialInfo {
41
- ks?: number[] | undefined;
42
41
  kd?: number[] | undefined;
42
+ ks?: number[] | undefined;
43
43
  ke?: number[] | undefined;
44
44
  map_kd?: string | undefined;
45
45
  map_ks?: string | undefined;
@@ -47,6 +47,7 @@ export interface MaterialInfo {
47
47
  norm?: string | undefined;
48
48
  map_bump?: string | undefined;
49
49
  bump?: string | undefined;
50
+ disp?: string | undefined;
50
51
  map_d?: string | undefined;
51
52
  ns?: number | undefined;
52
53
  d?: number | undefined;
@@ -4,8 +4,8 @@
4
4
  *
5
5
  * - {@link Timer} has an {@link .update()} method that updates its internal state. That makes it possible to call
6
6
  * {@link .getDelta()} and {@link .getElapsed()} multiple times per simulation step without getting different values.
7
- * - The class uses the Page Visibility API to avoid large time delta values when the app is inactive (e.g. tab switched
8
- * or browser hidden).
7
+ * - The class can make use of the Page Visibility API to avoid large time delta values when the app is inactive (e.g.
8
+ * tab switched or browser hidden).
9
9
  *
10
10
  * @example
11
11
  * const timer = new Timer();
@@ -24,6 +24,17 @@
24
24
  export class Timer {
25
25
  constructor();
26
26
 
27
+ /**
28
+ * Connects the timer to the given document. Calling this method is not mandatory to use the timer but enables the
29
+ * usage of the Page Visibility API to avoid large time delta values.
30
+ */
31
+ connect(document: Document): void;
32
+
33
+ /**
34
+ * Disconnects the timer from the DOM and also disables the usage of the Page Visibility API.
35
+ */
36
+ disconnect(): void;
37
+
27
38
  /**
28
39
  * Returns the time delta in seconds.
29
40
  */
@@ -11,6 +11,7 @@ export interface ReflectorOptions {
11
11
 
12
12
  export class Reflector extends Mesh {
13
13
  type: "Reflector";
14
+ forceUpdate: boolean;
14
15
  camera: PerspectiveCamera;
15
16
 
16
17
  constructor(geometry?: BufferGeometry, options?: ReflectorOptions);
@@ -16,7 +16,7 @@ export interface HalftonePassParameters {
16
16
  }
17
17
 
18
18
  export class HalftonePass extends Pass {
19
- constructor(width: number, height: number, params: HalftonePassParameters);
19
+ constructor(params: HalftonePassParameters);
20
20
  uniforms: {
21
21
  tDiffuse: IUniform;
22
22
  shape: IUniform<number>;
@@ -9,5 +9,5 @@ export interface LUTPassParameters {
9
9
  export class LUTPass extends ShaderPass {
10
10
  lut?: DataTexture | Data3DTexture;
11
11
  intensity?: number;
12
- constructor(params: LUTPassParameters);
12
+ constructor(params?: LUTPassParameters);
13
13
  }
@@ -3,7 +3,7 @@ import { ShaderMaterial, Texture, WebGLRenderTarget } from "three";
3
3
  import { FullScreenQuad, Pass } from "./Pass.js";
4
4
 
5
5
  export class SMAAPass extends Pass {
6
- constructor(width: number, height: number);
6
+ constructor();
7
7
  edgesRT: WebGLRenderTarget;
8
8
  weightsRT: WebGLRenderTarget;
9
9
  areaTexture: Texture;
@@ -1,7 +1,224 @@
1
1
  export class Program {
2
- body: unknown[];
2
+ constructor();
3
+
4
+ body: Statement[];
3
5
 
4
6
  isProgram: true;
7
+ }
8
+
9
+ // Boolean seems to be handled as a Unary
10
+ export type Statement =
11
+ | VariableDeclaration
12
+ | Uniform
13
+ | Varying
14
+ | FunctionParameter
15
+ | FunctionDeclaration
16
+ | Expression
17
+ | Ternary
18
+ | Operator
19
+ | Unary
20
+ | Number
21
+ | String
22
+ | Conditional
23
+ | FunctionCall
24
+ | Return
25
+ | Discard
26
+ | Accessor
27
+ | StaticElement
28
+ | DynamicElement
29
+ | AccessorElements
30
+ | For
31
+ | null;
32
+
33
+ export class VariableDeclaration {
34
+ constructor(
35
+ type: string,
36
+ name: string,
37
+ value?: Accessor | null,
38
+ next?: VariableDeclaration | null,
39
+ immutable?: boolean,
40
+ );
41
+
42
+ type: string;
43
+ name: string;
44
+ value: Accessor | null;
45
+ next: VariableDeclaration | null;
46
+
47
+ immutable: boolean;
48
+
49
+ isVariableDeclaration: true;
50
+ }
51
+
52
+ export class Uniform {
53
+ constructor(type: string, name: string);
54
+
55
+ type: string;
56
+ name: string;
57
+
58
+ isUniform: true;
59
+ }
60
+
61
+ export class Varying {
62
+ constructor(type: string, name: string);
63
+
64
+ type: string;
65
+ name: string;
66
+
67
+ isVarying: true;
68
+ }
69
+
70
+ export class FunctionParameter {
71
+ constructor(type: string, name: string, qualifier?: string | null, immutable?: boolean);
72
+
73
+ type: string;
74
+ name: string;
75
+ qualifier: string | null;
76
+ immutable: boolean;
77
+
78
+ isFunctionParameter: true;
79
+ }
80
+
81
+ export class FunctionDeclaration {
82
+ constructor(type: string, name: string, params?: FunctionParameter[]);
83
+
84
+ type: string;
85
+ name: string;
86
+ params: FunctionParameter[];
87
+ body: Statement[];
88
+
89
+ isFunctionDeclaration: true;
90
+ }
91
+
92
+ export class Expression {
93
+ constructor(expression: string);
94
+
95
+ expression: string;
96
+
97
+ isExpression: true;
98
+ }
99
+
100
+ export class Ternary {
101
+ constructor(cond: Statement, left: Statement, right: Statement);
102
+
103
+ cond: Statement;
104
+ left: Statement;
105
+ right: Statement;
106
+
107
+ isTernary: true;
108
+ }
109
+
110
+ export class Operator {
111
+ constructor(type: string, left: Statement, right: Statement);
112
+
113
+ type: string;
114
+ left: Statement;
115
+ right: Statement;
116
+
117
+ isOperator: true;
118
+ }
119
+
120
+ export class Unary {
121
+ constructor(type: string, expression: Statement, after?: boolean);
122
+
123
+ type: string;
124
+ expression: Statement;
125
+ after: boolean;
126
+
127
+ isUnary: true;
128
+ }
129
+
130
+ export class Number {
131
+ constructor(value: string, type?: string);
5
132
 
133
+ type: string;
134
+ value: string;
135
+
136
+ isNumber: true;
137
+ }
138
+
139
+ export class String {
140
+ constructor(value: string);
141
+
142
+ value: string;
143
+
144
+ isString: true;
145
+ }
146
+
147
+ export class Conditional {
148
+ constructor(cond?: Conditional | null);
149
+
150
+ cond: Conditional | null;
151
+
152
+ body: Statement[];
153
+ elseConditional: Conditional | null;
154
+
155
+ isConditional: true;
156
+ }
157
+
158
+ export class FunctionCall {
159
+ constructor(name: string, params?: Statement[]);
160
+
161
+ name: string;
162
+ params: Statement[];
163
+
164
+ isFunctionCall: true;
165
+ }
166
+
167
+ export class Return {
168
+ constructor(value: Statement);
169
+
170
+ value: Statement;
171
+
172
+ isReturn: true;
173
+ }
174
+
175
+ export class Discard {
6
176
  constructor();
177
+
178
+ isDiscard: true;
179
+ }
180
+
181
+ export class Accessor {
182
+ constructor(property: string);
183
+
184
+ property: string;
185
+
186
+ isAccessor: true;
187
+ }
188
+
189
+ export class StaticElement {
190
+ constructor(value: Statement);
191
+
192
+ value: Statement;
193
+
194
+ isStaticElement: true;
195
+ }
196
+
197
+ export class DynamicElement {
198
+ constructor(value: Statement);
199
+
200
+ value: Statement;
201
+
202
+ isDynamicElement: true;
203
+ }
204
+
205
+ export class AccessorElements {
206
+ constructor(object: FunctionCall | Accessor, elements?: (StaticElement | DynamicElement)[]);
207
+
208
+ object: FunctionCall | Accessor;
209
+ elements: (StaticElement | DynamicElement)[];
210
+
211
+ isAccessorElements: true;
212
+ }
213
+
214
+ export class For {
215
+ constructor(initialization: Statement, condition: Statement, afterthought: Statement);
216
+
217
+ initialization: Statement;
218
+ condition: Statement;
219
+ afterthought: Statement;
220
+
221
+ body: Statement[];
222
+
223
+ isFor: true;
7
224
  }
@@ -1,7 +1,41 @@
1
- import { Program } from "./AST.js";
1
+ import {
2
+ Conditional,
3
+ Expression,
4
+ For,
5
+ FunctionDeclaration,
6
+ Program,
7
+ Statement,
8
+ Ternary,
9
+ Uniform,
10
+ VariableDeclaration,
11
+ Varying,
12
+ } from "./AST.js";
2
13
 
3
14
  export default class TSLEncoder {
4
15
  constructor();
5
16
 
17
+ tab: string;
18
+ imports: Set<string>;
19
+ global: Set<string>;
20
+ overloadings: Map<string, string>;
21
+ iife: boolean;
22
+ uniqueNames: boolean;
23
+ reference: boolean;
24
+
25
+ addImport(name: string): void;
26
+ emitUniform(node: Uniform): string;
27
+ emitExpression(node: Expression): string;
28
+ emitBody(body: Statement[]): string;
29
+ emitTernary(node: Ternary): string;
30
+ emitConditional(node: Conditional): string;
31
+ emitLoop(node: For): string;
32
+ emitFor(node: For): string;
33
+ emitForWhile(node: For): string;
34
+ emitVariables(node: VariableDeclaration, isRoot?: boolean): string;
35
+ emitVarying(node: Varying): string;
36
+ emitOverloadingFunction(nodes: FunctionDeclaration[]): string;
37
+ emitFunction(node: FunctionDeclaration): string;
38
+ setLastStatement(statement: Statement | null): void;
39
+ emitExtraLine(statement: Statement): string;
6
40
  emit(ast: Program): string;
7
41
  }
@@ -0,0 +1,4 @@
1
+ import { ShaderNodeObject } from "three/tsl";
2
+ import { Node } from "three/webgpu";
3
+
4
+ export const bayer16: (uv: Node) => ShaderNodeObject<Node>;
@@ -0,0 +1,9 @@
1
+ import { ShaderNodeObject } from "three/tsl";
2
+ import { FunctionNode, Node } from "three/webgpu";
3
+
4
+ export const RaymarchingBox: (
5
+ steps: number | Node,
6
+ callback:
7
+ | ((params: { positionRay: ShaderNodeObject<Node> }) => void)
8
+ | FunctionNode<{ positionRay: ShaderNodeObject<Node> }>,
9
+ ) => void;
@@ -1,5 +1,7 @@
1
- import { WebGLRenderer } from "three";
1
+ export interface VRButtonRenderer {
2
+ xr: { setSession: (value: XRSession) => Promise<void> };
3
+ }
2
4
 
3
5
  export class VRButton {
4
- static createButton(renderer: WebGLRenderer, sessionInit?: XRSessionInit): HTMLElement;
6
+ static createButton(renderer: VRButtonRenderer, sessionInit?: XRSessionInit): HTMLElement;
5
7
  }
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.173.0",
3
+ "version": "0.175.0",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -48,6 +48,6 @@
48
48
  "meshoptimizer": "~0.18.1"
49
49
  },
50
50
  "peerDependencies": {},
51
- "typesPublisherContentHash": "87d1eae9912dd0ad6de0abf1b48f1f1492997e994d634cca6cfd07481576ed8f",
51
+ "typesPublisherContentHash": "4f8410c1c95a3d20772bbb010426c784f9e9d9f20a8e4ab737d05ff2918553d6",
52
52
  "typeScriptVersion": "5.0"
53
53
  }
three/src/Three.TSL.d.ts CHANGED
@@ -116,6 +116,7 @@ export const color: typeof TSL.color;
116
116
  export const colorSpaceToWorking: typeof TSL.colorSpaceToWorking;
117
117
  export const colorToDirection: typeof TSL.colorToDirection;
118
118
  export const compute: typeof TSL.compute;
119
+ export const computeSkinning: typeof TSL.computeSkinning;
119
120
  export const cond: typeof TSL.cond;
120
121
  export const Const: typeof TSL.Const;
121
122
  export const context: typeof TSL.context;
@@ -128,6 +129,7 @@ export const cubeTexture: typeof TSL.cubeTexture;
128
129
  export const dFdx: typeof TSL.dFdx;
129
130
  export const dFdy: typeof TSL.dFdy;
130
131
  export const dashSize: typeof TSL.dashSize;
132
+ export const debug: typeof TSL.debug;
131
133
  export const defaultBuildStages: typeof TSL.defaultBuildStages;
132
134
  export const defaultShaderStages: typeof TSL.defaultShaderStages;
133
135
  export const defined: typeof TSL.defined;
@@ -285,6 +287,7 @@ export const modInt: typeof TSL.modInt;
285
287
  export const modelDirection: typeof TSL.modelDirection;
286
288
  export const modelNormalMatrix: typeof TSL.modelNormalMatrix;
287
289
  export const modelPosition: typeof TSL.modelPosition;
290
+ export const modelRadius: typeof TSL.modelRadius;
288
291
  export const modelScale: typeof TSL.modelScale;
289
292
  export const modelViewMatrix: typeof TSL.modelViewMatrix;
290
293
  export const modelViewPosition: typeof TSL.modelViewPosition;
@@ -336,6 +339,7 @@ export const numWorkgroups: typeof TSL.numWorkgroups;
336
339
  export const objectDirection: typeof TSL.objectDirection;
337
340
  export const objectGroup: typeof TSL.objectGroup;
338
341
  export const objectPosition: typeof TSL.objectPosition;
342
+ export const objectRadius: typeof TSL.objectRadius;
339
343
  export const objectScale: typeof TSL.objectScale;
340
344
  export const objectViewPosition: typeof TSL.objectViewPosition;
341
345
  export const objectWorldMatrix: typeof TSL.objectWorldMatrix;
@@ -380,6 +384,7 @@ export const range: typeof TSL.range;
380
384
  export const rangeFog: typeof TSL.rangeFog;
381
385
  export const rangeFogFactor: typeof TSL.rangeFogFactor;
382
386
  export const reciprocal: typeof TSL.reciprocal;
387
+ export const lightProjectionUV: typeof TSL.lightProjectionUV;
383
388
  export const reference: typeof TSL.reference;
384
389
  export const referenceBuffer: typeof TSL.referenceBuffer;
385
390
  export const reflect: typeof TSL.reflect;
@@ -404,6 +409,7 @@ export const rtt: typeof TSL.rtt;
404
409
  export const sRGBTransferEOTF: typeof TSL.sRGBTransferEOTF;
405
410
  export const sRGBTransferOETF: typeof TSL.sRGBTransferOETF;
406
411
  export const sampler: typeof TSL.sampler;
412
+ export const samplerComparison: typeof TSL.samplerComparison;
407
413
  export const saturate: typeof TSL.saturate;
408
414
  export const saturation: typeof TSL.saturation;
409
415
  export const screen: typeof TSL.screen;
@@ -416,6 +422,7 @@ export const select: typeof TSL.select;
416
422
  export const setCurrentStack: typeof TSL.setCurrentStack;
417
423
  export const shaderStages: typeof TSL.shaderStages;
418
424
  export const shadow: typeof TSL.shadow;
425
+ export const pointShadow: typeof TSL.pointShadow;
419
426
  export const shadowPositionWorld: typeof TSL.shadowPositionWorld;
420
427
  export const sharedUniformGroup: typeof TSL.sharedUniformGroup;
421
428
  export const shapeCircle: typeof TSL.shapeCircle;
@@ -428,7 +435,6 @@ export const sign: typeof TSL.sign;
428
435
  export const sin: typeof TSL.sin;
429
436
  export const sinc: typeof TSL.sinc;
430
437
  export const skinning: typeof TSL.skinning;
431
- export const skinningReference: typeof TSL.skinningReference;
432
438
  export const smoothstep: typeof TSL.smoothstep;
433
439
  export const smoothstepElement: typeof TSL.smoothstepElement;
434
440
  export const specularColor: typeof TSL.specularColor;
three/src/Three.d.ts CHANGED
@@ -28,7 +28,12 @@ export type { WebGLProperties } from "./renderers/webgl/WebGLProperties.js";
28
28
  export type { RenderItem, WebGLRenderList, WebGLRenderLists } from "./renderers/webgl/WebGLRenderLists.js";
29
29
  export type { WebGLShader } from "./renderers/webgl/WebGLShader.js";
30
30
  export type { WebGLShadowMap } from "./renderers/webgl/WebGLShadowMap.js";
31
- export type { WebGLState } from "./renderers/webgl/WebGLState.js";
31
+ export type {
32
+ WebGLColorBuffer,
33
+ WebGLDepthBuffer,
34
+ WebGLState,
35
+ WebGLStencilBuffer,
36
+ } from "./renderers/webgl/WebGLState.js";
32
37
  export type { WebGLTextures } from "./renderers/webgl/WebGLTextures.js";
33
38
  export type { WebGLUniforms } from "./renderers/webgl/WebGLUniforms.js";
34
39
  export * from "./renderers/webgl/WebGLUtils.js";