@types/three 0.183.0 → 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.
- three/README.md +2 -2
- three/examples/jsm/Addons.d.ts +11 -0
- three/examples/jsm/controls/FirstPersonControls.d.ts +5 -10
- three/examples/jsm/controls/TransformControls.d.ts +24 -0
- three/examples/jsm/geometries/TextGeometry.d.ts +43 -71
- three/examples/jsm/helpers/LightProbeGridHelper.d.ts +12 -0
- three/examples/jsm/inspector/Extension.d.ts +9 -0
- three/examples/jsm/inspector/Inspector.d.ts +21 -2
- three/examples/jsm/inspector/RendererInspector.d.ts +7 -2
- three/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts +20 -0
- three/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts +11 -0
- three/examples/jsm/inspector/tabs/Parameters.d.ts +22 -1
- three/examples/jsm/inspector/ui/Tab.d.ts +5 -1
- three/examples/jsm/inspector/ui/Values.d.ts +23 -3
- three/examples/jsm/interaction/InteractionManager.d.ts +18 -0
- three/examples/jsm/lighting/DynamicLighting.d.ts +16 -0
- three/examples/jsm/lighting/LightProbeGrid.d.ts +34 -0
- three/examples/jsm/loaders/ColladaLoader.d.ts +1 -0
- three/examples/jsm/loaders/EXRLoader.d.ts +2 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +1 -1
- three/examples/jsm/loaders/VTKLoader.d.ts +6 -0
- three/examples/jsm/objects/Reflector.d.ts +1 -2
- three/examples/jsm/objects/SkyMesh.d.ts +1 -0
- three/examples/jsm/tsl/WebGLNodesHandler.d.ts +14 -0
- three/examples/jsm/tsl/display/FSR1Node.d.ts +17 -0
- three/examples/jsm/tsl/display/SharpenNode.d.ts +22 -0
- three/examples/jsm/tsl/display/TAAUNode.d.ts +31 -0
- three/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts +21 -0
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +1 -1
- three/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts +9 -0
- three/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts +9 -0
- three/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts +9 -0
- three/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts +9 -0
- three/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts +9 -0
- three/examples/jsm/utils/ColorUtils.d.ts +5 -0
- three/examples/jsm/utils/SceneOptimizer.d.ts +18 -0
- three/examples/jsm/webxr/XRHandMeshModel.d.ts +1 -0
- three/package.json +4 -5
- three/src/Three.Core.d.ts +13 -1
- three/src/Three.TSL.d.ts +7 -1
- three/src/Three.WebGPU.Nodes.d.ts +8 -4
- three/src/Three.WebGPU.d.ts +11 -4
- three/src/Three.d.ts +0 -11
- three/src/animation/AnimationMixer.d.ts +3 -1
- three/src/audio/AudioContext.d.ts +2 -2
- three/src/core/BufferAttribute.d.ts +13 -1
- three/src/core/RenderTarget.d.ts +8 -1
- three/src/core/UniformsGroup.d.ts +7 -1
- three/src/extras/Controls.d.ts +5 -1
- three/src/geometries/ExtrudeGeometry.d.ts +39 -53
- three/src/loaders/FileLoader.d.ts +2 -2
- three/src/materials/Material.d.ts +5 -1
- three/src/materials/MeshToonMaterial.d.ts +1 -1
- three/src/materials/nodes/Line2NodeMaterial.d.ts +7 -0
- three/src/materials/nodes/VolumeNodeMaterial.d.ts +1 -1
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +11 -1
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/math/Matrix2.d.ts +1 -1
- three/src/math/Matrix3.d.ts +1 -1
- three/src/math/Matrix4.d.ts +1 -1
- three/src/math/Plane.d.ts +1 -1
- three/src/math/Vector2.d.ts +2 -1
- three/src/math/Vector3.d.ts +2 -1
- three/src/math/Vector4.d.ts +2 -1
- three/src/nodes/Nodes.d.ts +0 -1
- three/src/nodes/TSL.d.ts +1 -1
- three/src/nodes/accessors/BufferAttributeNode.d.ts +1 -1
- three/src/nodes/core/Node.d.ts +37 -9
- three/src/nodes/core/StackNode.d.ts +1 -1
- three/src/nodes/core/StructTypeNode.d.ts +0 -4
- three/src/nodes/core/UniformGroupNode.d.ts +4 -3
- three/src/nodes/core/UniformNode.d.ts +3 -0
- three/src/nodes/core/VarNode.d.ts +16 -10
- three/src/nodes/display/ViewportDepthTextureNode.d.ts +1 -3
- three/src/nodes/display/ViewportTextureNode.d.ts +5 -5
- three/src/nodes/functions/ShadowMaskModel.d.ts +2 -2
- three/src/nodes/gpgpu/BarrierNode.d.ts +2 -0
- three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +16 -7
- three/src/nodes/gpgpu/ComputeNode.d.ts +6 -2
- three/src/nodes/materialx/lib/mx_noise.d.ts +4 -5
- three/src/nodes/math/MathNode.d.ts +64 -6
- three/src/nodes/tsl/TSLBase.d.ts +1 -1
- three/src/nodes/tsl/TSLCore.d.ts +568 -160
- three/src/nodes/utils/ConvertNode.d.ts +9 -2
- three/src/nodes/utils/EventNode.d.ts +6 -0
- three/src/nodes/utils/JoinNode.d.ts +9 -5
- three/src/nodes/utils/LoopNode.d.ts +1 -2
- three/src/nodes/utils/{RemapNode.d.ts → Remap.d.ts} +6 -22
- three/src/objects/BatchedMesh.d.ts +2 -0
- three/src/objects/InstancedMesh.d.ts +6 -6
- three/src/objects/SkinnedMesh.d.ts +3 -0
- three/src/renderers/WebGLRenderer.d.ts +10 -1
- three/src/renderers/common/Animation.d.ts +2 -2
- three/src/renderers/common/Attributes.d.ts +9 -1
- three/src/renderers/common/Backend.d.ts +4 -0
- three/src/renderers/common/Background.d.ts +2 -2
- three/src/renderers/common/BindGroup.d.ts +0 -6
- three/src/renderers/common/Bindings.d.ts +2 -2
- three/src/renderers/common/CanvasTarget.d.ts +3 -1
- three/src/renderers/common/ComputePipeline.d.ts +1 -1
- three/src/renderers/common/Info.d.ts +132 -1
- three/src/renderers/common/InspectorBase.d.ts +7 -1
- three/src/renderers/common/Pipelines.d.ts +19 -3
- three/src/renderers/common/ReadbackBuffer.d.ts +63 -0
- three/src/renderers/common/RenderBundle.d.ts +4 -1
- three/src/renderers/common/RenderBundles.d.ts +3 -1
- three/src/renderers/common/RenderObject.d.ts +2 -2
- three/src/renderers/common/RenderObjects.d.ts +3 -3
- three/src/renderers/common/RenderPipeline.d.ts +24 -0
- three/src/renderers/common/Renderer.d.ts +29 -16
- three/src/renderers/common/XRManager.d.ts +1 -7
- three/src/renderers/common/nodes/NodeManager.d.ts +51 -11
- three/src/renderers/shaders/ShaderChunk.d.ts +1 -0
- three/src/renderers/shaders/UniformsLib.d.ts +5 -1
- three/src/renderers/webgl/WebGLBufferRenderer.d.ts +0 -6
- three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +0 -6
- three/src/renderers/webgl/WebGLPrograms.d.ts +5 -0
- three/src/renderers/webgl-fallback/WebGLBackend.d.ts +2 -0
- three/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +19 -0
- three/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts +51 -0
- three/src/renderers/webgpu/WebGPUBackend.d.ts +9 -4
- three/src/renderers/webgpu/utils/WebGPUConstants.d.ts +6 -0
- three/src/renderers/webxr/WebXRController.d.ts +5 -1
- three/src/renderers/webxr/WebXRManager.d.ts +3 -1
- three/src/scenes/Scene.d.ts +2 -2
- three/src/textures/ExternalTexture.d.ts +3 -2
- three/src/textures/HTMLTexture.d.ts +27 -0
- three/src/textures/Texture.d.ts +16 -1
three/README.md
CHANGED
|
@@ -8,8 +8,8 @@ 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:
|
|
12
|
-
* Dependencies: [@dimforge/rapier3d-compat](https://npmjs.com/package/@dimforge/rapier3d-compat), [@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), [
|
|
11
|
+
* Last updated: Thu, 16 Apr 2026 19:29:33 GMT
|
|
12
|
+
* Dependencies: [@dimforge/rapier3d-compat](https://npmjs.com/package/@dimforge/rapier3d-compat), [@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), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
15
15
|
These definitions were written by [Josh Ellis](https://github.com/joshuaellis), and [Nathan Bierema](https://github.com/Methuselah96).
|
three/examples/jsm/Addons.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from "./effects/OutlineEffect.js";
|
|
|
30
30
|
export * from "./effects/ParallaxBarrierEffect.js";
|
|
31
31
|
export * from "./effects/StereoEffect.js";
|
|
32
32
|
|
|
33
|
+
export * from "./environments/ColorEnvironment.js";
|
|
33
34
|
export * from "./environments/DebugEnvironment.js";
|
|
34
35
|
export * from "./environments/RoomEnvironment.js";
|
|
35
36
|
|
|
@@ -51,9 +52,11 @@ export * from "./geometries/RoundedBoxGeometry.js";
|
|
|
51
52
|
export * from "./geometries/TeapotGeometry.js";
|
|
52
53
|
export * from "./geometries/TextGeometry.js";
|
|
53
54
|
|
|
55
|
+
export * from "./helpers/AnimationPathHelper.js";
|
|
54
56
|
export * from "./helpers/LightProbeHelper.js";
|
|
55
57
|
export * from "./helpers/OctreeHelper.js";
|
|
56
58
|
export * from "./helpers/PositionalAudioHelper.js";
|
|
59
|
+
export * from "./helpers/RapierHelper.js";
|
|
57
60
|
export * from "./helpers/RectAreaLightHelper.js";
|
|
58
61
|
export * from "./helpers/TextureHelper.js";
|
|
59
62
|
export * from "./helpers/VertexNormalsHelper.js";
|
|
@@ -98,6 +101,7 @@ export * from "./loaders/LDrawLoader.js";
|
|
|
98
101
|
export * from "./loaders/LottieLoader.js";
|
|
99
102
|
export * from "./loaders/LUT3dlLoader.js";
|
|
100
103
|
export * from "./loaders/LUTCubeLoader.js";
|
|
104
|
+
export * from "./loaders/LUTImageLoader.js";
|
|
101
105
|
export * from "./loaders/LWOLoader.js";
|
|
102
106
|
export * from "./loaders/MD2Loader.js";
|
|
103
107
|
export * from "./loaders/MDDLoader.js";
|
|
@@ -126,6 +130,7 @@ export * from "./materials/LDrawConditionalLineMaterial.js";
|
|
|
126
130
|
|
|
127
131
|
export * from "./math/Capsule.js";
|
|
128
132
|
export * from "./math/ColorConverter.js";
|
|
133
|
+
export * as ColorSpaces from "./math/ColorSpaces.js";
|
|
129
134
|
export * from "./math/ConvexHull.js";
|
|
130
135
|
export * from "./math/ImprovedNoise.js";
|
|
131
136
|
export * from "./math/Lut.js";
|
|
@@ -165,6 +170,7 @@ export { Water as Water2 } from "./objects/Water2.js";
|
|
|
165
170
|
export type { WaterOptions as Water2Options } from "./objects/Water2.js";
|
|
166
171
|
|
|
167
172
|
export * from "./physics/AmmoPhysics.js";
|
|
173
|
+
export * from "./physics/JoltPhysics.js";
|
|
168
174
|
export * from "./physics/RapierPhysics.js";
|
|
169
175
|
|
|
170
176
|
export * from "./postprocessing/AfterimagePass.js";
|
|
@@ -175,6 +181,7 @@ export * from "./postprocessing/CubeTexturePass.js";
|
|
|
175
181
|
export * from "./postprocessing/DotScreenPass.js";
|
|
176
182
|
export * from "./postprocessing/EffectComposer.js";
|
|
177
183
|
export * from "./postprocessing/FilmPass.js";
|
|
184
|
+
export * from "./postprocessing/FXAAPass.js";
|
|
178
185
|
export * from "./postprocessing/GlitchPass.js";
|
|
179
186
|
export * from "./postprocessing/GTAOPass.js";
|
|
180
187
|
export * from "./postprocessing/HalftonePass.js";
|
|
@@ -185,6 +192,7 @@ export * from "./postprocessing/OutputPass.js";
|
|
|
185
192
|
export * from "./postprocessing/Pass.js";
|
|
186
193
|
export * from "./postprocessing/RenderPass.js";
|
|
187
194
|
export * from "./postprocessing/RenderPixelatedPass.js";
|
|
195
|
+
export * from "./postprocessing/RenderTransitionPass.js";
|
|
188
196
|
export * from "./postprocessing/SAOPass.js";
|
|
189
197
|
export * from "./postprocessing/SavePass.js";
|
|
190
198
|
export * from "./postprocessing/ShaderPass.js";
|
|
@@ -234,6 +242,7 @@ export * from "./shaders/LuminosityShader.js";
|
|
|
234
242
|
export * from "./shaders/MirrorShader.js";
|
|
235
243
|
export * from "./shaders/NormalMapShader.js";
|
|
236
244
|
export * from "./shaders/OutputShader.js";
|
|
245
|
+
export * from "./shaders/PoissonDenoiseShader.js";
|
|
237
246
|
export * from "./shaders/RGBShiftShader.js";
|
|
238
247
|
export * from "./shaders/SAOShader.js";
|
|
239
248
|
export * from "./shaders/SepiaShader.js";
|
|
@@ -257,9 +266,11 @@ export * from "./textures/FlakesTexture.js";
|
|
|
257
266
|
|
|
258
267
|
export * as BufferGeometryUtils from "./utils/BufferGeometryUtils.js";
|
|
259
268
|
export * as CameraUtils from "./utils/CameraUtils.js";
|
|
269
|
+
export * as ColorUtils from "./utils/ColorUtils.js";
|
|
260
270
|
export * as GeometryCompressionUtils from "./utils/GeometryCompressionUtils.js";
|
|
261
271
|
export * as GeometryUtils from "./utils/GeometryUtils.js";
|
|
262
272
|
export * from "./utils/LDrawUtils.js";
|
|
273
|
+
export * from "./utils/SceneOptimizer.js";
|
|
263
274
|
export * as SceneUtils from "./utils/SceneUtils.js";
|
|
264
275
|
export * from "./utils/ShadowMapViewer.js";
|
|
265
276
|
export * as SkeletonUtils from "./utils/SkeletonUtils.js";
|
|
@@ -24,11 +24,6 @@ declare class FirstPersonControls extends Controls<{}> {
|
|
|
24
24
|
*/
|
|
25
25
|
autoForward: boolean;
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* Whether or not it's possible to look around. Default is `true`.
|
|
29
|
-
*/
|
|
30
|
-
activeLook: boolean;
|
|
31
|
-
|
|
32
27
|
/**
|
|
33
28
|
* Whether or not the camera's height influences the forward movement speed. Default is `false`.
|
|
34
29
|
* Use the properties {@link .heightCoef}, {@link .heightMin} and {@link .heightMax} for configuration
|
|
@@ -78,11 +73,6 @@ declare class FirstPersonControls extends Controls<{}> {
|
|
|
78
73
|
*/
|
|
79
74
|
constructor(object: Camera, domElement?: HTMLElement | SVGElement);
|
|
80
75
|
|
|
81
|
-
/**
|
|
82
|
-
* Should be called if the application window is resized.
|
|
83
|
-
*/
|
|
84
|
-
handleResize(): void;
|
|
85
|
-
|
|
86
76
|
/**
|
|
87
77
|
* Ensures the controls orient the camera towards the defined target position.
|
|
88
78
|
* @param vector A vector representing the target position.
|
|
@@ -96,6 +86,11 @@ declare class FirstPersonControls extends Controls<{}> {
|
|
|
96
86
|
* @param z The z component of the world space position.
|
|
97
87
|
*/
|
|
98
88
|
lookAt(x: number, y: number, z: number): this;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated The controls now handle resize internally.
|
|
92
|
+
*/
|
|
93
|
+
handleResize(): void;
|
|
99
94
|
}
|
|
100
95
|
|
|
101
96
|
export { FirstPersonControls };
|
|
@@ -38,6 +38,9 @@ export interface TransformControlsEventMap {
|
|
|
38
38
|
"showX-changed": { value: unknown };
|
|
39
39
|
"showY-changed": { value: unknown };
|
|
40
40
|
"showZ-changed": { value: unknown };
|
|
41
|
+
"showXY-changed": { value: unknown };
|
|
42
|
+
"showYZ-changed": { value: unknown };
|
|
43
|
+
"showXZ-changed": { value: unknown };
|
|
41
44
|
"minX-changed": { value: unknown };
|
|
42
45
|
"maxX-changed": { value: unknown };
|
|
43
46
|
"minY-changed": { value: unknown };
|
|
@@ -128,6 +131,27 @@ declare class TransformControls extends Controls<TransformControlsEventMap> {
|
|
|
128
131
|
*/
|
|
129
132
|
showZ: boolean;
|
|
130
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Whether the xy-plane helper should be visible or not.
|
|
136
|
+
*
|
|
137
|
+
* @default true
|
|
138
|
+
*/
|
|
139
|
+
showXY: boolean;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Whether the xy-plane helper should be visible or not.
|
|
143
|
+
*
|
|
144
|
+
* @default true
|
|
145
|
+
*/
|
|
146
|
+
showYZ: boolean;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Whether the xy-plane helper should be visible or not.
|
|
150
|
+
*
|
|
151
|
+
* @default true
|
|
152
|
+
*/
|
|
153
|
+
showXZ: boolean;
|
|
154
|
+
|
|
131
155
|
/**
|
|
132
156
|
* The minimum allowed X position during translation. Default is `-Infinity`.
|
|
133
157
|
*/
|
|
@@ -3,110 +3,82 @@ import { ExtrudeGeometry, ExtrudeGeometryOptions, Shape } from "three";
|
|
|
3
3
|
import { Font } from "../loaders/FontLoader.js";
|
|
4
4
|
|
|
5
5
|
export interface TextGeometryParameters extends ExtrudeGeometryOptions {
|
|
6
|
+
/**
|
|
7
|
+
* The font.
|
|
8
|
+
*/
|
|
6
9
|
font: Font;
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue `100`
|
|
12
|
+
* The text size.
|
|
13
|
+
* @default 100
|
|
12
14
|
*/
|
|
13
15
|
size?: number | undefined;
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @defaultValue `50`
|
|
18
|
+
* Depth to extrude the shape.
|
|
19
|
+
* @default 50
|
|
19
20
|
*/
|
|
20
21
|
depth?: number | undefined;
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @
|
|
25
|
-
*/
|
|
26
|
-
curveSegments?: number | undefined;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @defaultValue `false`
|
|
24
|
+
* Whether to beveling to the shape or not.
|
|
25
|
+
* @default false
|
|
30
26
|
*/
|
|
31
27
|
bevelEnabled?: boolean | undefined;
|
|
32
28
|
|
|
33
29
|
/**
|
|
34
|
-
* How deep into
|
|
35
|
-
*
|
|
36
|
-
* @override
|
|
37
|
-
* @defaultValue `10`
|
|
30
|
+
* How deep into the original shape the bevel goes.
|
|
31
|
+
* @default 10
|
|
38
32
|
*/
|
|
39
33
|
bevelThickness?: number | undefined;
|
|
40
34
|
|
|
41
35
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* @override
|
|
45
|
-
* @defaultValue `8`
|
|
36
|
+
* Distance from the shape outline that the bevel extends.
|
|
37
|
+
* @default 8
|
|
46
38
|
*/
|
|
47
39
|
bevelSize?: number | undefined;
|
|
48
40
|
|
|
49
|
-
/**
|
|
50
|
-
* How far from text outline bevel starts.
|
|
51
|
-
* Expects a `Float`.
|
|
52
|
-
* @override
|
|
53
|
-
* @defaultValue `0`
|
|
54
|
-
*/
|
|
55
|
-
bevelOffset?: number | undefined;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @override
|
|
59
|
-
* @defaultValue `3`
|
|
60
|
-
*/
|
|
61
|
-
bevelSegments?: number | undefined;
|
|
62
|
-
|
|
63
41
|
direction?: "ltr" | "rtl" | "tb" | undefined;
|
|
64
42
|
}
|
|
65
43
|
|
|
66
44
|
/**
|
|
67
|
-
* A class for generating text as a single geometry
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* See the {@link
|
|
71
|
-
*
|
|
72
|
-
*
|
|
45
|
+
* A class for generating text as a single geometry. It is constructed by providing a string of text, and a set of
|
|
46
|
+
* parameters consisting of a loaded font and extrude settings.
|
|
47
|
+
*
|
|
48
|
+
* See the {@link FontLoader} page for additional details.
|
|
49
|
+
*
|
|
50
|
+
* `TextGeometry` uses [typeface.json](http://gero3.github.io/facetype.js/) generated fonts.
|
|
51
|
+
* Some existing fonts can be found located in `/examples/fonts`.
|
|
52
|
+
*
|
|
53
|
+
* ```js
|
|
73
54
|
* const loader = new FontLoader();
|
|
74
|
-
* loader.
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* bevelThickness: 10,
|
|
82
|
-
* bevelSize: 8,
|
|
83
|
-
* bevelOffset: 0,
|
|
84
|
-
* bevelSegments: 5
|
|
85
|
-
* });
|
|
86
|
-
* });
|
|
55
|
+
* const font = await loader.loadAsync( 'fonts/helvetiker_regular.typeface.json' );
|
|
56
|
+
* const geometry = new TextGeometry( 'Hello three.js!', {
|
|
57
|
+
* font: font,
|
|
58
|
+
* size: 80,
|
|
59
|
+
* depth: 5,
|
|
60
|
+
* curveSegments: 12
|
|
61
|
+
* } );
|
|
87
62
|
* ```
|
|
88
|
-
*
|
|
89
|
-
* @
|
|
90
|
-
* @
|
|
63
|
+
*
|
|
64
|
+
* @augments ExtrudeGeometry
|
|
65
|
+
* @three_import import { TextGeometry } from 'three/addons/geometries/TextGeometry.js';
|
|
91
66
|
*/
|
|
92
|
-
|
|
67
|
+
declare class TextGeometry extends ExtrudeGeometry {
|
|
93
68
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* @param
|
|
69
|
+
* Constructs a new text geometry.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} text - The text that should be transformed into a geometry.
|
|
72
|
+
* @param {TextGeometry~Options} [parameters] - The text settings.
|
|
97
73
|
*/
|
|
98
74
|
constructor(text: string, parameters?: TextGeometryParameters);
|
|
99
75
|
|
|
100
76
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* An object with a property for each of the constructor parameters.
|
|
109
|
-
* @remarks Any modification after instantiation does not change the geometry.
|
|
77
|
+
* Holds the constructor parameters that have been
|
|
78
|
+
* used to generate the geometry. Any modification
|
|
79
|
+
* after instantiation does not change the geometry.
|
|
80
|
+
*
|
|
81
|
+
* @type {Object}
|
|
110
82
|
*/
|
|
111
83
|
readonly parameters: {
|
|
112
84
|
readonly shapes: Shape | Shape[];
|
|
@@ -114,4 +86,4 @@ export class TextGeometry extends ExtrudeGeometry {
|
|
|
114
86
|
};
|
|
115
87
|
}
|
|
116
88
|
|
|
117
|
-
export { TextGeometry
|
|
89
|
+
export { TextGeometry };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InstancedMesh, ShaderMaterial, SphereGeometry } from "three";
|
|
2
|
+
import { LightProbeGrid } from "../lighting/LightProbeGrid.js";
|
|
3
|
+
|
|
4
|
+
declare class LightProbeGridHelper extends InstancedMesh<SphereGeometry, ShaderMaterial> {
|
|
5
|
+
probes: LightProbeGrid;
|
|
6
|
+
|
|
7
|
+
constructor(probes: LightProbeGrid, sphereSize?: number);
|
|
8
|
+
|
|
9
|
+
update(): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { LightProbeGridHelper };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Tab, TabEventMap } from "./ui/Tab.js";
|
|
2
|
+
|
|
3
|
+
export interface ExtensionEventMap extends TabEventMap {}
|
|
4
|
+
|
|
5
|
+
export class Extension<TEventMap extends ExtensionEventMap = ExtensionEventMap> extends Tab<TEventMap> {
|
|
6
|
+
readonly isExtension: boolean;
|
|
7
|
+
|
|
8
|
+
constructor(name: string);
|
|
9
|
+
}
|
|
@@ -1,10 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TSLGraphEditor } from "./extensions/tsl-graph/TSLGraphEditor.js";
|
|
2
|
+
import { RendererInspector, RendererInspectorEventMap } from "./RendererInspector.js";
|
|
2
3
|
import { ParametersGroup } from "./tabs/Parameters.js";
|
|
4
|
+
import { Tab } from "./ui/Tab.js";
|
|
3
5
|
|
|
4
|
-
|
|
6
|
+
export interface InspectorEventMap extends RendererInspectorEventMap {
|
|
7
|
+
resize: {};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class Inspector extends RendererInspector<InspectorEventMap> {
|
|
5
11
|
createParameters(name: string): ParametersGroup;
|
|
6
12
|
|
|
7
13
|
get domElement(): HTMLDivElement;
|
|
14
|
+
|
|
15
|
+
onExtension(name: "TSL Graph", callback: (extension: TSLGraphEditor) => void): this;
|
|
16
|
+
|
|
17
|
+
hide(): void;
|
|
18
|
+
show(): void;
|
|
19
|
+
|
|
20
|
+
getSize(): { width: number; height: number };
|
|
21
|
+
|
|
22
|
+
setActiveTab(tab: Tab): this;
|
|
23
|
+
addTab(tab: Tab): this;
|
|
24
|
+
removeTab(tab: Tab): this;
|
|
25
|
+
|
|
26
|
+
setActiveExtension(name: "TSL Graph", value: boolean): this;
|
|
8
27
|
}
|
|
9
28
|
|
|
10
29
|
export { Inspector };
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { InspectorBase } from "three/webgpu";
|
|
1
|
+
import { InspectorBase, InspectorBaseEventMap } from "three/webgpu";
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface RendererInspectorEventMap extends InspectorBaseEventMap {
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export class RendererInspector<TEventMap extends RendererInspectorEventMap = RendererInspectorEventMap>
|
|
7
|
+
extends InspectorBase<TEventMap>
|
|
8
|
+
{
|
|
4
9
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Material } from "../../../../../src/materials/Material.js";
|
|
2
|
+
import { Scene } from "../../../../../src/scenes/Scene.js";
|
|
3
|
+
import { Extension, ExtensionEventMap } from "../../Extension.js";
|
|
4
|
+
|
|
5
|
+
interface TSLGraphEditorEventMap extends ExtensionEventMap {
|
|
6
|
+
change: { material: Material };
|
|
7
|
+
remove: { graphId: string };
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class TSLGraphEditor extends Extension<TSLGraphEditorEventMap> {
|
|
11
|
+
constructor();
|
|
12
|
+
|
|
13
|
+
get hasGraphs(): boolean;
|
|
14
|
+
|
|
15
|
+
apply(scene: Scene): this;
|
|
16
|
+
|
|
17
|
+
restoreMaterial(material: Material): void;
|
|
18
|
+
|
|
19
|
+
setMaterial(material: Material): Promise<void>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FileLoader, LoadingManager, Scene } from "three";
|
|
2
|
+
|
|
3
|
+
declare class TSLGraphLoaderApplier {
|
|
4
|
+
constructor(tslGraphFns: never);
|
|
5
|
+
|
|
6
|
+
apply(scene: Scene): void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class TSLGraphLoader extends FileLoader<TSLGraphLoaderApplier> {
|
|
10
|
+
constructor(manager?: LoadingManager);
|
|
11
|
+
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { Item } from "../ui/Item.js";
|
|
2
2
|
import { Tab } from "../ui/Tab.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ValueButton,
|
|
5
|
+
ValueCheckbox,
|
|
6
|
+
ValueColor,
|
|
7
|
+
ValueNumber,
|
|
8
|
+
ValueSelect,
|
|
9
|
+
ValueSlider,
|
|
10
|
+
ValueString,
|
|
11
|
+
} from "../ui/Values.js";
|
|
4
12
|
|
|
5
13
|
type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
|
|
6
14
|
|
|
@@ -35,6 +43,14 @@ interface ValueCheckboxWithParameters<
|
|
|
35
43
|
listen: () => this;
|
|
36
44
|
}
|
|
37
45
|
|
|
46
|
+
interface ValueStringWithParameters<
|
|
47
|
+
T = Record<string, unknown>,
|
|
48
|
+
K extends KeyToValueOfType<T, string> = KeyToValueOfType<T, string>,
|
|
49
|
+
> extends ValueString<T, K> {
|
|
50
|
+
name: (name: string) => this;
|
|
51
|
+
listen: () => this;
|
|
52
|
+
}
|
|
53
|
+
|
|
38
54
|
interface ValueButtonWithParameters<
|
|
39
55
|
T = Record<string, unknown>,
|
|
40
56
|
K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
|
|
@@ -79,6 +95,11 @@ declare class ParametersGroup {
|
|
|
79
95
|
property: K,
|
|
80
96
|
options?: never,
|
|
81
97
|
): ValueCheckboxWithParameters<T, K>;
|
|
98
|
+
add<T, K extends KeyToValueOfType<T, string>>(
|
|
99
|
+
object: T,
|
|
100
|
+
property: K,
|
|
101
|
+
options?: never,
|
|
102
|
+
): ValueStringWithParameters<T, K>;
|
|
82
103
|
add<T, K extends KeyToValueOfType<T, (this: T) => void>>(
|
|
83
104
|
object: T,
|
|
84
105
|
property: K,
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { EventDispatcher } from "../../../../src/core/EventDispatcher.js";
|
|
2
|
+
|
|
3
|
+
export interface TabEventMap {}
|
|
4
|
+
|
|
5
|
+
export class Tab<TEventMap extends TabEventMap = TabEventMap> extends EventDispatcher<TEventMap> {
|
|
2
6
|
constructor(title: string);
|
|
3
7
|
}
|
|
@@ -2,7 +2,13 @@ import { ColorRepresentation, EventDispatcher } from "three";
|
|
|
2
2
|
|
|
3
3
|
type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
export interface ValueEventMap {}
|
|
6
|
+
|
|
7
|
+
declare class Value<
|
|
8
|
+
T = Record<string, unknown>,
|
|
9
|
+
K extends keyof T = keyof T,
|
|
10
|
+
TEventMap extends ValueEventMap = ValueEventMap,
|
|
11
|
+
> extends EventDispatcher<TEventMap> {
|
|
6
12
|
onChange(callback: (value: T[K]) => void): this;
|
|
7
13
|
}
|
|
8
14
|
|
|
@@ -74,7 +80,21 @@ declare class ValueButton<
|
|
|
74
80
|
T = Record<string, unknown>,
|
|
75
81
|
K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
|
|
76
82
|
> extends Value<T, K> {
|
|
77
|
-
constructor(params:
|
|
83
|
+
constructor(params: ValueButtonParams);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface ValueStringParams {
|
|
87
|
+
value?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare class ValueString<
|
|
91
|
+
T = Record<string, unknown>,
|
|
92
|
+
K extends KeyToValueOfType<T, string> = KeyToValueOfType<T, string>,
|
|
93
|
+
> extends Value<T, K> {
|
|
94
|
+
constructor(params: ValueStringParams);
|
|
95
|
+
|
|
96
|
+
setValue(val: string): this;
|
|
97
|
+
getValue(): string;
|
|
78
98
|
}
|
|
79
99
|
|
|
80
|
-
export { Value, ValueButton, ValueCheckbox, ValueColor, ValueNumber, ValueSelect, ValueSlider };
|
|
100
|
+
export { Value, ValueButton, ValueCheckbox, ValueColor, ValueNumber, ValueSelect, ValueSlider, ValueString };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Camera, Object3D, WebGLRenderer } from "three";
|
|
2
|
+
import { WebGPURenderer } from "three/webgpu";
|
|
3
|
+
|
|
4
|
+
declare class InteractionManager {
|
|
5
|
+
objects: Object3D[];
|
|
6
|
+
element: HTMLCanvasElement | null;
|
|
7
|
+
camera: Camera | null;
|
|
8
|
+
|
|
9
|
+
constructor();
|
|
10
|
+
|
|
11
|
+
add(...objects: Object3D[]): this;
|
|
12
|
+
remove(...objects: Object3D[]): this;
|
|
13
|
+
connect(renderer: WebGPURenderer | WebGLRenderer, camera: Camera): this;
|
|
14
|
+
update(): void;
|
|
15
|
+
disconnect(): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { InteractionManager };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Lighting } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export interface DynamicLightingOptions {
|
|
4
|
+
maxDirectionalLights?: number | undefined;
|
|
5
|
+
maxPointLights?: number | undefined;
|
|
6
|
+
maxSpotLights?: number | undefined;
|
|
7
|
+
maxHemisphereLights?: number | undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class DynamicLighting extends Lighting {
|
|
11
|
+
options: DynamicLightingOptions;
|
|
12
|
+
|
|
13
|
+
constructor(options?: DynamicLightingOptions);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default DynamicLighting;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Box3, Data3DTexture, Object3D, Scene, Vector3, WebGLRenderer } from "three";
|
|
2
|
+
|
|
3
|
+
export interface LightProbeGridBakeOptions {
|
|
4
|
+
cubemapSize?: number | undefined;
|
|
5
|
+
near?: number | undefined;
|
|
6
|
+
far?: number | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare class LightProbeGrid extends Object3D {
|
|
10
|
+
readonly isLightProbeGrid: boolean;
|
|
11
|
+
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
depth: number;
|
|
15
|
+
resolution: Vector3;
|
|
16
|
+
boundingBox: Box3;
|
|
17
|
+
texture: Data3DTexture | null;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
width?: number,
|
|
21
|
+
height?: number,
|
|
22
|
+
depth?: number,
|
|
23
|
+
widthProbes?: number,
|
|
24
|
+
heightProbes?: number,
|
|
25
|
+
depthProbes?: number,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
getProbePosition(ix: number, iy: number, iz: number, target: Vector3): Vector3;
|
|
29
|
+
updateBoundingBox(): void;
|
|
30
|
+
bake(renderer: WebGLRenderer, scene: Scene, options?: LightProbeGridBakeOptions): void;
|
|
31
|
+
dispose(): void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { LightProbeGrid };
|
|
@@ -23,10 +23,12 @@ export interface EXR {
|
|
|
23
23
|
declare class EXRLoader extends DataTextureLoader {
|
|
24
24
|
type: TextureDataType;
|
|
25
25
|
outputFormat: typeof RGBAFormat | typeof RGFormat | typeof RedFormat;
|
|
26
|
+
part: number;
|
|
26
27
|
|
|
27
28
|
constructor(manager?: LoadingManager);
|
|
28
29
|
|
|
29
30
|
parse(buffer: ArrayBuffer): EXR;
|
|
30
31
|
setDataType(type: typeof HalfFloatType | typeof FloatType): this;
|
|
31
32
|
setOutputFormat(value: typeof RGBAFormat | typeof RGFormat | typeof RedFormat): this;
|
|
33
|
+
setPart(value: number): this;
|
|
32
34
|
}
|
|
@@ -4,7 +4,7 @@ import { LDrawConditionalLineMaterial as LDrawConditionalLineNodeMaterial } from
|
|
|
4
4
|
|
|
5
5
|
export class LDrawLoader extends Loader<Group> {
|
|
6
6
|
materials: Material[];
|
|
7
|
-
|
|
7
|
+
materialLibrary: Record<string, Material>;
|
|
8
8
|
|
|
9
9
|
fileMap: Record<string, string>;
|
|
10
10
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { BufferGeometry, Loader, LoadingManager } from "three";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated The loader has been deprecated and will be removed with r194. Export your VTK files to glTF before using them on the web.
|
|
5
|
+
*/
|
|
3
6
|
export class VTKLoader extends Loader<BufferGeometry> {
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated The loader has been deprecated and will be removed with r194. Export your VTK files to glTF before using them on the web.
|
|
9
|
+
*/
|
|
4
10
|
constructor(manager?: LoadingManager);
|
|
5
11
|
|
|
6
12
|
parse(data: ArrayBuffer | string, path: string): BufferGeometry;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BufferGeometry, ColorRepresentation, Mesh,
|
|
1
|
+
import { BufferGeometry, ColorRepresentation, Mesh, WebGLRenderTarget } from "three";
|
|
2
2
|
|
|
3
3
|
export interface ReflectorOptions {
|
|
4
4
|
color?: ColorRepresentation | undefined;
|
|
@@ -12,7 +12,6 @@ export interface ReflectorOptions {
|
|
|
12
12
|
export class Reflector extends Mesh {
|
|
13
13
|
type: "Reflector";
|
|
14
14
|
forceUpdate: boolean;
|
|
15
|
-
camera: PerspectiveCamera;
|
|
16
15
|
|
|
17
16
|
constructor(geometry?: BufferGeometry, options?: ReflectorOptions);
|
|
18
17
|
|
|
@@ -12,6 +12,7 @@ declare class SkyMesh extends Mesh<BoxGeometry, NodeMaterial> {
|
|
|
12
12
|
cloudCoverage: UniformNode<"float", number>;
|
|
13
13
|
cloudDensity: UniformNode<"float", number>;
|
|
14
14
|
cloudElevation: UniformNode<"float", number>;
|
|
15
|
+
showSunDisc: UniformNode<"float", number>;
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* @deprecated
|