@types/three 0.183.1 → 0.184.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 (127) hide show
  1. three/README.md +2 -2
  2. three/examples/jsm/Addons.d.ts +11 -0
  3. three/examples/jsm/controls/FirstPersonControls.d.ts +5 -10
  4. three/examples/jsm/controls/TransformControls.d.ts +24 -0
  5. three/examples/jsm/geometries/TextGeometry.d.ts +43 -71
  6. three/examples/jsm/helpers/LightProbeGridHelper.d.ts +12 -0
  7. three/examples/jsm/inspector/Extension.d.ts +9 -0
  8. three/examples/jsm/inspector/Inspector.d.ts +21 -2
  9. three/examples/jsm/inspector/RendererInspector.d.ts +7 -2
  10. three/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts +20 -0
  11. three/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts +11 -0
  12. three/examples/jsm/inspector/tabs/Parameters.d.ts +22 -1
  13. three/examples/jsm/inspector/ui/Tab.d.ts +5 -1
  14. three/examples/jsm/inspector/ui/Values.d.ts +23 -3
  15. three/examples/jsm/interaction/InteractionManager.d.ts +18 -0
  16. three/examples/jsm/lighting/DynamicLighting.d.ts +16 -0
  17. three/examples/jsm/lighting/LightProbeGrid.d.ts +34 -0
  18. three/examples/jsm/loaders/ColladaLoader.d.ts +1 -0
  19. three/examples/jsm/loaders/EXRLoader.d.ts +2 -0
  20. three/examples/jsm/loaders/LDrawLoader.d.ts +1 -1
  21. three/examples/jsm/loaders/VTKLoader.d.ts +6 -0
  22. three/examples/jsm/objects/Reflector.d.ts +1 -2
  23. three/examples/jsm/objects/SkyMesh.d.ts +1 -0
  24. three/examples/jsm/tsl/WebGLNodesHandler.d.ts +14 -0
  25. three/examples/jsm/tsl/display/FSR1Node.d.ts +17 -0
  26. three/examples/jsm/tsl/display/SharpenNode.d.ts +22 -0
  27. three/examples/jsm/tsl/display/TAAUNode.d.ts +31 -0
  28. three/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts +21 -0
  29. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +1 -1
  30. three/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts +9 -0
  31. three/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts +9 -0
  32. three/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts +9 -0
  33. three/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts +9 -0
  34. three/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts +9 -0
  35. three/examples/jsm/utils/ColorUtils.d.ts +5 -0
  36. three/examples/jsm/utils/SceneOptimizer.d.ts +18 -0
  37. three/examples/jsm/webxr/XRHandMeshModel.d.ts +1 -0
  38. three/package.json +4 -5
  39. three/src/Three.Core.d.ts +13 -1
  40. three/src/Three.TSL.d.ts +7 -1
  41. three/src/Three.WebGPU.Nodes.d.ts +8 -4
  42. three/src/Three.WebGPU.d.ts +11 -4
  43. three/src/Three.d.ts +0 -11
  44. three/src/animation/AnimationMixer.d.ts +3 -1
  45. three/src/audio/AudioContext.d.ts +2 -2
  46. three/src/core/BufferAttribute.d.ts +13 -1
  47. three/src/core/RenderTarget.d.ts +8 -1
  48. three/src/core/UniformsGroup.d.ts +7 -1
  49. three/src/extras/Controls.d.ts +5 -1
  50. three/src/geometries/ExtrudeGeometry.d.ts +39 -53
  51. three/src/loaders/FileLoader.d.ts +2 -2
  52. three/src/materials/Material.d.ts +5 -1
  53. three/src/materials/MeshToonMaterial.d.ts +1 -1
  54. three/src/materials/nodes/Line2NodeMaterial.d.ts +7 -0
  55. three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -1
  56. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +11 -1
  57. three/src/math/ColorManagement.d.ts +1 -1
  58. three/src/math/Matrix2.d.ts +1 -1
  59. three/src/math/Matrix3.d.ts +1 -1
  60. three/src/math/Matrix4.d.ts +1 -1
  61. three/src/math/Plane.d.ts +1 -1
  62. three/src/math/Vector2.d.ts +2 -1
  63. three/src/math/Vector3.d.ts +2 -1
  64. three/src/math/Vector4.d.ts +2 -1
  65. three/src/nodes/Nodes.d.ts +0 -1
  66. three/src/nodes/TSL.d.ts +1 -1
  67. three/src/nodes/accessors/BufferAttributeNode.d.ts +1 -1
  68. three/src/nodes/core/Node.d.ts +37 -9
  69. three/src/nodes/core/StackNode.d.ts +1 -1
  70. three/src/nodes/core/StructTypeNode.d.ts +0 -4
  71. three/src/nodes/core/UniformGroupNode.d.ts +4 -3
  72. three/src/nodes/core/UniformNode.d.ts +3 -0
  73. three/src/nodes/core/VarNode.d.ts +16 -10
  74. three/src/nodes/display/ViewportDepthTextureNode.d.ts +1 -3
  75. three/src/nodes/display/ViewportTextureNode.d.ts +5 -5
  76. three/src/nodes/functions/ShadowMaskModel.d.ts +2 -2
  77. three/src/nodes/gpgpu/BarrierNode.d.ts +2 -0
  78. three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +16 -7
  79. three/src/nodes/gpgpu/ComputeNode.d.ts +6 -2
  80. three/src/nodes/materialx/lib/mx_noise.d.ts +4 -5
  81. three/src/nodes/math/MathNode.d.ts +64 -6
  82. three/src/nodes/tsl/TSLBase.d.ts +1 -1
  83. three/src/nodes/tsl/TSLCore.d.ts +568 -160
  84. three/src/nodes/utils/ConvertNode.d.ts +9 -2
  85. three/src/nodes/utils/EventNode.d.ts +6 -0
  86. three/src/nodes/utils/JoinNode.d.ts +9 -5
  87. three/src/nodes/utils/LoopNode.d.ts +1 -2
  88. three/src/nodes/utils/{RemapNode.d.ts → Remap.d.ts} +6 -22
  89. three/src/objects/BatchedMesh.d.ts +2 -0
  90. three/src/objects/InstancedMesh.d.ts +6 -6
  91. three/src/objects/SkinnedMesh.d.ts +3 -0
  92. three/src/renderers/WebGLRenderer.d.ts +10 -1
  93. three/src/renderers/common/Animation.d.ts +2 -2
  94. three/src/renderers/common/Attributes.d.ts +9 -1
  95. three/src/renderers/common/Backend.d.ts +4 -0
  96. three/src/renderers/common/Background.d.ts +2 -2
  97. three/src/renderers/common/BindGroup.d.ts +0 -6
  98. three/src/renderers/common/Bindings.d.ts +2 -2
  99. three/src/renderers/common/CanvasTarget.d.ts +3 -1
  100. three/src/renderers/common/ComputePipeline.d.ts +1 -1
  101. three/src/renderers/common/Info.d.ts +132 -1
  102. three/src/renderers/common/InspectorBase.d.ts +7 -1
  103. three/src/renderers/common/Pipelines.d.ts +19 -3
  104. three/src/renderers/common/ReadbackBuffer.d.ts +63 -0
  105. three/src/renderers/common/RenderBundle.d.ts +4 -1
  106. three/src/renderers/common/RenderBundles.d.ts +3 -1
  107. three/src/renderers/common/RenderObject.d.ts +2 -2
  108. three/src/renderers/common/RenderObjects.d.ts +3 -3
  109. three/src/renderers/common/Renderer.d.ts +29 -16
  110. three/src/renderers/common/XRManager.d.ts +1 -7
  111. three/src/renderers/common/nodes/NodeManager.d.ts +51 -11
  112. three/src/renderers/shaders/ShaderChunk.d.ts +1 -0
  113. three/src/renderers/shaders/UniformsLib.d.ts +5 -1
  114. three/src/renderers/webgl/WebGLBufferRenderer.d.ts +0 -6
  115. three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +0 -6
  116. three/src/renderers/webgl/WebGLPrograms.d.ts +5 -0
  117. three/src/renderers/webgl-fallback/WebGLBackend.d.ts +2 -0
  118. three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +19 -0
  119. three/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts +51 -0
  120. three/src/renderers/webgpu/WebGPUBackend.d.ts +9 -4
  121. three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +6 -0
  122. three/src/renderers/webxr/WebXRController.d.ts +5 -1
  123. three/src/renderers/webxr/WebXRManager.d.ts +3 -1
  124. three/src/scenes/Scene.d.ts +2 -2
  125. three/src/textures/ExternalTexture.d.ts +3 -2
  126. three/src/textures/HTMLTexture.d.ts +27 -0
  127. three/src/textures/Texture.d.ts +16 -1
