@types/three 0.183.1 → 0.184.1
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/Plane.d.ts +1 -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/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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Camera } from "../../../src/cameras/Camera.js";
|
|
2
|
+
import { Object3D } from "../../../src/core/Object3D.js";
|
|
3
|
+
import { Material } from "../../../src/materials/Material.js";
|
|
4
|
+
import { WebGLProgramParametersWithUniforms } from "../../../src/renderers/webgl/WebGLPrograms.js";
|
|
5
|
+
import { WebGLRenderer } from "../../../src/renderers/WebGLRenderer.js";
|
|
6
|
+
|
|
7
|
+
export class WebGLNodesHandler {
|
|
8
|
+
constructor();
|
|
9
|
+
|
|
10
|
+
setRenderer(renderer: WebGLRenderer): void;
|
|
11
|
+
renderStart(scene: Object3D, camera: Camera): void;
|
|
12
|
+
renderEnd(): void;
|
|
13
|
+
build(material: Material, object: Object3D, parameters: WebGLProgramParametersWithUniforms): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Node, TempNode, TextureNode } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
declare class FSR1Node extends TempNode<"vec4"> {
|
|
4
|
+
textureNode: TextureNode;
|
|
5
|
+
sharpness: Node<"float">;
|
|
6
|
+
denoise: Node<"bool">;
|
|
7
|
+
|
|
8
|
+
constructor(textureNode: TextureNode, sharpness?: Node<"float"> | number, denoise?: Node<"bool"> | boolean);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default FSR1Node;
|
|
12
|
+
|
|
13
|
+
export const fsr1: (
|
|
14
|
+
node: Node<"vec4">,
|
|
15
|
+
sharpness?: Node<"float"> | number,
|
|
16
|
+
denoise?: Node<"bool"> | boolean,
|
|
17
|
+
) => FSR1Node;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node, TempNode, TextureNode } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
declare class SharpenNode extends TempNode<"vec4"> {
|
|
4
|
+
readonly isSharpenNode: boolean;
|
|
5
|
+
|
|
6
|
+
textureNode: TextureNode;
|
|
7
|
+
sharpness: Node<"float">;
|
|
8
|
+
denoise: Node<"bool">;
|
|
9
|
+
|
|
10
|
+
constructor(textureNode: TextureNode, sharpness?: Node<"float"> | number, denoise?: Node<"bool"> | boolean);
|
|
11
|
+
|
|
12
|
+
setSize(width: number, height: number): void;
|
|
13
|
+
getTextureNode(): TextureNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default SharpenNode;
|
|
17
|
+
|
|
18
|
+
export const sharpen: (
|
|
19
|
+
node: Node<"vec4">,
|
|
20
|
+
sharpness?: Node<"float"> | number,
|
|
21
|
+
denoise?: Node<"bool"> | boolean,
|
|
22
|
+
) => SharpenNode;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Camera, TempNode, TextureNode } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
declare class TAAUNode extends TempNode<"vec4"> {
|
|
4
|
+
readonly isTAAUNode: boolean;
|
|
5
|
+
|
|
6
|
+
beautyNode: TextureNode;
|
|
7
|
+
depthNode: TextureNode;
|
|
8
|
+
velocityNode: TextureNode;
|
|
9
|
+
camera: Camera;
|
|
10
|
+
|
|
11
|
+
depthThreshold: number;
|
|
12
|
+
edgeDepthDiff: number;
|
|
13
|
+
maxVelocityLength: number;
|
|
14
|
+
currentFrameWeight: number;
|
|
15
|
+
|
|
16
|
+
constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera);
|
|
17
|
+
|
|
18
|
+
getTextureNode(): TextureNode;
|
|
19
|
+
setSize(outputWidth: number, outputHeight: number): void;
|
|
20
|
+
setViewOffset(inputWidth: number, inputHeight: number): void;
|
|
21
|
+
clearViewOffset(): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default TAAUNode;
|
|
25
|
+
|
|
26
|
+
export const taau: (
|
|
27
|
+
beautyNode: TextureNode,
|
|
28
|
+
depthNode: TextureNode,
|
|
29
|
+
velocityNode: TextureNode,
|
|
30
|
+
camera: Camera,
|
|
31
|
+
) => TAAUNode;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LightsNode } from "three/webgpu";
|
|
2
|
+
|
|
3
|
+
export interface DynamicLightsNodeOptions {
|
|
4
|
+
maxDirectionalLights?: number | undefined;
|
|
5
|
+
maxPointLights?: number | undefined;
|
|
6
|
+
maxSpotLights?: number | undefined;
|
|
7
|
+
maxHemisphereLights?: number | undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare class DynamicLightsNode extends LightsNode {
|
|
11
|
+
maxDirectionalLights: number;
|
|
12
|
+
maxPointLights: number;
|
|
13
|
+
maxSpotLights: number;
|
|
14
|
+
maxHemisphereLights: number;
|
|
15
|
+
|
|
16
|
+
constructor(options?: DynamicLightsNodeOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default DynamicLightsNode;
|
|
20
|
+
|
|
21
|
+
export const dynamicLights: (options?: DynamicLightsNodeOptions) => DynamicLightsNode;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Mesh, Object3D, Scene } from "three";
|
|
2
|
+
|
|
3
|
+
export interface SceneOptimizerOptions {
|
|
4
|
+
debug?: boolean | undefined;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare class SceneOptimizer {
|
|
8
|
+
scene: Scene;
|
|
9
|
+
debug: boolean;
|
|
10
|
+
|
|
11
|
+
constructor(scene: Scene, options?: SceneOptimizerOptions);
|
|
12
|
+
|
|
13
|
+
removeEmptyNodes(object: Object3D): void;
|
|
14
|
+
disposeMeshes(meshesToRemove: Set<Mesh>): void;
|
|
15
|
+
toBatchedMesh(): Scene;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { SceneOptimizer };
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.184.1",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,11 +44,10 @@
|
|
|
44
44
|
"@tweenjs/tween.js": "~23.1.3",
|
|
45
45
|
"@types/stats.js": "*",
|
|
46
46
|
"@types/webxr": ">=0.5.17",
|
|
47
|
-
"@webgpu/types": "*",
|
|
48
47
|
"fflate": "~0.8.2",
|
|
49
|
-
"meshoptimizer": "~1.
|
|
48
|
+
"meshoptimizer": "~1.1.1"
|
|
50
49
|
},
|
|
51
50
|
"peerDependencies": {},
|
|
52
|
-
"typesPublisherContentHash": "
|
|
53
|
-
"typeScriptVersion": "5.
|
|
51
|
+
"typesPublisherContentHash": "67363064a17642624b2c45fc4f61890fb71a24dafc84869a7c0661c82d47d208",
|
|
52
|
+
"typeScriptVersion": "5.3"
|
|
54
53
|
}
|
three/src/Three.Core.d.ts
CHANGED
|
@@ -141,7 +141,17 @@ export * from "./objects/Sprite.js";
|
|
|
141
141
|
export * from "./renderers/WebGL3DRenderTarget.js";
|
|
142
142
|
export * from "./renderers/WebGLArrayRenderTarget.js";
|
|
143
143
|
export * from "./renderers/WebGLRenderTarget.js";
|
|
144
|
-
export
|
|
144
|
+
export {
|
|
145
|
+
WebXRController,
|
|
146
|
+
type WebXRSpaceEventMap,
|
|
147
|
+
type XRControllerEventType,
|
|
148
|
+
type XRGripSpace,
|
|
149
|
+
type XRHandInputState,
|
|
150
|
+
type XRHandJoints,
|
|
151
|
+
type XRHandSpace,
|
|
152
|
+
type XRJointSpace,
|
|
153
|
+
type XRTargetRaySpace,
|
|
154
|
+
} from "./renderers/webxr/WebXRController.js";
|
|
145
155
|
export * from "./scenes/Fog.js";
|
|
146
156
|
export * from "./scenes/FogExp2.js";
|
|
147
157
|
export * from "./scenes/Scene.js";
|
|
@@ -149,6 +159,7 @@ export * from "./textures/CanvasTexture.js";
|
|
|
149
159
|
export * from "./textures/CompressedArrayTexture.js";
|
|
150
160
|
export * from "./textures/CompressedCubeTexture.js";
|
|
151
161
|
export * from "./textures/CompressedTexture.js";
|
|
162
|
+
export * from "./textures/CubeDepthTexture.js";
|
|
152
163
|
export * from "./textures/CubeTexture.js";
|
|
153
164
|
export * from "./textures/Data3DTexture.js";
|
|
154
165
|
export * from "./textures/DataArrayTexture.js";
|
|
@@ -156,6 +167,7 @@ export * from "./textures/DataTexture.js";
|
|
|
156
167
|
export * from "./textures/DepthTexture.js";
|
|
157
168
|
export * from "./textures/ExternalTexture.js";
|
|
158
169
|
export * from "./textures/FramebufferTexture.js";
|
|
170
|
+
export * from "./textures/HTMLTexture.js";
|
|
159
171
|
export * from "./textures/Source.js";
|
|
160
172
|
export * from "./textures/Texture.js";
|
|
161
173
|
export * from "./textures/VideoFrameTexture.js";
|
three/src/Three.TSL.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export const VarIntent: typeof TSL.VarIntent;
|
|
|
40
40
|
export const abs: typeof TSL.abs;
|
|
41
41
|
export const acesFilmicToneMapping: typeof TSL.acesFilmicToneMapping;
|
|
42
42
|
export const acos: typeof TSL.acos;
|
|
43
|
+
export const acosh: typeof TSL.acosh;
|
|
43
44
|
export const add: typeof TSL.add;
|
|
44
45
|
export const addMethodChaining: typeof TSL.addMethodChaining;
|
|
45
46
|
export const addNodeElement: typeof TSL.addNodeElement;
|
|
@@ -55,8 +56,10 @@ export const append: typeof TSL.append;
|
|
|
55
56
|
export const array: typeof TSL.array;
|
|
56
57
|
export const arrayBuffer: typeof TSL.arrayBuffer;
|
|
57
58
|
export const asin: typeof TSL.asin;
|
|
59
|
+
export const asinh: typeof TSL.asinh;
|
|
58
60
|
export const assign: typeof TSL.assign;
|
|
59
61
|
export const atan: typeof TSL.atan;
|
|
62
|
+
export const atanh: typeof TSL.atanh;
|
|
60
63
|
export const atomicAdd: typeof TSL.atomicAdd;
|
|
61
64
|
export const atomicAnd: typeof TSL.atomicAnd;
|
|
62
65
|
export const atomicFunc: typeof TSL.atomicFunc;
|
|
@@ -140,6 +143,7 @@ export const countLeadingZeros: typeof TSL.countLeadingZeros;
|
|
|
140
143
|
export const countOneBits: typeof TSL.countOneBits;
|
|
141
144
|
export const countTrailingZeros: typeof TSL.countTrailingZeros;
|
|
142
145
|
export const cos: typeof TSL.cos;
|
|
146
|
+
export const cosh: typeof TSL.cosh;
|
|
143
147
|
export const cross: typeof TSL.cross;
|
|
144
148
|
export const cubeTexture: typeof TSL.cubeTexture;
|
|
145
149
|
export const cubeTextureBase: typeof TSL.cubeTextureBase;
|
|
@@ -217,7 +221,7 @@ export const greaterThan: typeof TSL.greaterThan;
|
|
|
217
221
|
export const greaterThanEqual: typeof TSL.greaterThanEqual;
|
|
218
222
|
export const hash: typeof TSL.hash;
|
|
219
223
|
export const highpModelNormalViewMatrix: typeof TSL.highpModelNormalViewMatrix;
|
|
220
|
-
export const
|
|
224
|
+
export const highpModelViewMatrix: typeof TSL.highpModelViewMatrix;
|
|
221
225
|
export const hue: typeof TSL.hue;
|
|
222
226
|
export const increment: typeof TSL.increment;
|
|
223
227
|
export const incrementBefore: typeof TSL.incrementBefore;
|
|
@@ -497,6 +501,7 @@ export const shiftRight: typeof TSL.shiftRight;
|
|
|
497
501
|
export const shininess: typeof TSL.shininess;
|
|
498
502
|
export const sign: typeof TSL.sign;
|
|
499
503
|
export const sin: typeof TSL.sin;
|
|
504
|
+
export const sinh: typeof TSL.sinh;
|
|
500
505
|
export const sinc: typeof TSL.sinc;
|
|
501
506
|
export const skinning: typeof TSL.skinning;
|
|
502
507
|
export const smoothstep: typeof TSL.smoothstep;
|
|
@@ -541,6 +546,7 @@ export const subgroupShuffleXor: typeof TSL.subgroupShuffleXor;
|
|
|
541
546
|
export const subgroupSize: typeof TSL.subgroupSize;
|
|
542
547
|
export const subgroupXor: typeof TSL.subgroupXor;
|
|
543
548
|
export const tan: typeof TSL.tan;
|
|
549
|
+
export const tanh: typeof TSL.tanh;
|
|
544
550
|
export const tangentGeometry: typeof TSL.tangentGeometry;
|
|
545
551
|
export const tangentLocal: typeof TSL.tangentLocal;
|
|
546
552
|
export const tangentView: typeof TSL.tangentView;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export * from "./Three.Core.js";
|
|
2
2
|
|
|
3
3
|
export * from "./materials/nodes/NodeMaterials.js";
|
|
4
|
+
export type { default as Backend } from "./renderers/common/Backend.js";
|
|
4
5
|
export { default as BundleGroup } from "./renderers/common/BundleGroup.js";
|
|
5
6
|
export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js";
|
|
6
7
|
export { default as Lighting } from "./renderers/common/Lighting.js";
|
|
7
8
|
export { default as PostProcessing } from "./renderers/common/PostProcessing.js";
|
|
8
9
|
export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
|
|
10
|
+
export { default as ReadbackBuffer } from "./renderers/common/ReadbackBuffer.js";
|
|
9
11
|
export type { default as Renderer } from "./renderers/common/Renderer.js";
|
|
10
12
|
export { default as RenderPipeline } from "./renderers/common/RenderPipeline.js";
|
|
13
|
+
export { default as WebGLBackend } from "./renderers/webgl-fallback/WebGLBackend.js";
|
|
14
|
+
export { default as WebGPUBackend } from "./renderers/webgpu/WebGPUBackend.js";
|
|
11
15
|
export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.Nodes.js";
|
|
12
16
|
import * as RendererUtils from "./renderers/common/RendererUtils.js";
|
|
13
17
|
export { RendererUtils };
|
|
@@ -17,13 +21,13 @@ export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
|
17
21
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
18
22
|
export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js";
|
|
19
23
|
export * from "./nodes/Nodes.js";
|
|
24
|
+
export { ClippingGroup } from "./objects/ClippingGroup.js";
|
|
20
25
|
export { default as BlendMode } from "./renderers/common/BlendMode.js";
|
|
21
26
|
export { default as CanvasTarget } from "./renderers/common/CanvasTarget.js";
|
|
22
|
-
export { default as InspectorBase } from "./renderers/common/InspectorBase.js";
|
|
23
|
-
import * as TSL from "./nodes/TSL.js";
|
|
24
|
-
export { TSL };
|
|
25
|
-
export { ClippingGroup } from "./objects/ClippingGroup.js";
|
|
26
27
|
export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js";
|
|
28
|
+
export { default as InspectorBase, type InspectorBaseEventMap } from "./renderers/common/InspectorBase.js";
|
|
27
29
|
export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js";
|
|
28
30
|
export { default as StorageInstancedBufferAttribute } from "./renderers/common/StorageInstancedBufferAttribute.js";
|
|
29
31
|
export { default as StorageTexture } from "./renderers/common/StorageTexture.js";
|
|
32
|
+
import * as TSL from "./nodes/TSL.js";
|
|
33
|
+
export { TSL };
|
three/src/Three.WebGPU.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
export * from "./Three.Core.js";
|
|
2
2
|
|
|
3
3
|
export * from "./materials/nodes/NodeMaterials.js";
|
|
4
|
+
export type { default as Backend } from "./renderers/common/Backend.js";
|
|
4
5
|
export { default as BundleGroup } from "./renderers/common/BundleGroup.js";
|
|
5
6
|
export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js";
|
|
6
7
|
export { default as Lighting } from "./renderers/common/Lighting.js";
|
|
7
8
|
export { default as PostProcessing } from "./renderers/common/PostProcessing.js";
|
|
8
9
|
export { default as QuadMesh } from "./renderers/common/QuadMesh.js";
|
|
10
|
+
export { default as ReadbackBuffer } from "./renderers/common/ReadbackBuffer.js";
|
|
9
11
|
export type { default as Renderer } from "./renderers/common/Renderer.js";
|
|
10
12
|
export { default as RenderPipeline } from "./renderers/common/RenderPipeline.js";
|
|
13
|
+
export { default as WebGLCapabilities } from "./renderers/webgl-fallback/utils/WebGLCapabilities.js";
|
|
14
|
+
export { default as WebGLBackend } from "./renderers/webgl-fallback/WebGLBackend.js";
|
|
15
|
+
export { default as WebGPUBackend } from "./renderers/webgpu/WebGPUBackend.js";
|
|
11
16
|
export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.js";
|
|
12
17
|
import * as RendererUtils from "./renderers/common/RendererUtils.js";
|
|
13
18
|
export { RendererUtils };
|
|
@@ -17,16 +22,18 @@ export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js";
|
|
|
17
22
|
export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js";
|
|
18
23
|
export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js";
|
|
19
24
|
export * from "./nodes/Nodes.js";
|
|
25
|
+
export { ClippingGroup } from "./objects/ClippingGroup.js";
|
|
20
26
|
export { default as BlendMode } from "./renderers/common/BlendMode.js";
|
|
21
27
|
export { default as CanvasTarget } from "./renderers/common/CanvasTarget.js";
|
|
22
28
|
export { default as CubeRenderTarget } from "./renderers/common/CubeRenderTarget.js";
|
|
23
|
-
export { default as InspectorBase } from "./renderers/common/InspectorBase.js";
|
|
24
|
-
import * as TSL from "./nodes/TSL.js";
|
|
25
|
-
export { TSL };
|
|
26
|
-
export { ClippingGroup } from "./objects/ClippingGroup.js";
|
|
27
29
|
export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js";
|
|
30
|
+
export { default as InspectorBase, type InspectorBaseEventMap } from "./renderers/common/InspectorBase.js";
|
|
28
31
|
export { default as Storage3DTexture } from "./renderers/common/Storage3DTexture.js";
|
|
29
32
|
export { default as StorageArrayTexture } from "./renderers/common/StorageArrayTexture.js";
|
|
30
33
|
export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js";
|
|
31
34
|
export { default as StorageInstancedBufferAttribute } from "./renderers/common/StorageInstancedBufferAttribute.js";
|
|
32
35
|
export { default as StorageTexture } from "./renderers/common/StorageTexture.js";
|
|
36
|
+
export { default as GLSLNodeBuilder } from "./renderers/webgl-fallback/nodes/GLSLNodeBuilder.js";
|
|
37
|
+
export { default as BasicNodeLibrary } from "./renderers/webgpu/nodes/BasicNodeLibrary.js";
|
|
38
|
+
import * as TSL from "./nodes/TSL.js";
|
|
39
|
+
export { TSL };
|
three/src/Three.d.ts
CHANGED
|
@@ -38,17 +38,6 @@ export type { WebGLUniforms } from "./renderers/webgl/WebGLUniforms.js";
|
|
|
38
38
|
export * from "./renderers/webgl/WebGLUtils.js";
|
|
39
39
|
export * from "./renderers/WebGLCubeRenderTarget.js";
|
|
40
40
|
export * from "./renderers/WebGLRenderer.js";
|
|
41
|
-
export type {
|
|
42
|
-
WebXRController,
|
|
43
|
-
WebXRSpaceEventMap,
|
|
44
|
-
XRControllerEventType,
|
|
45
|
-
XRGripSpace,
|
|
46
|
-
XRHandInputState,
|
|
47
|
-
XRHandJoints,
|
|
48
|
-
XRHandSpace,
|
|
49
|
-
XRJointSpace,
|
|
50
|
-
XRTargetRaySpace,
|
|
51
|
-
} from "./renderers/webxr/WebXRController.js";
|
|
52
41
|
export type { WebXRDepthSensing } from "./renderers/webxr/WebXRDepthSensing.js";
|
|
53
42
|
export type {
|
|
54
43
|
WebXRArrayCamera,
|
|
@@ -36,7 +36,9 @@ export interface AnimationMixerStats {
|
|
|
36
36
|
* the scene. When multiple objects in the scene are animated independently,
|
|
37
37
|
* one `AnimationMixer` may be used for each object.
|
|
38
38
|
*/
|
|
39
|
-
export class AnimationMixer extends
|
|
39
|
+
export class AnimationMixer<TEventMap extends AnimationMixerEventMap = AnimationMixerEventMap>
|
|
40
|
+
extends EventDispatcher<TEventMap>
|
|
41
|
+
{
|
|
40
42
|
/**
|
|
41
43
|
* Constructs a new animation mixer.
|
|
42
44
|
*
|
|
@@ -7,13 +7,13 @@ export class AudioContext {
|
|
|
7
7
|
/**
|
|
8
8
|
* Returns the global native audio context.
|
|
9
9
|
*
|
|
10
|
-
* @return {AudioContext} The native audio context.
|
|
10
|
+
* @return {Window.AudioContext} The native audio context.
|
|
11
11
|
*/
|
|
12
12
|
static getContext(): AudioContext;
|
|
13
13
|
/**
|
|
14
14
|
* Allows to set the global native audio context from outside.
|
|
15
15
|
*
|
|
16
|
-
* @param {AudioContext} value - The native context to set.
|
|
16
|
+
* @param {Window.AudioContext} value - The native context to set.
|
|
17
17
|
*/
|
|
18
18
|
static setContext(value: AudioContext): void;
|
|
19
19
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AttributeGPUType, Usage } from "../constants.js";
|
|
2
2
|
import { Matrix3 } from "../math/Matrix3.js";
|
|
3
3
|
import { Matrix4 } from "../math/Matrix4.js";
|
|
4
|
+
import { EventDispatcher } from "./EventDispatcher.js";
|
|
4
5
|
|
|
5
6
|
export type TypedArray =
|
|
6
7
|
| Int8Array
|
|
@@ -34,6 +35,10 @@ export interface BufferAttributeJSON {
|
|
|
34
35
|
usage?: Usage;
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
export interface BufferAttributeEventMap {
|
|
39
|
+
dispose: {};
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
/**
|
|
38
43
|
* This class stores data for an attribute (such as vertex positions, face indices, normals, colors, UVs, and any custom attributes )
|
|
39
44
|
* associated with a {@link THREE.BufferGeometry | BufferGeometry}, which allows for more efficient passing of data to the GPU
|
|
@@ -48,7 +53,9 @@ export interface BufferAttributeJSON {
|
|
|
48
53
|
* @see {@link https://threejs.org/docs/index.html#api/en/core/BufferAttribute | Official Documentation}
|
|
49
54
|
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/BufferAttribute.js | Source}
|
|
50
55
|
*/
|
|
51
|
-
export class BufferAttribute
|
|
56
|
+
export class BufferAttribute<TEventMap extends BufferAttributeEventMap = BufferAttributeEventMap>
|
|
57
|
+
extends EventDispatcher<TEventMap>
|
|
58
|
+
{
|
|
52
59
|
/**
|
|
53
60
|
* This creates a new {@link THREE.GLBufferAttribute | GLBufferAttribute} object.
|
|
54
61
|
* @param array Must be a `TypedArray`. Used to instantiate the buffer.
|
|
@@ -348,6 +355,11 @@ export class BufferAttribute {
|
|
|
348
355
|
* Convert this object to three.js to the `data.attributes` part of {@link https://github.com/mrdoob/three.js/wiki/JSON-Geometry-format-4 | JSON Geometry format v4},
|
|
349
356
|
*/
|
|
350
357
|
toJSON(): BufferAttributeJSON;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Disposes of the buffer attribute. Available only in {@link WebGPURenderer}.
|
|
361
|
+
*/
|
|
362
|
+
dispose(): void;
|
|
351
363
|
}
|
|
352
364
|
|
|
353
365
|
/**
|
three/src/core/RenderTarget.d.ts
CHANGED
|
@@ -19,7 +19,14 @@ export interface RenderTargetOptions extends TextureParameters {
|
|
|
19
19
|
multiview?: boolean | undefined;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export
|
|
22
|
+
export interface RenderTargetEventMap {
|
|
23
|
+
dispose: {};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class RenderTarget<
|
|
27
|
+
TTexture extends Texture | Texture[] = Texture,
|
|
28
|
+
TEventMap extends RenderTargetEventMap = RenderTargetEventMap,
|
|
29
|
+
> extends EventDispatcher<TEventMap> {
|
|
23
30
|
readonly isRenderTarget: true;
|
|
24
31
|
|
|
25
32
|
width: number;
|
|
@@ -2,11 +2,17 @@ import { Usage } from "../constants.js";
|
|
|
2
2
|
import { EventDispatcher } from "./EventDispatcher.js";
|
|
3
3
|
import { Uniform } from "./Uniform.js";
|
|
4
4
|
|
|
5
|
+
export interface UniformsGroupEventMap {
|
|
6
|
+
dispose: {};
|
|
7
|
+
}
|
|
8
|
+
|
|
5
9
|
/**
|
|
6
10
|
* @see Example: {@link https://threejs.org/examples/#webgl2_ubo | WebGL2 / UBO}
|
|
7
11
|
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/core/UniformsGroup.js | Source}
|
|
8
12
|
*/
|
|
9
|
-
export class UniformsGroup extends
|
|
13
|
+
export class UniformsGroup<TEventMap extends UniformsGroupEventMap = UniformsGroupEventMap>
|
|
14
|
+
extends EventDispatcher<TEventMap>
|
|
15
|
+
{
|
|
10
16
|
constructor();
|
|
11
17
|
|
|
12
18
|
readonly isUniformsGroup: true;
|
three/src/extras/Controls.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { EventDispatcher } from "../core/EventDispatcher.js";
|
|
2
2
|
import { Object3D } from "../core/Object3D.js";
|
|
3
3
|
|
|
4
|
+
export interface ControlsEventMap {}
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* Abstract base class for controls.
|
|
6
8
|
*/
|
|
7
|
-
declare abstract class Controls<TEventMap extends
|
|
9
|
+
declare abstract class Controls<TEventMap extends ControlsEventMap = ControlsEventMap>
|
|
10
|
+
extends EventDispatcher<TEventMap>
|
|
11
|
+
{
|
|
8
12
|
/**
|
|
9
13
|
* The 3D object that is managed by the controls.
|
|
10
14
|
*/
|