@types/three 0.184.0 → 0.185.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 (208) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +2 -0
  3. three/examples/jsm/controls/FirstPersonControls.d.ts +9 -0
  4. three/examples/jsm/controls/OrbitControls.d.ts +2 -2
  5. three/examples/jsm/controls/TransformControls.d.ts +32 -1
  6. three/examples/jsm/csm/CSMFrustum.d.ts +73 -13
  7. three/examples/jsm/exporters/DRACOExporter.d.ts +1 -1
  8. three/examples/jsm/exporters/GLTFExporter.d.ts +2 -2
  9. three/examples/jsm/exporters/PLYExporter.d.ts +5 -4
  10. three/examples/jsm/exporters/USDZExporter.d.ts +5 -1
  11. three/examples/jsm/generators/CityGenerator.d.ts +75 -0
  12. three/examples/jsm/generators/ForestGenerator.d.ts +79 -0
  13. three/examples/jsm/generators/TerrainGenerator.d.ts +67 -0
  14. three/examples/jsm/generators/TreeGenerator.d.ts +97 -0
  15. three/examples/jsm/generators/city/SidewalkGenerator.d.ts +40 -0
  16. three/examples/jsm/generators/city/SkyscraperGenerator.d.ts +83 -0
  17. three/examples/jsm/geometries/LoftGeometry.d.ts +83 -0
  18. three/examples/jsm/inspector/tabs/Parameters.d.ts +5 -2
  19. three/examples/jsm/lighting/ClusteredLighting.d.ts +45 -0
  20. three/examples/jsm/lighting/LightProbeGrid.d.ts +131 -13
  21. three/examples/jsm/loaders/DRACOLoader.d.ts +20 -6
  22. three/examples/jsm/loaders/EXRLoader.d.ts +2 -12
  23. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -1
  24. three/examples/jsm/loaders/HDRLoader.d.ts +2 -12
  25. three/examples/jsm/loaders/KTX2Loader.d.ts +1 -1
  26. three/examples/jsm/loaders/LWOLoader.d.ts +6 -0
  27. three/examples/jsm/loaders/RGBELoader.d.ts +1 -7
  28. three/examples/jsm/loaders/SVGLoader.d.ts +9 -6
  29. three/examples/jsm/loaders/TGALoader.d.ts +2 -2
  30. three/examples/jsm/loaders/TIFFLoader.d.ts +2 -11
  31. three/examples/jsm/loaders/USDLoader.d.ts +6 -1
  32. three/examples/jsm/misc/TileCreasedNormalsPlugin.d.ts +49 -0
  33. three/examples/jsm/objects/MarchingCubes.d.ts +2 -2
  34. three/examples/jsm/objects/Reflector.d.ts +38 -5
  35. three/examples/jsm/objects/SkyMesh.d.ts +1 -1
  36. three/examples/jsm/physics/RapierPhysics.d.ts +1 -0
  37. three/examples/jsm/tsl/display/BloomNode.d.ts +23 -6
  38. three/examples/jsm/tsl/display/ImportanceSampledEnvironment.d.ts +84 -0
  39. three/examples/jsm/tsl/display/RecurrentDenoiseNode.d.ts +89 -0
  40. three/examples/jsm/tsl/display/SSAAPassNode.d.ts +0 -2
  41. three/examples/jsm/tsl/display/SSGINode.d.ts +4 -1
  42. three/examples/jsm/tsl/display/SSRNode.d.ts +303 -30
  43. three/examples/jsm/tsl/display/TRAANode.d.ts +1 -1
  44. three/examples/jsm/tsl/display/TemporalReprojectNode.d.ts +64 -0
  45. three/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts +54 -0
  46. three/examples/jsm/tsl/math/curlNoise.d.ts +38 -0
  47. three/examples/jsm/tsl/utils/GroundedSkybox.d.ts +17 -0
  48. three/examples/jsm/tsl/utils/RNoise.d.ts +12 -0
  49. three/examples/jsm/tsl/utils/SpecularHelpers.d.ts +20 -0
  50. three/examples/jsm/webxr/WebGLXRFallback.d.ts +14 -0
  51. three/package.json +3 -3
  52. three/src/Three.TSL.d.ts +10 -3
  53. three/src/Three.WebGPU.Nodes.d.ts +2 -2
  54. three/src/Three.WebGPU.d.ts +5 -3
  55. three/src/animation/AnimationClip.d.ts +0 -10
  56. three/src/cameras/Camera.d.ts +1 -1
  57. three/src/core/InterleavedBuffer.d.ts +1 -1
  58. three/src/core/Object3D.d.ts +8 -4
  59. three/src/core/RenderTarget.d.ts +11 -0
  60. three/src/core/Timer.d.ts +1 -1
  61. three/src/core/UniformsGroup.d.ts +1 -1
  62. three/src/extras/Controls.d.ts +6 -5
  63. three/src/extras/core/ShapePath.d.ts +61 -65
  64. three/src/loaders/DataTextureLoader.d.ts +37 -3
  65. three/src/loaders/MaterialLoader.d.ts +8 -0
  66. three/src/materials/LineBasicMaterial.d.ts +5 -0
  67. three/src/materials/Material.d.ts +9 -1
  68. three/src/materials/MeshBasicMaterial.d.ts +30 -0
  69. three/src/materials/MeshDepthMaterial.d.ts +13 -0
  70. three/src/materials/MeshDistanceMaterial.d.ts +13 -0
  71. three/src/materials/MeshLambertMaterial.d.ts +50 -1
  72. three/src/materials/MeshMatcapMaterial.d.ts +31 -1
  73. three/src/materials/MeshNormalMaterial.d.ts +11 -1
  74. three/src/materials/MeshPhongMaterial.d.ts +50 -1
  75. three/src/materials/MeshPhysicalMaterial.d.ts +50 -0
  76. three/src/materials/MeshStandardMaterial.d.ts +53 -1
  77. three/src/materials/MeshToonMaterial.d.ts +43 -1
  78. three/src/materials/PointsMaterial.d.ts +9 -0
  79. three/src/materials/ShaderMaterial.d.ts +2 -0
  80. three/src/materials/SpriteMaterial.d.ts +9 -0
  81. three/src/materials/nodes/Line2NodeMaterial.d.ts +18 -13
  82. three/src/materials/nodes/NodeMaterial.d.ts +33 -13
  83. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +0 -84
  84. three/src/math/Box2.d.ts +3 -3
  85. three/src/math/Box3.d.ts +255 -19
  86. three/src/math/Color.d.ts +10 -10
  87. three/src/math/FrustumArray.d.ts +75 -16
  88. three/src/math/Interpolant.d.ts +111 -8
  89. three/src/math/Matrix2.d.ts +1 -1
  90. three/src/math/Matrix3.d.ts +10 -1
  91. three/src/math/Matrix4.d.ts +329 -105
  92. three/src/math/Vector2.d.ts +1 -2
  93. three/src/math/Vector3.d.ts +3 -4
  94. three/src/math/Vector4.d.ts +1 -2
  95. three/src/math/interpolants/BezierInterpolant.d.ts +19 -3
  96. three/src/math/interpolants/CubicInterpolant.d.ts +18 -3
  97. three/src/math/interpolants/DiscreteInterpolant.d.ts +8 -3
  98. three/src/math/interpolants/LinearInterpolant.d.ts +7 -3
  99. three/src/math/interpolants/QuaternionLinearInterpolant.d.ts +7 -3
  100. three/src/nodes/Nodes.d.ts +4 -13
  101. three/src/nodes/TSL.d.ts +7 -5
  102. three/src/nodes/accessors/Batch.d.ts +19 -0
  103. three/src/nodes/accessors/Instance.d.ts +34 -0
  104. three/src/nodes/accessors/MaterialNode.d.ts +86 -79
  105. three/src/nodes/accessors/Morph.d.ts +11 -0
  106. three/src/nodes/accessors/Skinning.d.ts +23 -0
  107. three/src/nodes/accessors/StorageBufferNode.d.ts +22 -23
  108. three/src/nodes/accessors/StorageTexture3DNode.d.ts +17 -0
  109. three/src/nodes/accessors/StorageTextureNode.d.ts +6 -4
  110. three/src/nodes/accessors/TextureNode.d.ts +15 -10
  111. three/src/nodes/core/ArrayNode.d.ts +16 -8
  112. three/src/nodes/core/ContextNode.d.ts +5 -6
  113. three/src/nodes/core/LightingModel.d.ts +2 -0
  114. three/src/nodes/core/Node.d.ts +50 -51
  115. three/src/nodes/core/NodeBuilder.d.ts +1 -133
  116. three/src/nodes/core/OverrideContextNode.d.ts +92 -0
  117. three/src/nodes/core/PropertyNode.d.ts +13 -2
  118. three/src/nodes/core/StructNode.d.ts +0 -2
  119. three/src/nodes/core/StructTypeNode.d.ts +5 -4
  120. three/src/nodes/core/UniformNode.d.ts +48 -9
  121. three/src/nodes/display/BlendModes.d.ts +72 -11
  122. three/src/nodes/display/FrontFacingNode.d.ts +62 -3
  123. three/src/nodes/display/PassNode.d.ts +0 -2
  124. three/src/nodes/display/PremultiplyAlphaFunctions.d.ts +37 -0
  125. three/src/nodes/gpgpu/AtomicFunctionNode.d.ts +53 -45
  126. three/src/nodes/lighting/LightingContextNode.d.ts +9 -2
  127. three/src/nodes/lighting/LightsNode.d.ts +4 -4
  128. three/src/nodes/math/MathNode.d.ts +358 -304
  129. three/src/nodes/math/OperatorNode.d.ts +253 -82
  130. three/src/nodes/tsl/TSLCore.d.ts +16 -9
  131. three/src/nodes/utils/ArrayElementNode.d.ts +5 -4
  132. three/src/nodes/utils/EquirectUV.d.ts +31 -1
  133. three/src/nodes/utils/Packing.d.ts +50 -3
  134. three/src/nodes/utils/RTTNode.d.ts +7 -12
  135. three/src/nodes/utils/Remap.d.ts +216 -29
  136. three/src/nodes/utils/SampleNode.d.ts +18 -8
  137. three/src/objects/BatchedMesh.d.ts +1 -1
  138. three/src/objects/InstancedMesh.d.ts +0 -8
  139. three/src/objects/Skeleton.d.ts +0 -2
  140. three/src/renderers/common/Backend.d.ts +0 -3
  141. three/src/renderers/common/CanvasTarget.d.ts +0 -49
  142. three/src/renderers/common/ClippingContext.d.ts +6 -1
  143. three/src/renderers/common/CubeRenderTarget.d.ts +2 -1
  144. three/src/renderers/common/Info.d.ts +26 -66
  145. three/src/renderers/common/InspectorBase.d.ts +0 -7
  146. three/src/renderers/common/Lighting.d.ts +49 -5
  147. three/src/renderers/common/Renderer.d.ts +34 -458
  148. three/src/renderers/common/RendererUtils.d.ts +1 -2
  149. three/src/renderers/common/TimestampQueryPool.d.ts +1 -1
  150. three/src/renderers/common/XRManager.d.ts +32 -299
  151. three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -117
  152. three/src/renderers/webgl/WebGLPrograms.d.ts +2 -0
  153. three/src/renderers/webgl/WebGLRenderLists.d.ts +5 -1
  154. three/src/renderers/webgl/WebGLState.d.ts +2 -0
  155. three/src/renderers/webgl-fallback/WebGLBackend.d.ts +1 -1
  156. three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +0 -10
  157. three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +0 -1
  158. three/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +5 -121
  159. three/src/textures/CubeDepthTexture.d.ts +2 -3
  160. three/src/textures/DataTexture.d.ts +2 -1
  161. three/src/textures/DepthTexture.d.ts +5 -5
  162. three/examples/jsm/lighting/TiledLighting.d.ts +0 -9
  163. three/examples/jsm/tsl/display/AnamorphicNode.d.ts +0 -31
  164. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +0 -22
  165. three/src/nodes/accessors/BatchNode.d.ts +0 -12
  166. three/src/nodes/accessors/InstanceNode.d.ts +0 -30
  167. three/src/nodes/accessors/InstancedMeshNode.d.ts +0 -10
  168. three/src/nodes/accessors/MorphNode.d.ts +0 -14
  169. three/src/nodes/accessors/SkinningNode.d.ts +0 -32
  170. three/src/renderers/common/Animation.d.ts +0 -102
  171. three/src/renderers/common/Attributes.d.ts +0 -59
  172. three/src/renderers/common/Background.d.ts +0 -47
  173. three/src/renderers/common/BindGroup.d.ts +0 -39
  174. three/src/renderers/common/Binding.d.ts +0 -50
  175. three/src/renderers/common/Bindings.d.ts +0 -132
  176. three/src/renderers/common/Buffer.d.ts +0 -90
  177. three/src/renderers/common/ChainMap.d.ts +0 -49
  178. three/src/renderers/common/Color4.d.ts +0 -55
  179. three/src/renderers/common/ComputePipeline.d.ts +0 -34
  180. three/src/renderers/common/DataMap.d.ts +0 -42
  181. three/src/renderers/common/Geometries.d.ts +0 -111
  182. three/src/renderers/common/Pipeline.d.ts +0 -29
  183. three/src/renderers/common/Pipelines.d.ts +0 -186
  184. three/src/renderers/common/ProgrammableStage.d.ts +0 -73
  185. three/src/renderers/common/RenderBundle.d.ts +0 -25
  186. three/src/renderers/common/RenderBundles.d.ts +0 -34
  187. three/src/renderers/common/RenderContext.d.ts +0 -235
  188. three/src/renderers/common/RenderContexts.d.ts +0 -47
  189. three/src/renderers/common/RenderList.d.ts +0 -226
  190. three/src/renderers/common/RenderLists.d.ts +0 -46
  191. three/src/renderers/common/RenderObject.d.ts +0 -448
  192. three/src/renderers/common/RenderObjectPipeline.d.ts +0 -33
  193. three/src/renderers/common/RenderObjects.d.ts +0 -151
  194. three/src/renderers/common/SampledTexture.d.ts +0 -28
  195. three/src/renderers/common/Sampler.d.ts +0 -19
  196. three/src/renderers/common/Textures.d.ts +0 -125
  197. three/src/renderers/common/Uniform.d.ts +0 -262
  198. three/src/renderers/common/UniformBuffer.d.ts +0 -20
  199. three/src/renderers/common/UniformsGroup.d.ts +0 -152
  200. three/src/renderers/common/XRRenderTarget.d.ts +0 -67
  201. three/src/renderers/common/nodes/NodeBuilderState.d.ts +0 -121
  202. three/src/renderers/common/nodes/NodeManager.d.ts +0 -309
  203. three/src/renderers/common/nodes/NodeSampledTexture.d.ts +0 -29
  204. three/src/renderers/common/nodes/NodeSampler.d.ts +0 -12
  205. three/src/renderers/common/nodes/NodeUniform.d.ts +0 -250
  206. three/src/renderers/common/nodes/NodeUniformsGroup.d.ts +0 -41
  207. three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +0 -6
  208. three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +0 -6
