@types/three 0.169.0 → 0.170.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 (147) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +3 -3
  3. three/examples/jsm/animation/MMDAnimationHelper.d.ts +4 -0
  4. three/examples/jsm/animation/MMDPhysics.d.ts +4 -0
  5. three/examples/jsm/controls/ArcballControls.d.ts +1 -1
  6. three/examples/jsm/controls/TransformControls.d.ts +44 -0
  7. three/examples/jsm/csm/CSMFrustum.d.ts +8 -2
  8. three/examples/jsm/csm/CSMHelper.d.ts +2 -1
  9. three/examples/jsm/csm/CSMShadowNode.d.ts +46 -0
  10. three/examples/jsm/curves/NURBSCurve.d.ts +12 -1
  11. three/examples/jsm/exporters/GLTFExporter.d.ts +20 -3
  12. three/examples/jsm/exporters/MMDExporter.d.ts +4 -0
  13. three/examples/jsm/exporters/USDZExporter.d.ts +4 -0
  14. three/examples/jsm/geometries/DecalGeometry.d.ts +9 -3
  15. three/examples/jsm/geometries/TeapotGeometry.d.ts +2 -2
  16. three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
  17. three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
  18. three/examples/jsm/lines/Wireframe.d.ts +5 -2
  19. three/examples/jsm/lines/WireframeGeometry2.d.ts +1 -1
  20. three/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
  21. three/examples/jsm/loaders/EXRLoader.d.ts +2 -2
  22. three/examples/jsm/loaders/GLTFLoader.d.ts +1 -2
  23. three/examples/jsm/loaders/KTX2Loader.d.ts +1 -0
  24. three/examples/jsm/loaders/LDrawLoader.d.ts +10 -0
  25. three/examples/jsm/loaders/MMDLoader.d.ts +4 -0
  26. three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
  27. three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
  28. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -1
  29. three/examples/jsm/math/ColorSpaces.d.ts +11 -0
  30. three/examples/jsm/misc/ProgressiveLightMap.d.ts +8 -10
  31. three/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -0
  32. three/examples/jsm/renderers/SVGRenderer.d.ts +2 -2
  33. three/{src/nodes → examples/jsm/tsl}/display/AfterImageNode.d.ts +1 -5
  34. three/{src/nodes → examples/jsm/tsl}/display/AnaglyphPassNode.d.ts +2 -3
  35. three/{src/nodes → examples/jsm/tsl}/display/AnamorphicNode.d.ts +2 -4
  36. three/examples/jsm/tsl/display/BleachBypass.d.ts +3 -0
  37. three/{src/nodes → examples/jsm/tsl}/display/BloomNode.d.ts +1 -5
  38. three/{src/nodes → examples/jsm/tsl}/display/DenoiseNode.d.ts +2 -6
  39. three/{src/nodes → examples/jsm/tsl}/display/DepthOfFieldNode.d.ts +1 -5
  40. three/{src/nodes → examples/jsm/tsl}/display/DotScreenNode.d.ts +2 -5
  41. three/{src/nodes → examples/jsm/tsl}/display/FXAANode.d.ts +1 -3
  42. three/{src/nodes → examples/jsm/tsl}/display/FilmNode.d.ts +1 -3
  43. three/{src/nodes → examples/jsm/tsl}/display/GTAONode.d.ts +2 -8
  44. three/{src/nodes → examples/jsm/tsl}/display/GaussianBlurNode.d.ts +13 -5
  45. three/examples/jsm/tsl/display/LensflareNode.d.ts +35 -0
  46. three/{src/nodes → examples/jsm/tsl}/display/Lut3DNode.d.ts +2 -6
  47. three/{src/nodes → examples/jsm/tsl}/display/MotionBlur.d.ts +1 -2
  48. three/examples/jsm/tsl/display/OutlineNode.d.ts +32 -0
  49. three/{src/nodes → examples/jsm/tsl}/display/ParallaxBarrierPassNode.d.ts +2 -3
  50. three/{src/nodes → examples/jsm/tsl}/display/PixelationPassNode.d.ts +2 -5
  51. three/{src/nodes → examples/jsm/tsl}/display/RGBShiftNode.d.ts +1 -4
  52. three/examples/jsm/tsl/display/SMAANode.d.ts +17 -0
  53. three/{src/nodes → examples/jsm/tsl}/display/SSAAPassNode.d.ts +2 -7
  54. three/examples/jsm/tsl/display/SSRNode.d.ts +38 -0
  55. three/examples/jsm/tsl/display/Sepia.d.ts +3 -0
  56. three/{src/nodes → examples/jsm/tsl}/display/SobelOperatorNode.d.ts +1 -3
  57. three/{src/nodes → examples/jsm/tsl}/display/StereoCompositePassNode.d.ts +2 -5
  58. three/{src/nodes → examples/jsm/tsl}/display/StereoPassNode.d.ts +2 -5
  59. three/examples/jsm/tsl/display/TRAAPassNode.d.ts +15 -0
  60. three/{src/nodes → examples/jsm/tsl}/display/TransitionNode.d.ts +1 -5
  61. three/examples/jsm/tsl/display/hashBlur.d.ts +7 -0
  62. three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +22 -0
  63. three/package.json +4 -3
  64. three/src/Three.WebGPU.Nodes.d.ts +5 -1
  65. three/src/Three.WebGPU.d.ts +5 -1
  66. three/src/Three.d.ts +2 -7
  67. three/src/constants.d.ts +1 -9
  68. three/src/core/BufferGeometry.d.ts +13 -2
  69. three/src/core/RenderTarget.d.ts +1 -2
  70. three/src/loaders/FileLoader.d.ts +3 -3
  71. three/src/materials/LineBasicMaterial.d.ts +0 -5
  72. three/src/materials/LineDashedMaterial.d.ts +0 -5
  73. three/src/materials/Material.d.ts +4 -6
  74. three/src/materials/MeshBasicMaterial.d.ts +0 -5
  75. three/src/materials/MeshDepthMaterial.d.ts +0 -5
  76. three/src/materials/MeshDistanceMaterial.d.ts +0 -5
  77. three/src/materials/MeshLambertMaterial.d.ts +0 -5
  78. three/src/materials/MeshMatcapMaterial.d.ts +0 -5
  79. three/src/materials/MeshNormalMaterial.d.ts +0 -5
  80. three/src/materials/MeshPhongMaterial.d.ts +0 -5
  81. three/src/materials/MeshPhysicalMaterial.d.ts +0 -5
  82. three/src/materials/MeshStandardMaterial.d.ts +0 -5
  83. three/src/materials/MeshToonMaterial.d.ts +0 -5
  84. three/src/materials/PointsMaterial.d.ts +0 -5
  85. three/src/materials/RawShaderMaterial.d.ts +0 -2
  86. three/src/materials/ShaderMaterial.d.ts +0 -5
  87. three/src/materials/ShadowMaterial.d.ts +0 -5
  88. three/src/materials/SpriteMaterial.d.ts +0 -5
  89. three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +2 -2
  90. three/src/materials/nodes/NodeMaterial.d.ts +2 -0
  91. three/src/materials/nodes/NodeMaterials.d.ts +19 -16
  92. three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +15 -0
  93. three/src/math/Color.d.ts +39 -22
  94. three/src/math/ColorManagement.d.ts +24 -24
  95. three/src/math/Vector4.d.ts +2 -0
  96. three/src/nodes/Nodes.d.ts +1 -21
  97. three/src/nodes/TSL.d.ts +6 -24
  98. three/src/nodes/accessors/Camera.d.ts +0 -1
  99. three/src/nodes/accessors/SceneNode.d.ts +2 -0
  100. three/src/nodes/accessors/UniformArrayNode.d.ts +2 -2
  101. three/src/nodes/accessors/VelocityNode.d.ts +4 -0
  102. three/src/nodes/code/ScriptableNode.d.ts +1 -1
  103. three/src/nodes/core/StackNode.d.ts +4 -4
  104. three/src/nodes/core/VarNode.d.ts +12 -1
  105. three/src/nodes/display/ColorAdjustment.d.ts +29 -0
  106. three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
  107. three/src/nodes/display/ColorSpaceNode.d.ts +14 -8
  108. three/src/nodes/display/RenderOutputNode.d.ts +4 -4
  109. three/src/nodes/display/ViewportDepthNode.d.ts +2 -0
  110. three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +6 -0
  111. three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +10 -0
  112. three/src/nodes/gpgpu/ComputeNode.d.ts +5 -0
  113. three/src/nodes/lighting/LightsNode.d.ts +7 -2
  114. three/src/nodes/lighting/PointLightNode.d.ts +11 -1
  115. three/src/nodes/lighting/ShadowNode.d.ts +12 -0
  116. three/src/nodes/utils/Discard.d.ts +1 -1
  117. three/src/nodes/utils/Oscillators.d.ts +7 -0
  118. three/src/nodes/utils/PostProcessingUtils.d.ts +45 -0
  119. three/src/nodes/utils/ReflectorNode.d.ts +17 -4
  120. three/src/nodes/utils/Timer.d.ts +21 -0
  121. three/src/objects/BatchedMesh.d.ts +47 -2
  122. three/src/renderers/WebGLRenderer.d.ts +22 -11
  123. three/src/renderers/common/Constants.d.ts +2 -1
  124. three/src/renderers/common/Geometries.d.ts +1 -0
  125. three/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
  126. three/src/renderers/common/Lighting.d.ts +15 -0
  127. three/src/renderers/common/PostProcessingUtils.d.ts +66 -0
  128. three/src/renderers/common/RenderList.d.ts +5 -2
  129. three/src/renderers/common/RenderLists.d.ts +3 -1
  130. three/src/renderers/common/RenderObject.d.ts +1 -0
  131. three/src/renderers/common/Renderer.d.ts +35 -9
  132. three/src/renderers/common/extras/PMREMGenerator.d.ts +5 -1
  133. three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -7
  134. three/src/renderers/webgl/WebGLPrograms.d.ts +3 -10
  135. three/src/renderers/webgl/WebGLState.d.ts +13 -10
  136. three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
  137. three/src/textures/CompressedTexture.d.ts +1 -2
  138. three/src/textures/CubeTexture.d.ts +1 -2
  139. three/src/textures/DataTexture.d.ts +1 -2
  140. three/src/textures/Texture.d.ts +3 -4
  141. three/examples/jsm/cameras/CinematicCamera.d.ts +0 -34
  142. three/src/nodes/display/BleachBypass.d.ts +0 -4
  143. three/src/nodes/display/Sepia.d.ts +0 -4
  144. three/src/nodes/utils/OscNode.d.ts +0 -25
  145. three/src/nodes/utils/TimerNode.d.ts +0 -25
  146. /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.d.ts} +0 -0
  147. /three/examples/jsm/utils/{TextureUtilsGPU.d.ts → WebGPUTextureUtils.d.ts} +0 -0
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: Thu, 26 Sep 2024 17:08:07 GMT
11
+ * Last updated: Tue, 12 Nov 2024 10:02:27 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
@@ -3,8 +3,6 @@ export * from "./animation/CCDIKSolver.js";
3
3
  export * from "./animation/MMDAnimationHelper.js";