@@ -0,0 +1,27 @@
1
+ import {
2
+ MagnificationTextureFilter,
3
+ Mapping,
4
+ MinificationTextureFilter,
5
+ PixelFormat,
6
+ TextureDataType,
7
+ Wrapping,
8
+ } from "../constants.js";
9
+ import { Texture } from "./Texture.js";
10
+
11
+ declare class HTMLTexture extends Texture<HTMLElement> {
12
+ readonly isHTMLTexture: boolean;
13
+
14
+ constructor(
15
+ image?: HTMLElement,
16
+ mapping?: Mapping,
17
+ wrapS?: Wrapping,
18
+ wrapT?: Wrapping,
19
+ magFilter?: MagnificationTextureFilter,
20
+ minFilter?: MinificationTextureFilter,
21
+ format?: PixelFormat,
22
+ type?: TextureDataType,
23
+ anisotropy?: number,
24
+ );
25
+ }
26
+
27
+ export { HTMLTexture };
@@ -84,6 +84,10 @@ export interface TextureJSON {
84
84
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
85
85
  export interface OffscreenCanvas extends EventTarget {}
86
86
 
87
+ export interface TextureEventMap {
88
+ dispose: {};
89
+ }
90
+
87
91
  /**
88
92
  * Create a {@link Texture} to apply to a surface or as a reflection or refraction map.
89
93
  * @remarks
@@ -102,7 +106,9 @@ export interface OffscreenCanvas extends EventTarget {}
102
106
  * @see {@link https://threejs.org/docs/index.html#api/en/textures/Texture | Official Documentation}
103
107
  * @see {@link https://github.com/mrdoob/three.js/blob/master/src/Textures/Texture.js | Source}
104
108
  */
105
- export class Texture<TImage = unknown> extends EventDispatcher<{ dispose: {} }> {
109
+ export class Texture<TImage = unknown, TEventMap extends TextureEventMap = TextureEventMap>
110
+ extends EventDispatcher<TEventMap>
111
+ {
106
112
  /**
107
113
  * This creates a new {@link THREE.Texture | Texture} object.
108
114
  * @param image See {@link Texture.image | .image}. Default {@link THREE.Texture.DEFAULT_IMAGE}
@@ -452,6 +458,15 @@ export class Texture<TImage = unknown> extends EventDispatcher<{ dispose: {} }>
452
458
  */
453
459
  pmremVersion: number;
454
460
 
461
+ /**
462
+ * Whether the texture should use one of the 16 bit integer formats which are normalized
463
+ * to [0, 1] or [-1, 1] (depending on signed/unsigned) when sampled.
464
+ *
465
+ * @type {boolean}
466
+ * @default false
467
+ */
468
+ normalized: boolean;
469
+
455
470
  /**
456
471
  * Set this to `true` to trigger an update next time the texture is used. Particularly important for setting the wrap mode.
457
472
  */