@@ -9,9 +9,7 @@ import { Quaternion } from "../../math/Quaternion.js";
9
9
  import { Vector3 } from "../../math/Vector3.js";
10
10
  import { Mesh } from "../../objects/Mesh.js";
11
11
  import { XRGripSpace, XRHandSpace, XRTargetRaySpace } from "../webxr/WebXRController.js";
12
- import QuadMesh from "./QuadMesh.js";
13
12
  import Renderer from "./Renderer.js";
14
- import { XRRenderTarget } from "./XRRenderTarget.js";
15
13
 
16
14
  export interface XRManagerEventMap {
17
15
  sessionstart: {};
@@ -25,11 +23,11 @@ export interface LayerAttributes {
25
23
  stencil?: boolean | undefined;
26
24
  }
27
25
 
26
+ interface XRGPUBinding {}
27
+
28
28
  /**
29
29
  * The XR manager is built on top of the WebXR Device API to
30
- * manage XR sessions with `WebGPURenderer`.
31
- *
32
- * XR is currently only supported with a WebGL 2 backend.
30
+ * manage XR sessions with renderer backends.
33
31
  *
34
32
  * @augments EventDispatcher
35
33
  */
@@ -63,291 +61,6 @@ declare class XRManager<TEventMap extends XRManagerEventMap = XRManagerEventMap>
63
61
  * @default true
64
62
  */
65
63
  cameraAutoUpdate: boolean;
66
- /**
67
- * The renderer.
68
- *
69
- * @private
70
- * @type {Renderer}
71
- */
72
- private _renderer;
73
- /**
74
- * Represents the camera for the left eye.
75
- *
76
- * @private
77
- * @type {PerspectiveCamera}
78
- */
79
- private _cameraL;
80
- /**
81
- * Represents the camera for the right eye.
82
- *
83
- * @private
84
- * @type {PerspectiveCamera}
85
- */
86
- private _cameraR;
87
- /**
88
- * A list of cameras used for rendering the XR views.
89
- *
90
- * @private
91
- * @type {Array<Camera>}
92
- */
93
- private _cameras;
94
- /**
95
- * The main XR camera.
96
- *
97
- * @private
98
- * @type {ArrayCamera}
99
- */
100
- private _cameraXR;
101
- /**
102
- * The current near value of the XR camera.
103
- *
104
- * @private
105
- * @type {?number}
106
- * @default null
107
- */
108
- private _currentDepthNear;
109
- /**
110
- * The current far value of the XR camera.
111
- *
112
- * @private
113
- * @type {?number}
114
- * @default null
115
- */
116
- private _currentDepthFar;
117
- /**
118
- * A list of WebXR controllers requested by the application.
119
- *
120
- * @private
121
- * @type {Array<WebXRController>}
122
- */
123
- private _controllers;
124
- /**
125
- * A list of XR input source. Each input source belongs to
126
- * an instance of WebXRController.
127
- *
128
- * @private
129
- * @type {Array<XRInputSource?>}
130
- */
131
- private _controllerInputSources;
132
- /**
133
- * The XR render target that represents the rendering destination
134
- * during an active XR session.
135
- *
136
- * @private
137
- * @type {?RenderTarget}
138
- * @default null
139
- */
140
- private _xrRenderTarget;
141
- /**
142
- * An array holding all the non-projection layers
143
- *
144
- * @private
145
- * @type {Array<Object>}
146
- * @default []
147
- */
148
- private _layers;
149
- /**
150
- * Whether the XR session uses layers.
151
- *
152
- * @private
153
- * @type {boolean}
154
- * @default false
155
- */
156
- private _sessionUsesLayers;
157
- /**
158
- * Whether the device supports binding gl objects.
159
- *
160
- * @private
161
- * @type {boolean}
162
- * @readonly
163
- */
164
- private readonly _supportsGlBinding;
165
- /**
166
- * Helper function to create native WebXR Layer.
167
- *
168
- * @private
169
- * @type {Function}
170
- */
171
- private _createXRLayer;
172
- /**
173
- * The current WebGL context.
174
- *
175
- * @private
176
- * @type {?WebGL2RenderingContext}
177
- * @default null
178
- */
179
- private _gl;
180
- /**
181
- * The current animation context.
182
- *
183
- * @private
184
- * @type {?Window}
185
- * @default null
186
- */
187
- private _currentAnimationContext;
188
- /**
189
- * The current animation loop.
190
- *
191
- * @private
192
- * @type {?Function}
193
- * @default null
194
- */
195
- private _currentAnimationLoop;
196
- /**
197
- * The current pixel ratio.
198
- *
199
- * @private
200
- * @type {?number}
201
- * @default null
202
- */
203
- private _currentPixelRatio;
204
- /**
205
- * The current size of the renderer's canvas
206
- * in logical pixel unit.
207
- *
208
- * @private
209
- * @type {Vector2}
210
- */
211
- private _currentSize;
212
- /**
213
- * The default event listener for handling events inside a XR session.
214
- *
215
- * @private
216
- * @type {Function}
217
- */
218
- private _onSessionEvent;
219
- /**
220
- * The event listener for handling the end of a XR session.
221
- *
222
- * @private
223
- * @type {Function}
224
- */
225
- private _onSessionEnd;
226
- /**
227
- * The event listener for handling the `inputsourceschange` event.
228
- *
229
- * @private
230
- * @type {Function}
231
- */
232
- private _onInputSourcesChange;
233
- /**
234
- * The animation loop which is used as a replacement for the default
235
- * animation loop of the application. It is only used when a XR session
236
- * is active.
237
- *
238
- * @private
239
- * @type {Function}
240
- */
241
- private _onAnimationFrame;
242
- /**
243
- * The current XR reference space.
244
- *
245
- * @private
246
- * @type {?XRReferenceSpace}
247
- * @default null
248
- */
249
- private _referenceSpace;
250
- /**
251
- * The current XR reference space type.
252
- *
253
- * @private
254
- * @type {XRReferenceSpaceType}
255
- * @default 'local-floor'
256
- */
257
- private _referenceSpaceType;
258
- /**
259
- * A custom reference space defined by the application.
260
- *
261
- * @private
262
- * @type {?XRReferenceSpace}
263
- * @default null
264
- */
265
- private _customReferenceSpace;
266
- /**
267
- * The framebuffer scale factor.
268
- *
269
- * @private
270
- * @type {number}
271
- * @default 1
272
- */
273
- private _framebufferScaleFactor;
274
- /**
275
- * The foveation factor.
276
- *
277
- * @private
278
- * @type {number}
279
- * @default 1
280
- */
281
- private _foveation;
282
- /**
283
- * A reference to the current XR session.
284
- *
285
- * @private
286
- * @type {?XRSession}
287
- * @default null
288
- */
289
- private _session;
290
- /**
291
- * A reference to the current XR base layer.
292
- *
293
- * @private
294
- * @type {?XRWebGLLayer}
295
- * @default null
296
- */
297
- private _glBaseLayer;
298
- /**
299
- * A reference to the current XR binding.
300
- *
301
- * @private
302
- * @type {?XRWebGLBinding}
303
- * @default null
304
- */
305
- private _glBinding;
306
- /**
307
- * A reference to the current XR projection layer.
308
- *
309
- * @private
310
- * @type {?XRProjectionLayer}
311
- * @default null
312
- */
313
- private _glProjLayer;
314
- /**
315
- * A reference to the current XR frame.
316
- *
317
- * @private
318
- * @type {?XRFrame}
319
- * @default null
320
- */
321
- private _xrFrame;
322
- /**
323
- * Whether the browser supports the APIs necessary to use XRProjectionLayers.
324
- *
325
- * Note: this does not represent XRSession explicitly requesting
326
- * `'layers'` as a feature - see `_sessionUsesLayers` and #30112
327
- *
328
- * @private
329
- * @type {boolean}
330
- * @readonly
331
- */
332
- private readonly _supportsLayers;
333
- /**
334
- * Whether the usage of multiview has been requested by the application or not.
335
- *
336
- * @private
337
- * @type {boolean}
338
- * @default false
339
- * @readonly
340
- */
341
- private readonly _useMultiviewIfPossible;
342
- /**
343
- * Whether the usage of multiview is actually enabled. This flag only evaluates to `true`
344
- * if multiview has been requested by the application and the `OVR_multiview2` is available.
345
- *
346
- * @private
347
- * @type {boolean}
348
- * @readonly
349
- */
350
- private readonly _useMultiview;
351
64
  /**
352
65
  * Returns an instance of `THREE.Group` that represents the transformation
353
66
  * of a XR controller in target ray space. The requested controller is defined
@@ -378,7 +91,7 @@ declare class XRManager<TEventMap extends XRManagerEventMap = XRManagerEventMap>
378
91
  /**
379
92
  * Returns the foveation value.
380
93
  *
381
- * @return {number|undefined} The foveation value. Returns `undefined` if no base or projection layer is defined.
94
+ * @return {number|undefined} The foveation value.
382
95
  */
383
96
  getFoveation(): number | undefined;
384
97
  /**
@@ -440,6 +153,15 @@ declare class XRManager<TEventMap extends XRManagerEventMap = XRManagerEventMap>
440
153
  * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session.
441
154
  */
442
155
  getEnvironmentBlendMode(): XREnvironmentBlendMode | undefined;
156
+ /**
157
+ * Returns the current base layer.
158
+ *
159
+ * This is an `XRProjectionLayer` when the targeted XR device supports the
160
+ * WebXR Layers API, or an `XRWebGLLayer` otherwise.
161
+ *
162
+ * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer.
163
+ */
164
+ getBaseLayer(): (XRWebGLLayer | XRProjectionLayer) | null;
443
165
  /**
444
166
  * Returns the current XR binding.
445
167
  *
@@ -449,6 +171,25 @@ declare class XRManager<TEventMap extends XRManagerEventMap = XRManagerEventMap>
449
171
  * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created.
450
172
  */
451
173
  getBinding(): XRWebGLBinding | null;
174
+ /**
175
+ * Applies WebXR fixed foveation to the internal post-processing render target
176
+ * used by the first XR render pass before compositing into a projection layer.
177
+ *
178
+ * Browser-side `XRWebGLBinding.foveateBoundTexture()` failures are treated as
179
+ * non-fatal so they do not interrupt rendering.
180
+ *
181
+ * @param {RenderTarget} renderTarget - The internal render target.
182
+ */
183
+ foveateBoundTexture(renderTarget: RenderTarget): void;
184
+ /**
185
+ * Returns the current XR WebGPU binding.
186
+ *
187
+ * Creates a new binding if needed and the browser is
188
+ * capable of doing so.
189
+ *
190
+ * @return {?XRGPUBinding} The XR WebGPU binding. Returns `null` if one cannot be created.
191
+ */
192
+ getWebGPUBinding(): XRGPUBinding | null;
452
193
  /**
453
194
  * Returns the current XR frame.
454
195
  *
@@ -544,14 +285,6 @@ declare class XRManager<TEventMap extends XRManagerEventMap = XRManagerEventMap>
544
285
  * @param {PerspectiveCamera} camera - The camera.
545
286
  */
546
287
  updateCamera(camera: PerspectiveCamera): void;
547
- /**
548
- * Returns a WebXR controller for the given controller index.
549
- *
550
- * @private
551
- * @param {number} index - The controller index.
552
- * @return {WebXRController} The XR controller.
553
- */
554
- private _getController;
555
288
  }