4
4
  export * from "./animation/MMDPhysics.js";
5
5
 
6
- export * from "./cameras/CinematicCamera.js";
7
-
8
6
  export { default as WebGL } from "./capabilities/WebGL.js";
9
7
 
10
8
  export * from "./controls/ArcballControls.js";
@@ -129,7 +127,9 @@ export * from "./loaders/VRMLLoader.js";
129
127
  export * from "./loaders/VTKLoader.js";
130
128
  export * from "./loaders/XYZLoader.js";
131
129
 
130
+ export * from "./materials/LDrawConditionalLineMaterial.js";
132
131
  export * from "./materials/MeshGouraudMaterial.js";
132
+ export * from "./materials/MeshPostProcessingMaterial.js";
133
133
 
134
134
  export * from "./math/Capsule.js";
135
135
  export * from "./math/ColorConverter.js";
@@ -274,8 +274,8 @@ export * as SceneUtils from "./utils/SceneUtils.js";
274
274
  export * from "./utils/ShadowMapViewer.js";
275
275
  export * as SkeletonUtils from "./utils/SkeletonUtils.js";
276
276
  export * as SortUtils from "./utils/SortUtils.js";
277
- export * from "./utils/TextureUtils.js";
278
277
  export * from "./utils/UVsDebug.js";