556
289
 
557
290
  export default XRManager;
@@ -1,10 +1,3 @@
1
- import { ToneMapping } from "../../../constants.js";
2
- import { Light } from "../../../lights/Light.js";
3
- import { Material } from "../../../materials/Material.js";
4
- import NodeMaterial from "../../../materials/nodes/NodeMaterial.js";
5
- import Node from "../../../nodes/core/Node.js";
6
- import AnalyticLightNode from "../../../nodes/lighting/AnalyticLightNode.js";
7
-
8
1
  /**
9
2
  * The purpose of a node library is to assign node implementations
10
3
  * to existing library features. In `WebGPURenderer` lights, materials
@@ -14,116 +7,6 @@ import AnalyticLightNode from "../../../nodes/lighting/AnalyticLightNode.js";
14
7
  * @private
15
8
  */
16
9
  declare class NodeLibrary {
17
- /**
18
- * A weak map that maps lights to light nodes.
19
- *
20
- * @type {WeakMap<Light.constructor,AnalyticLightNode.constructor>}
21
- */
22
- lightNodes: WeakMap<{
23
- new(): Light;
24
- }, {
25
- new(light: Light): AnalyticLightNode<Light>;
26
- }>;
27
- /**
28
- * A map that maps materials to node materials.
29
- *
30
- * @type {Map<string,NodeMaterial.constructor>}
31
- */
32
- materialNodes: Map<string, {
33
- new(): NodeMaterial;
34
- }>;
35
- /**
36
- * A map that maps tone mapping techniques (constants)
37
- * to tone mapping node functions.
38
- *
39
- * @type {Map<number,Function>}
40
- */
41
- toneMappingNodes: Map<ToneMapping, (color: Node, exposure: Node) => Node>;
42
- /**
43
- * Returns a matching node material instance for the given material object.
44
- *
45
- * This method also assigns/copies the properties of the given material object
46
- * to the node material. This is done to make sure the current material
47
- * configuration carries over to the node version.
48
- *
49
- * @param {Material} material - A material.
50
- * @return {NodeMaterial} The corresponding node material.
51
- */
52
- fromMaterial(material: Material): NodeMaterial;
53
- /**
54
- * Adds a tone mapping node function for a tone mapping technique (constant).
55
- *
56
- * @param {Function} toneMappingNode - The tone mapping node function.
57
- * @param {number} toneMapping - The tone mapping.
58
- */
59
- addToneMapping(toneMappingNode: (color: Node, exposure: Node) => Node, toneMapping: ToneMapping): void;
60
- /**
61
- * Returns a tone mapping node function for a tone mapping technique (constant).
62
- *
63
- * @param {number} toneMapping - The tone mapping.
64
- * @return {?Function} The tone mapping node function. Returns `null` if no node function is found.
65
- */
66
- getToneMappingFunction(toneMapping: ToneMapping): ((color: Node, exposure: Node) => Node) | null;
67
- /**
68
- * Returns a node material class definition for a material type.
69
- *
70
- * @param {string} materialType - The material type.
71
- * @return {?NodeMaterial.constructor} The node material class definition. Returns `null` if no node material is found.
72
- */
73
- getMaterialNodeClass(materialType: string): (new() => NodeMaterial) | null;
74
- /**
75
- * Adds a node material class definition for a given material type.
76
- *
77
- * @param {NodeMaterial.constructor} materialNodeClass - The node material class definition.
78
- * @param {string} materialClassType - The material type.
79
- */
80
- addMaterial(materialNodeClass: {
81
- new(): NodeMaterial;
82
- }, materialClassType: string): void;
83
- /**
84
- * Returns a light node class definition for a light class definition.
85
- *
86
- * @param {Light.constructor} light - The light class definition.
87
- * @return {?AnalyticLightNode.constructor} The light node class definition. Returns `null` if no light node is found.
88
- */
89
- getLightNodeClass(light: {
90
- new(): Light;
91
- }):
92
- | ({
93
- new(light: Light): AnalyticLightNode<Light>;
94
- })
95
- | null;
96
- /**
97
- * Adds a light node class definition for a given light class definition.
98
- *
99
- * @param {AnalyticLightNode.constructor} lightNodeClass - The light node class definition.
100
- * @param {Light.constructor} lightClass - The light class definition.
101
- */
102
- addLight<TLight extends Light>(lightNodeClass: {
103
- new(light: TLight): AnalyticLightNode<TLight>;
104
- }, lightClass: {
105
- new(): TLight;
106
- }): void;
107
- /**
108
- * Adds a node class definition for the given type to the provided type library.
109
- *
110
- * @param {Node.constructor} nodeClass - The node class definition.
111
- * @param {number|string} type - The object type.
112
- * @param {Map<number|string,Node.constructor>} library - The type library.
113
- */
114
- addType<TNodeClass, TType>(nodeClass: TNodeClass, type: TType, library: Map<TType, TNodeClass>): void;
115
- /**
116
- * Adds a node class definition for the given class definition to the provided type library.
117
- *
118
- * @param {Node.constructor} nodeClass - The node class definition.
119
- * @param {Node.constructor} baseClass - The class definition.
120
- * @param {WeakMap<Node.constructor, Node.constructor>} library - The type library.
121
- */
122
- addClass<TNodeClass, TBaseClass extends object>(
123
- nodeClass: TNodeClass,
124
- baseClass: TBaseClass,
125
- library: WeakMap<TBaseClass, TNodeClass>,
126
- ): void;
127
10
  }
128
11
 
129
12
  export default NodeLibrary;
@@ -152,6 +152,8 @@ export interface WebGLProgramParameters {
152
152
 
153
153
  skinning: boolean;
154
154
 
155
+ hasPositionAttribute: boolean;
156
+
155
157
  morphTargets: boolean;
156
158
  morphNormals: boolean;
157
159
  morphColors: boolean;
@@ -52,7 +52,11 @@ export class WebGLRenderList {
52
52
  z: number,
53
53
  group: Group | null,
54
54
  ): void;
55
- sort(opaqueSort: (a: any, b: any) => number, transparentSort: (a: any, b: any) => number): void;
55
+ sort(
56
+ opaqueSort: (a: any, b: any) => number,
57
+ transparentSort: (a: any, b: any) => number,
58
+ reversedDepth: boolean,
59
+ ): void;
56
60
  finish(): void;
57
61
  }
58
62
 
@@ -76,6 +76,8 @@ declare class WebGLState {
76
76
  activeTexture(webglSlot: number): void;
77
77
  bindTexture(webglType: number, webglTexture: WebGLTexture, webglSlot?: number): void;
78
78
  unbindTexture(): void;
79
+ pixelStorei(name: GLenum, value: GLint | GLboolean): void;
80
+ getParameter(name: GLenum): unknown;
79
81
 
80
82
  // Same interface as https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/compressedTexImage2D
81
83
  compressedTexImage2D(
@@ -8,7 +8,7 @@ export interface WebGLBackendParameters extends BackendParameters {
8
8
  export default class WebGLBackend extends Backend {
9
9
  readonly isWebGLBackend: boolean;
10
10
 
11
- constructor(parameters?: BackendParameters);
11
+ constructor(parameters?: WebGLBackendParameters);
12
12
 
13
13
  get coordinateSystem(): CoordinateSystem;
14
14
 
@@ -1,19 +1,9 @@
1
1
  import { Object3D } from "../../../core/Object3D.js";
2
- import { NodeShaderStage } from "../../../nodes/core/constants.js";
3
2
  import NodeBuilder from "../../../nodes/core/NodeBuilder.js";
4
3
  import Renderer from "../../common/Renderer.js";
5
4
 
6
5
  declare class GLSLNodeBuilder extends NodeBuilder {
7
6
  constructor(object: Object3D, renderer: Renderer);
8
-
9
- getUniforms(shaderStage: NodeShaderStage): string;
10
- getAttributes(shaderStage: NodeShaderStage): string;
11
- getVaryings(shaderStage: NodeShaderStage): string;
12
- getInstanceIndex(): string;
13
- getDrawIndex(): string | null;
14
- getFrontFacing(): string;
15
- getFragCoord(): string;
16
- buildCode(): void;
17
7
  }
18
8
 
19
9
  export default GLSLNodeBuilder;
@@ -18,7 +18,6 @@ import NodeLibrary from "../../common/nodes/NodeLibrary.js";
18
18
  * used in {@link WebGPURenderer}. It maps lights, tone mapping
19
19
  * techniques and materials to node-based implementations.
20
20
  *
21
- * @private
22
21
  * @augments NodeLibrary
23
22
  */
24
23
  declare class StandardNodeLibrary extends NodeLibrary {