278
+ export * from "./utils/WebGLTextureUtils.js";
279
279
  export * from "./utils/WorkerPool.js";
280
280
 
281
281
  export * from "./webxr/ARButton.js";
@@ -35,6 +35,10 @@ export interface MMDAnimationHelperMixer {
35
35
  duration?: number | undefined;
36
36
  }
37
37
 
38
+ /**
39
+ * @deprecated The module has been deprecated and will be removed with r172. Please migrate to
40
+ * https://github.com/takahirox/three-mmd-loader instead.
41
+ */
38
42
  export class MMDAnimationHelper {
39
43
  constructor(params?: MMDAnimationHelperParameter);
40
44
  meshes: SkinnedMesh[];
@@ -6,6 +6,10 @@ export interface MMDPhysicsParameter {
6
6
  gravity?: Vector3 | undefined;
7
7
  }
8
8
 
9
+ /**
10
+ * @deprecated The module has been deprecated and will be removed with r172. Please migrate to
11
+ * https://github.com/takahirox/three-mmd-loader instead.
12
+ */
9
13
  export class MMDPhysics {
10
14
  constructor(
11
15
  mesh: SkinnedMesh,
@@ -44,7 +44,7 @@ declare class ArcballControls extends Controls<ArcballControlsEventMap> {
44
44
  focusAnimationTime: number;
45
45
 
46
46
  /**
47
- * If true, camera's near and far values will be adjusted every time zoom is performed trying to mantain the same
47
+ * If true, camera's near and far values will be adjusted every time zoom is performed trying to maintain the same
48
48
  * visible portion given by initial near and far values ( {@link PerspectiveCamera} only ). Default is false.
49
49
  */
50
50
  adjustNearFar: boolean;
@@ -38,6 +38,12 @@ export interface TransformControlsEventMap {
38
38
  "showX-changed": { value: unknown };
39
39
  "showY-changed": { value: unknown };
40
40
  "showZ-changed": { value: unknown };
41
+ "minX-changed": { value: unknown };
42
+ "maxX-changed": { value: unknown };
43
+ "minY-changed": { value: unknown };
44
+ "maxY-changed": { value: unknown };
45
+ "minZ-changed": { value: unknown };
46
+ "maxZ-changed": { value: unknown };
41
47
  "worldPosition-changed": { value: unknown };
42
48
  "worldPositionStart-changed": { value: unknown };
43
49
  "worldQuaternion-changed": { value: unknown };
@@ -85,6 +91,12 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
85
91
  */
86
92
  rotationSnap: number | null;
87
93
 
94
+ /**
95
+ * By default, 3D objects are continuously scaled. If you set this property to a numeric value, you can define in
96
+ * which steps the 3D object should be scaled. Default is `null`.
97
+ */
98
+ scaleSnap: number | null;
99
+
88
100
  /**
89
101
  * Defines in which coordinate space transformations should be performed. Possible values are "world" and "local".
90
102
  * Default is `world`.
@@ -116,6 +128,36 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
116
128
  */
117
129
  showZ: boolean;
118
130
 
131
+ /**
132
+ * The minimum allowed X position during translation. Default is `-Infinity`.
133
+ */
134
+ minx: number;
135
+
136
+ /**
137
+ * The maximum allowed X position during translation. Default is `Infinity`.
138
+ */
139
+ maxX: number;
140
+
141
+ /**
142
+ * The minimum allowed Y position during translation. Default is `-Infinity`.
143
+ */
144
+ minY: number;
145
+
146
+ /**
147
+ * The maximum allowed Y position during translation. Default is `Infinity`.
148
+ */
149
+ maxY: number;
150
+
151
+ /**
152
+ * The minimum allowed Z position during translation. Default is `-Infinity`.
153
+ */
154
+ minZ: number;
155
+
156
+ /**
157
+ * The maximum allowed Z position during translation. Default is `Infinity`.
158
+ */
159
+ maxZ: number;
160
+
119
161
  /**
120
162
  * Creates a new instance of TransformControls.
121
163
  * @param camera The camera of the rendered scene.
@@ -206,6 +248,8 @@ declare class TransformControlsRoot extends Object3D {
206
248
  controls: TransformControls;
207
249
 
208
250
  constructor(controls: TransformControls);
251
+
252
+ dispose(): void;
209
253
  }
210
254
 
211
255
  declare class TransformControlsGizmo extends Object3D {
@@ -6,14 +6,20 @@ export interface CSMFrustumVerticies {
6
6
  }
7
7
 
8
8
  export interface CSMFrustumParameters {
9
+ webGL?: boolean;
9
10
  projectionMatrix?: Matrix4;
10
11
  maxFar?: number;
11
12
  }
12
13
 
13
- export class CSMFrustum {
14
- constructor(data?: CSMFrustumParameters);
14
+ declare class CSMFrustum {
15
+ zNear: number;
15
16
  vertices: CSMFrustumVerticies;
17
+
18
+ constructor(data?: CSMFrustumParameters);
19
+
16
20
  setFromProjectionMatrix(projectionMatrix: Matrix4, maxFar: number): CSMFrustumVerticies;
17
21
  split(breaks: number[], target: CSMFrustum[]): void;
18
22
  toSpace(cameraMatrix: Matrix4, target: CSMFrustum): void;
19
23
  }
24
+
25
+ export { CSMFrustum };
@@ -10,8 +10,9 @@ import {
10
10
  } from "three";
11
11
 
12
12
  import { CSM } from "./CSM.js";
13
+ import { CSMShadowNode } from "./CSMShadowNode.js";
13
14
 
14
- export class CSMHelper<TCSM extends CSM = CSM> extends Group {
15
+ export class CSMHelper<TCSM extends CSM | CSMShadowNode = CSM | CSMShadowNode> extends Group {
15
16
  constructor(csm: TCSM);
16
17
  csm: TCSM;
17
18
  displayFrustum: boolean;
@@ -0,0 +1,46 @@
1
+ import { Camera, DirectionalLightShadow, Light, Object3D } from "three";
2
+ import { Node } from "three/tsl";
3
+ import { CSMFrustum } from "./CSMFrustum.js";
4
+
5
+ export type CSMShadowNodeMode = "uniform" | "logarithmic" | "practical" | "custom";
6
+
7
+ export interface CSMShadowNodeData {
8
+ cascades?: number | undefined;
9
+ maxFar?: number | undefined;
10
+ mode?: CSMShadowNodeMode | undefined;
11
+ lightMargin?: number | undefined;
12
+ customSplitsCallback?:
13
+ | ((cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void)
14
+ | undefined;
15
+ }
16
+
17
+ declare class LwLight extends Object3D {
18
+ target: Object3D;
19
+ shadow?: DirectionalLightShadow;
20
+
21
+ constructor();
22
+ }
23
+
24
+ declare class CSMShadowNode extends Node {
25
+ light: Light;
26
+ camera: Camera | null;
27
+ cascades: number;
28
+ maxFar: number;
29
+ mode: CSMShadowNodeMode;
30
+ lightMargin: number;
31
+ customSplitsCallback: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
32
+
33
+ fade: boolean;
34
+
35
+ breaks: number[];
36
+ mainFrustum: CSMFrustum | null;
37
+ frustums: CSMFrustum[];
38
+
39
+ lights: LwLight[];
40
+
41
+ constructor(light: Light, data?: CSMShadowNodeData);
42
+
43
+ updateFrustums(): void;
44
+ }
45
+
46
+ export { CSMShadowNode };
@@ -1,4 +1,12 @@
1
- import { Curve, Vector2, Vector3, Vector4 } from "three";
1
+ import { Curve, CurveJSON, Vector2, Vector3, Vector4 } from "three";
2
+
3
+ export interface NURBSCurveJSON extends CurveJSON {
4
+ degree: number;
5
+ knots: number[];
6
+ controlPoints: number[][];
7
+ startKnot: number;
8
+ endKnot: number;
9
+ }
2
10
 
3
11
  export class NURBSCurve extends Curve<Vector3> {
4
12
  degree: number;
@@ -14,4 +22,7 @@ export class NURBSCurve extends Curve<Vector3> {
14
22
  startKnot?: number,
15
23
  endKnot?: number,
16
24
  );
25
+
26
+ toJSON(): NURBSCurveJSON;
27
+ fromJSON(json: NURBSCurveJSON): this;
17
28
  }
@@ -47,12 +47,22 @@ export interface GLTFExporterOptions {
47
47
  includeCustomExtensions?: boolean;
48
48
  }
49
49
 
50
- export class GLTFExporter {
50
+ type TextureUtils = {
51
+ decompress:
52
+ | ((texture: Texture, maxTextureSize?: number) => Promise<void>)
53
+ | ((texture: Texture, maxTextureSize?: number) => void);
54
+ };
55
+
56
+ declare class GLTFExporter {
57
+ textureUtils: TextureUtils | null;
58
+
51
59
  constructor();
52
60
 
53
61
  register(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
54
62
  unregister(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
55
63
 
64
+ setTextureUtils(utils: TextureUtils | null): this;
65
+
56
66
  /**
57
67
  * Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)
58
68
  *
@@ -94,11 +104,15 @@ export class GLTFExporter {
94
104
  ): Promise<ArrayBuffer | { [key: string]: any }>;
95
105
  }
96
106
 
97
- export class GLTFWriter {
107
+ declare class GLTFWriter {
108
+ textureUtils: TextureUtils | null;
109
+
98
110
  constructor();
99
111
 
100
112
  setPlugins(plugins: GLTFExporterPlugin[]): void;
101
113
 
114
+ setTextureUtils(utils: TextureUtils | null): this;
115
+
102
116
  /**
103
117
  * Parse scenes and generate GLTF output
104
118
  *
@@ -106,7 +120,7 @@ export class GLTFWriter {
106
120
  * @param onDone Callback on completed
107
121
  * @param options options
108
122
  */
109
- write(
123
+ writeAsync(
110
124
  input: Object3D | Object3D[],
111
125
  onDone: (gltf: ArrayBuffer | { [key: string]: any }) => void,
112
126
  options?: GLTFExporterOptions,
@@ -121,3 +135,6 @@ export interface GLTFExporterPlugin {
121
135
  beforeParse?: (input: Object3D | Object3D[]) => void;
122
136
  afterParse?: (input: Object3D | Object3D[]) => void;
123
137
  }
138
+
139
+ export { GLTFExporter };
140
+ export type { GLTFWriter };
@@ -1,5 +1,9 @@
1
1
  import { Object3D } from "three";
2
2
 
3
+ /**
4
+ * @deprecated The module has been deprecated and will be removed with r172. Please migrate to
5
+ * https://github.com/takahirox/three-mmd-loader instead.
6
+ */
3
7
  export class MMDExporter {
4
8
  constructor();
5
9
 
@@ -1,4 +1,6 @@
1
1
  import { Object3D } from "three";
2
+ import * as WebGLTextureUtils from "../utils/WebGLTextureUtils.js";
3
+ import * as WebGPUTextureUtils from "../utils/WebGPUTextureUtils.js";
2
4
 
3
5
  export interface USDZExporterOptions {
4
6
  ar?: { anchoring: { type: "plane" }; planeAnchoring: { alignment: "horizontal" | "vertical" | "any" } } | undefined;
@@ -8,6 +10,8 @@ export interface USDZExporterOptions {
8
10
  }
9
11
 
10
12
  export class USDZExporter {
13
+ textureUtils: typeof WebGLTextureUtils | typeof WebGPUTextureUtils | null;
14
+
11
15
  constructor();
12
16
 
13
17
  parse(
@@ -1,10 +1,16 @@
1
1
  import { BufferGeometry, Euler, Mesh, Vector3 } from "three";
2
2
 
3
- export class DecalGeometry extends BufferGeometry {
3
+ declare class DecalGeometry extends BufferGeometry {
4
4
  constructor(mesh: Mesh, position: Vector3, orientation: Euler, size: Vector3);
5
5
  }
6
6
 
7
- export class DecalVertex {
8
- constructor(position: Vector3, normal: Vector3);
7
+ declare class DecalVertex {
8
+ position: Vector3;
9
+ normal: Vector3 | null;
10
+
11
+ constructor(position: Vector3, normal?: Vector3 | null);
12
+
9
13
  clone(): this;
10
14
  }
15
+
16
+ export { DecalGeometry, DecalVertex };
@@ -1,9 +1,9 @@
1
1
  import { BufferGeometry } from "three";
2
2
 
3
3
  /**
4
- * {@link TeapotGeometry} tesselates the famous Utah teapot database by Martin Newell.
4
+ * TeapotGeometry tessellates the famous Utah teapot database by Martin Newell.
5
5
  *
6
- * {@link TeapotGeometry} is an add-on, and must be imported explicitly. See
6
+ * TeapotGeometry is an add-on, and must be imported explicitly. See
7
7
  * [Installation / Addons]{@link https://threejs.org/docs/#manual/en/introduction/Installation}.
8
8
  *
9
9
  * @example
@@ -0,0 +1,10 @@
1
+ import { Mesh, Texture } from "three";
2
+
3
+ export class TextureHelper extends Mesh {
4
+ texture: Texture;
5
+ type: "TextureHelper";
6
+
7
+ constructor(texture: Texture, width?: number, height?: number, depth?: number);
8
+
9
+ dispose(): void;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { ShaderNodeObject } from "three/tsl";
2
+ import { Lighting } from "three/webgpu";
3
+ import { Light } from "../../../src/lights/Light.js";
4
+ import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js";
5
+
6
+ export class TiledLighting extends Lighting {
7
+ constructor();
8
+
9
+ createNode(lights?: Light[]): ShaderNodeObject<TiledLightsNode>;
10
+ }
@@ -3,9 +3,12 @@ import { Mesh } from "three";
3
3
  import { LineMaterial } from "./LineMaterial.js";
4
4
  import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
5
5
 
6
- export class Wireframe extends Mesh {
7
- constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
6
+ declare class Wireframe extends Mesh {
8
7
  readonly isWireframe: true;
9
8
 
9
+ constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
10
+
10
11
  computeLineDistances(): this;
11
12
  }
13
+
14
+ export { Wireframe };
@@ -4,5 +4,5 @@ import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js";
4
4
 
5
5
  export class WireframeGeometry2 extends LineSegmentsGeometry {
6
6
  constructor(geometry: BufferGeometry);
7
- readonly sWireframeGeometry2: boolean;
7
+ readonly isWireframeGeometry2: boolean;
8
8
  }
@@ -0,0 +1,13 @@
1
+ import { Line2NodeMaterial, Mesh } from "three/webgpu";
2
+
3
+ import { WireframeGeometry2 } from "../WireframeGeometry2.js";
4
+
5
+ declare class Wireframe extends Mesh {
6
+ readonly isWireframe: true;
7
+
8
+ constructor(geometry?: WireframeGeometry2, material?: Line2NodeMaterial);
9
+
10
+ computeLineDistances(): this;
11
+ }
12
+
13
+ export { Wireframe };
@@ -1,4 +1,4 @@
1
- import { ColorSpace, DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three";
1
+ import { DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three";
2
2
 
3
3
  export interface EXR {
4
4
  header: object;
@@ -6,7 +6,7 @@ export interface EXR {
6
6
  height: number;
7
7
  data: Float32Array | Uint16Array;
8
8
  format: PixelFormat;
9
- colorSpace: ColorSpace;
9
+ colorSpace: string;
10
10
  type: TextureDataType;
11
11
  }
12
12
 
@@ -3,7 +3,6 @@ import {
3
3
  BufferAttribute,
4
4
  BufferGeometry,
5
5
  Camera,
6
- ColorSpace,
7
6
  FileLoader,
8
7
  Group,
9
8
  ImageBitmapLoader,
@@ -113,7 +112,7 @@ export class GLTFParser {
113
112
  texCoord?: number | undefined;
114
113
  extensions?: any;
115
114
  },
116
- colorSpace?: ColorSpace | undefined,
115
+ colorSpace?: string | undefined,
117
116
  ) => Promise<Texture | null>;
118
117
  assignFinalMaterial: (object: Mesh) => void;
119
118
  getMaterialType: () => typeof MeshStandardMaterial;
@@ -4,6 +4,7 @@ import { WorkerPool } from "../utils/WorkerPool.js";
4
4
 
5
5
  export interface KTX2LoaderWorkerConfig {
6
6
  astcSupported: boolean;
7
+ astcHDRSupported: boolean;
7
8
  etc1Supported: boolean;
8
9
  etc2Supported: boolean;
9
10
  dxtSupported: boolean;
@@ -1,13 +1,23 @@
1
1
  import { Group, Loader, LoadingManager, Material } from "three";
2
+ import { LDrawConditionalLineMaterial } from "../materials/LDrawConditionalLineMaterial.js";
3
+ import { LDrawConditionalLineMaterial as LDrawConditionalLineNodeMaterial } from "../materials/LDrawConditionalLineNodeMaterial.js";
2
4
 
3
5
  export class LDrawLoader extends Loader<Group> {
4
6
  materials: Material[];
5
7
  materialsLibrary: Record<string, Material>;
8
+
6
9
  fileMap: Record<string, string>;
10
+
7
11
  smoothNormals: boolean;
8
12
 
13
+ ConditionalLineMaterial: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial | null;
14
+
9
15
  constructor(manager?: LoadingManager);
10
16
 
17
+ setConditionalLineMaterial(
18
+ type: typeof LDrawConditionalLineMaterial | typeof LDrawConditionalLineNodeMaterial,
19
+ ): this;
20
+
11
21
  preloadMaterials(url: string): Promise<void>;
12
22
  setFileMap(fileMap: Record<string, string>): void;
13
23
  setMaterials(materials: Material[]): void;
@@ -5,6 +5,10 @@ export interface MMDLoaderAnimationObject {
5
5
  mesh: SkinnedMesh;
6
6
  }
7
7
 
8
+ /**
9
+ * @deprecated The module has been deprecated and will be removed with r172. Please migrate to
10
+ * https://github.com/takahirox/three-mmd-loader instead.
11
+ */
8
12
  export class MMDLoader extends Loader<SkinnedMesh> {
9
13
  constructor(manager?: LoadingManager);
10
14
  animationBuilder: object;
@@ -0,0 +1,9 @@
1
+ import { ShaderMaterial, ShaderMaterialParameters } from "three";
2
+
3
+ declare class LDrawConditionalLineMaterial extends ShaderMaterial {
4
+ readonly isLDrawConditionalLineMaterial: true;
5
+
6
+ constructor(parameters?: ShaderMaterialParameters);
7
+ }
8
+
9
+ export { LDrawConditionalLineMaterial };
@@ -0,0 +1,9 @@
1
+ import { NodeMaterial, NodeMaterialParameters } from "three/tsl";
2
+
3
+ declare class LDrawConditionalLineMaterial extends NodeMaterial {
4
+ readonly isLDrawConditionalLineMaterial: true;
5
+
6
+ constructor(parameters?: NodeMaterialParameters);
7
+ }
8
+
9
+ export { LDrawConditionalLineMaterial };
@@ -8,7 +8,6 @@ import { ShaderMaterial, ShaderMaterialParameters } from "three";
8
8
 
9
9
  export class MeshGouraudMaterial extends ShaderMaterial {
10
10
  isMeshGouraudMaterial: true;
11
- type: "MeshGouraudMaterial";
12
11
 
13
12
  constructor(parameters?: ShaderMaterialParameters);
14
13
 
@@ -0,0 +1,11 @@
1
+ import { ColorSpaceDefinition } from "three";
2
+
3
+ export const DisplayP3ColorSpace: "display-p3";
4
+ export const LinearDisplayP3ColorSpace: "display-p3-linear";
5
+
6
+ export const DisplayP3ColorSpaceImpl: ColorSpaceDefinition;
7
+ export const LinearDisplayP3ColorSpaceImpl: ColorSpaceDefinition;
8
+
9
+ export const LinearRec2020ColorSpace: "rec2020-linear";
10
+
11
+ export const LinearRec2020ColorSpaceImpl: ColorSpaceDefinition;
@@ -24,29 +24,23 @@ export interface LightMapContainers {
24
24
  object: Object3D;
25
25
  }
26
26
 
27
- export class ProgressiveLightMap {
27
+ declare class ProgressiveLightMap {
28
28
  renderer: WebGLRenderer;
29
29
  res: number;
30
30
  lightMapContainers: LightMapContainers[];
31
- compiled: boolean;
32
31
  scene: Scene;
33
- tinyTarget: WebGLRenderTarget;
34
32
  buffer1Active: boolean;
35
33
  firstUpdate: boolean;
36
34
  warned: boolean;
35
+ labelMesh: Mesh<PlaneGeometry, MeshBasicMaterial> | null;
36
+ blurringPlane: Mesh<PlaneGeometry, MeshBasicMaterial> | null;
37
37
 
38
38
  progressiveLightMap1: WebGLRenderTarget;
39
39
  progressiveLightMap2: WebGLRenderTarget;
40
40
 
41
41
  uvMat: MeshPhongMaterial;
42
42
 
43
- uv_boxes: UVBoxes[];
44
-
45
- blurringPlane: Mesh<PlaneGeometry, MeshBasicMaterial>;
46
-
47
- labelMaterial: MeshBasicMaterial;
48
- labelPlane: PlaneGeometry;
49
- labelMesh: Mesh<PlaneGeometry, MeshBasicMaterial>;
43
+ uv_boxes?: UVBoxes[];
50
44
 
51
45
  constructor(renderer: WebGLRenderer, res?: number);
52
46
 
@@ -57,4 +51,8 @@ export class ProgressiveLightMap {
57
51
  showDebugLightmap(visible: boolean, position?: Vector3): void;
58
52
 
59
53
  private _initializeBlurPlane(res: number, lightMap?: Texture | null): void;
54
+
55
+ dispose(): void;
60
56
  }
57
+
58
+ export { ProgressiveLightMap };
@@ -0,0 +1,27 @@
1
+ import { Camera, Material, Object3D, Vector3, WebGPURenderer } from "three/webgpu";
2
+
3
+ export interface UVBoxes {
4
+ w: number;
5
+ h: number;
6
+ index: number;
7
+ }
8
+
9
+ export interface LightMapContainers {
10
+ basicMat: Material | Material[];
11
+ object: Object3D;
12
+ }
13
+
14
+ declare class ProgressiveLightMap {
15
+ renderer: WebGPURenderer;
16
+ resolution: number;
17
+
18
+ constructor(renderer: WebGPURenderer, resolution?: number);
19
+
20
+ addObjectsToLightMap(objects: Object3D[]): void;
21
+
22
+ update(camera: Camera, blendWindow?: number, blurEdges?: boolean): void;
23
+
24
+ showDebugLightmap(visible: boolean, position?: Vector3 | null): void;
25
+ }
26
+
27
+ export { ProgressiveLightMap };
@@ -1,4 +1,4 @@
1
- import { Camera, Color, ColorSpace, Object3D, Scene } from "three";
1
+ import { Camera, Color, Object3D, Scene } from "three";
2
2
 
3
3
  export class SVGObject extends Object3D {
4
4
  constructor(node: SVGElement);
@@ -12,7 +12,7 @@ export class SVGRenderer {
12
12
  sortObjects: boolean;
13
13
  sortElements: boolean;
14
14
  overdraw: number;
15
- outputColorSpace: ColorSpace;
15
+ outputColorSpace: string;
16
16
  info: { render: { vertices: number; faces: number } };
17
17
 
18
18
  getSize(): { width: number; height: number };
@@ -1,8 +1,4 @@
1
- import TextureNode from "../accessors/TextureNode.js";
2
- import Node from "../core/Node.js";
3
- import TempNode from "../core/TempNode.js";
4
- import UniformNode from "../core/UniformNode.js";
5
- import { ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Node, ShaderNodeObject, TempNode, TextureNode, UniformNode } from "three/tsl";
6
2
 
7
3
  export default class AfterImageNode extends TempNode {
8
4
  textureNode: TextureNode;
@@ -1,6 +1,5 @@
1
- import { Camera } from "../../cameras/Camera.js";
2
- import { Scene } from "../../scenes/Scene.js";
3
- import { ShaderNodeObject } from "../tsl/TSLCore.js";
1
+ import { Camera, Scene } from "three";
2
+ import { ShaderNodeObject } from "three/tsl";
4
3
  import StereoCompositePassNode from "./StereoCompositePassNode.js";
5
4
 
6
5
  declare class AnaglyphPassNode extends StereoCompositePassNode {