@types/three 0.168.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.
- three/README.md +1 -1
- three/build/three.webgpu.nodes.d.ts +1 -0
- three/build/three.webgpu.nodes.min.d.ts +1 -0
- three/examples/jsm/Addons.d.ts +3 -10
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +4 -0
- three/examples/jsm/animation/MMDPhysics.d.ts +4 -0
- three/examples/jsm/controls/ArcballControls.d.ts +1 -1
- three/examples/jsm/controls/DragControls.d.ts +0 -15
- three/examples/jsm/controls/TransformControls.d.ts +195 -24
- three/examples/jsm/csm/CSMFrustum.d.ts +8 -2
- three/examples/jsm/csm/CSMHelper.d.ts +2 -1
- three/examples/jsm/csm/CSMShadowNode.d.ts +46 -0
- three/examples/jsm/curves/NURBSCurve.d.ts +12 -1
- three/examples/jsm/exporters/EXRExporter.d.ts +7 -2
- three/examples/jsm/exporters/GLTFExporter.d.ts +20 -3
- three/examples/jsm/exporters/KTX2Exporter.d.ts +3 -1
- three/examples/jsm/exporters/MMDExporter.d.ts +4 -0
- three/examples/jsm/exporters/USDZExporter.d.ts +4 -0
- three/examples/jsm/geometries/DecalGeometry.d.ts +9 -3
- three/examples/jsm/geometries/TeapotGeometry.d.ts +2 -2
- three/examples/jsm/helpers/LightProbeHelper.d.ts +5 -3
- three/examples/jsm/helpers/LightProbeHelperGPU.d.ts +12 -0
- three/examples/jsm/helpers/TextureHelperGPU.d.ts +10 -0
- three/examples/jsm/lighting/TiledLighting.d.ts +10 -0
- three/examples/jsm/lights/LightProbeGenerator.d.ts +5 -1
- three/examples/jsm/lines/Line2.d.ts +15 -1
- three/examples/jsm/lines/LineGeometry.d.ts +18 -1
- three/examples/jsm/lines/LineMaterial.d.ts +65 -12
- three/examples/jsm/lines/LineSegments2.d.ts +25 -2
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +46 -9
- three/examples/jsm/lines/Wireframe.d.ts +5 -2
- three/examples/jsm/lines/WireframeGeometry2.d.ts +1 -1
- three/examples/jsm/lines/webgpu/Wireframe.d.ts +13 -0
- three/examples/jsm/loaders/DRACOLoader.d.ts +6 -0
- three/examples/jsm/loaders/EXRLoader.d.ts +2 -2
- three/examples/jsm/loaders/GLTFLoader.d.ts +1 -2
- three/examples/jsm/loaders/KTX2Loader.d.ts +1 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +10 -0
- three/examples/jsm/loaders/MMDLoader.d.ts +4 -0
- three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +9 -0
- three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +9 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +0 -1
- three/examples/jsm/math/ColorSpaces.d.ts +11 -0
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +8 -10
- three/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +27 -0
- three/examples/jsm/modifiers/CurveModifier.d.ts +7 -3
- three/examples/jsm/modifiers/CurveModifierGPU.d.ts +31 -0
- three/examples/jsm/objects/Lensflare.d.ts +13 -9
- three/examples/jsm/objects/LensflareMesh.d.ts +21 -0
- three/examples/jsm/renderers/SVGRenderer.d.ts +2 -2
- three/{src/nodes → examples/jsm/tsl}/display/AfterImageNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/AnaglyphPassNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/AnamorphicNode.d.ts +2 -4
- three/examples/jsm/tsl/display/BleachBypass.d.ts +3 -0
- three/{src/nodes → examples/jsm/tsl}/display/BloomNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/DenoiseNode.d.ts +2 -6
- three/{src/nodes → examples/jsm/tsl}/display/DepthOfFieldNode.d.ts +1 -5
- three/{src/nodes → examples/jsm/tsl}/display/DotScreenNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/FXAANode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/FilmNode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/GTAONode.d.ts +2 -8
- three/{src/nodes → examples/jsm/tsl}/display/GaussianBlurNode.d.ts +13 -5
- three/examples/jsm/tsl/display/LensflareNode.d.ts +35 -0
- three/{src/nodes → examples/jsm/tsl}/display/Lut3DNode.d.ts +2 -6
- three/{src/nodes → examples/jsm/tsl}/display/MotionBlur.d.ts +1 -2
- three/examples/jsm/tsl/display/OutlineNode.d.ts +32 -0
- three/{src/nodes → examples/jsm/tsl}/display/ParallaxBarrierPassNode.d.ts +2 -3
- three/{src/nodes → examples/jsm/tsl}/display/PixelationPassNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/RGBShiftNode.d.ts +1 -4
- three/examples/jsm/tsl/display/SMAANode.d.ts +17 -0
- three/{src/nodes → examples/jsm/tsl}/display/SSAAPassNode.d.ts +2 -7
- three/examples/jsm/tsl/display/SSRNode.d.ts +38 -0
- three/examples/jsm/tsl/display/Sepia.d.ts +3 -0
- three/{src/nodes → examples/jsm/tsl}/display/SobelOperatorNode.d.ts +1 -3
- three/{src/nodes → examples/jsm/tsl}/display/StereoCompositePassNode.d.ts +2 -5
- three/{src/nodes → examples/jsm/tsl}/display/StereoPassNode.d.ts +2 -5
- three/examples/jsm/tsl/display/TRAAPassNode.d.ts +15 -0
- three/{src/nodes → examples/jsm/tsl}/display/TransitionNode.d.ts +1 -5
- three/examples/jsm/tsl/display/hashBlur.d.ts +7 -0
- three/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +22 -0
- three/examples/jsm/utils/GeometryCompressionUtils.d.ts +20 -4
- three/examples/jsm/utils/ShadowMapViewer.d.ts +8 -6
- three/examples/jsm/utils/ShadowMapViewerGPU.d.ts +26 -0
- three/examples/jsm/utils/SkeletonUtils.d.ts +25 -5
- three/examples/jsm/utils/WebGPUTextureUtils.d.ts +3 -0
- three/package.json +4 -3
- three/src/Three.WebGPU.Nodes.d.ts +205 -0
- three/src/Three.WebGPU.d.ts +7 -2
- three/src/Three.d.ts +2 -7
- three/src/audio/Audio.d.ts +4 -1
- three/src/constants.d.ts +1 -9
- three/src/core/BufferAttribute.d.ts +0 -15
- three/src/core/BufferGeometry.d.ts +13 -2
- three/src/core/InterleavedBuffer.d.ts +0 -12
- three/src/core/Object3D.d.ts +1 -1
- three/src/core/Raycaster.d.ts +2 -1
- three/src/core/RenderTarget.d.ts +1 -2
- three/src/extras/Controls.d.ts +3 -3
- three/src/loaders/FileLoader.d.ts +3 -3
- three/src/loaders/MaterialLoader.d.ts +2 -0
- three/src/loaders/nodes/NodeLoader.d.ts +5 -0
- three/src/loaders/nodes/NodeMaterialLoader.d.ts +3 -0
- three/src/loaders/nodes/NodeObjectLoader.d.ts +12 -0
- three/src/materials/LineBasicMaterial.d.ts +0 -5
- three/src/materials/LineDashedMaterial.d.ts +0 -5
- three/src/materials/Material.d.ts +4 -6
- three/src/materials/MeshBasicMaterial.d.ts +0 -5
- three/src/materials/MeshDepthMaterial.d.ts +0 -5
- three/src/materials/MeshDistanceMaterial.d.ts +0 -5
- three/src/materials/MeshLambertMaterial.d.ts +0 -5
- three/src/materials/MeshMatcapMaterial.d.ts +0 -5
- three/src/materials/MeshNormalMaterial.d.ts +0 -5
- three/src/materials/MeshPhongMaterial.d.ts +0 -5
- three/src/materials/MeshPhysicalMaterial.d.ts +0 -5
- three/src/materials/MeshStandardMaterial.d.ts +0 -5
- three/src/materials/MeshToonMaterial.d.ts +0 -5
- three/src/materials/PointsMaterial.d.ts +0 -5
- three/src/materials/RawShaderMaterial.d.ts +0 -2
- three/src/materials/ShaderMaterial.d.ts +0 -5
- three/src/materials/ShadowMaterial.d.ts +0 -5
- three/src/materials/SpriteMaterial.d.ts +0 -5
- three/src/materials/nodes/MeshNormalNodeMaterial.d.ts +2 -2
- three/src/materials/nodes/NodeMaterial.d.ts +4 -4
- three/src/materials/nodes/NodeMaterials.d.ts +19 -16
- three/src/materials/nodes/manager/NodeMaterialObserver.d.ts +96 -0
- three/src/math/Color.d.ts +39 -22
- three/src/math/ColorManagement.d.ts +24 -24
- three/src/math/Quaternion.d.ts +4 -3
- three/src/math/Triangle.d.ts +24 -0
- three/src/math/Vector4.d.ts +2 -0
- three/src/nodes/Nodes.d.ts +3 -23
- three/src/nodes/TSL.d.ts +75 -187
- three/src/nodes/accessors/BufferAttributeNode.d.ts +1 -0
- three/src/nodes/accessors/Camera.d.ts +0 -1
- three/src/nodes/accessors/MaterialNode.d.ts +0 -1
- three/src/nodes/accessors/ModelNode.d.ts +7 -3
- three/src/nodes/accessors/Normal.d.ts +6 -0
- three/src/nodes/accessors/Object3DNode.d.ts +1 -5
- three/src/nodes/accessors/SceneNode.d.ts +2 -0
- three/src/nodes/accessors/UniformArrayNode.d.ts +2 -2
- three/src/nodes/accessors/VelocityNode.d.ts +6 -1
- three/src/nodes/code/ScriptableNode.d.ts +1 -1
- three/src/nodes/core/Node.d.ts +3 -12
- three/src/nodes/core/NodeUtils.d.ts +5 -1
- three/src/nodes/core/StackNode.d.ts +4 -4
- three/src/nodes/core/StructTypeNode.d.ts +1 -0
- three/src/nodes/core/UniformNode.d.ts +1 -0
- three/src/nodes/core/VarNode.d.ts +12 -1
- three/src/nodes/display/ColorAdjustment.d.ts +29 -0
- three/src/nodes/display/ColorSpaceFunctions.d.ts +2 -2
- three/src/nodes/display/ColorSpaceNode.d.ts +33 -8
- three/src/nodes/display/RenderOutputNode.d.ts +4 -4
- three/src/nodes/display/ScreenNode.d.ts +48 -0
- three/src/nodes/display/ToneMappingFunctions.d.ts +6 -6
- three/src/nodes/display/ToonOutlinePassNode.d.ts +24 -0
- three/src/nodes/display/ViewportDepthNode.d.ts +2 -0
- three/src/nodes/functions/material/getAlphaHashThreshold.d.ts +6 -0
- three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +10 -0
- three/src/nodes/functions/material/getShIrradianceAt.d.ts +6 -0
- three/src/nodes/gpgpu/ComputeNode.d.ts +5 -0
- three/src/nodes/lighting/LightsNode.d.ts +7 -2
- three/src/nodes/lighting/PointLightNode.d.ts +11 -1
- three/src/nodes/lighting/ShadowNode.d.ts +12 -0
- three/src/nodes/utils/Discard.d.ts +1 -1
- three/src/nodes/utils/Oscillators.d.ts +7 -0
- three/src/nodes/utils/PostProcessingUtils.d.ts +45 -0
- three/src/nodes/utils/ReflectorNode.d.ts +17 -4
- three/src/nodes/utils/Timer.d.ts +21 -0
- three/src/objects/BatchedMesh.d.ts +78 -0
- three/src/objects/Group.d.ts +0 -6
- three/src/objects/LOD.d.ts +7 -0
- three/src/renderers/WebGLRenderer.d.ts +24 -23
- three/src/renderers/common/BundleGroup.d.ts +10 -0
- three/src/renderers/common/ClippingContext.d.ts +1 -1
- three/src/renderers/common/Constants.d.ts +2 -1
- three/src/renderers/common/Geometries.d.ts +1 -0
- three/src/renderers/common/IndirectStorageBufferAttribute.d.ts +10 -0
- three/src/renderers/common/Lighting.d.ts +15 -0
- three/src/renderers/common/PostProcessingUtils.d.ts +66 -0
- three/src/renderers/common/RenderBundles.d.ts +3 -3
- three/src/renderers/common/RenderContext.d.ts +2 -2
- three/src/renderers/common/RenderList.d.ts +7 -3
- three/src/renderers/common/RenderLists.d.ts +3 -1
- three/src/renderers/common/RenderObject.d.ts +20 -1
- three/src/renderers/common/Renderer.d.ts +43 -10
- three/src/renderers/common/extras/PMREMGenerator.d.ts +5 -1
- three/src/renderers/common/nodes/NodeBuilderState.d.ts +3 -2
- three/src/renderers/common/nodes/NodeLibrary.d.ts +0 -7
- three/src/renderers/common/nodes/Nodes.d.ts +8 -0
- three/src/renderers/webgl/WebGLCapabilities.d.ts +13 -0
- three/src/renderers/webgl/WebGLPrograms.d.ts +4 -10
- three/src/renderers/webgl/WebGLState.d.ts +13 -10
- three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
- three/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +12 -0
- three/src/renderers/webgpu/WebGPURenderer.d.ts +7 -3
- three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +5 -0
- three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +5 -0
- three/src/textures/CompressedTexture.d.ts +1 -2
- three/src/textures/CubeTexture.d.ts +1 -2
- three/src/textures/DataTexture.d.ts +1 -2
- three/src/textures/Texture.d.ts +3 -4
- three/examples/jsm/cameras/CinematicCamera.d.ts +0 -34
- three/examples/jsm/geometries/SDFGeometryGenerator.d.ts +0 -16
- three/examples/jsm/loaders/TiltLoader.d.ts +0 -7
- three/examples/jsm/utils/GPUStatsPanel.d.ts +0 -12
- three/examples/jsm/utils/PackedPhongMaterial.d.ts +0 -10
- three/src/nodes/display/BleachBypass.d.ts +0 -4
- three/src/nodes/display/Sepia.d.ts +0 -4
- three/src/nodes/display/ViewportNode.d.ts +0 -38
- three/src/nodes/utils/OscNode.d.ts +0 -25
- three/src/nodes/utils/TimerNode.d.ts +0 -25
- three/src/renderers/common/StandardRenderer.d.ts +0 -12
- /three/examples/jsm/utils/{TextureUtils.d.ts → WebGLTextureUtils.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:
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../src/Three.WebGPU.Nodes.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../src/Three.WebGPU.Nodes.js";
|
three/examples/jsm/Addons.d.ts
CHANGED
|
@@ -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";
|
|
@@ -121,7 +119,6 @@ export * from "./loaders/SVGLoader.js";
|
|
|
121
119
|
export * from "./loaders/TDSLoader.js";
|
|
122
120
|
export * from "./loaders/TGALoader.js";
|
|
123
121
|
export * from "./loaders/TIFFLoader.js";
|
|
124
|
-
export * from "./loaders/TiltLoader.js";
|
|
125
122
|
export * from "./loaders/TTFLoader.js";
|
|
126
123
|
export * from "./loaders/UltraHDRLoader.js";
|
|
127
124
|
export * from "./loaders/USDZLoader.js";
|
|
@@ -130,7 +127,9 @@ export * from "./loaders/VRMLLoader.js";
|
|
|
130
127
|
export * from "./loaders/VTKLoader.js";
|
|
131
128
|
export * from "./loaders/XYZLoader.js";
|
|
132
129
|
|
|
130
|
+
export * from "./materials/LDrawConditionalLineMaterial.js";
|
|
133
131
|
export * from "./materials/MeshGouraudMaterial.js";
|
|
132
|
+
export * from "./materials/MeshPostProcessingMaterial.js";
|
|
134
133
|
|
|
135
134
|
export * from "./math/Capsule.js";
|
|
136
135
|
export * from "./math/ColorConverter.js";
|
|
@@ -169,13 +168,9 @@ export * from "./objects/ReflectorForSSRPass.js";
|
|
|
169
168
|
export * from "./objects/Refractor.js";
|
|
170
169
|
export * from "./objects/ShadowMesh.js";
|
|
171
170
|
export * from "./objects/Sky.js";
|
|
172
|
-
export * from "./objects/SkyMesh.js";
|
|
173
171
|
export * from "./objects/Water.js";
|
|
174
172
|
export { Water as Water2 } from "./objects/Water2.js";
|
|
175
173
|
export type { WaterOptions as Water2Options } from "./objects/Water2.js";
|
|
176
|
-
export { WaterMesh as Water2Mesh } from "./objects/Water2Mesh.js";
|
|
177
|
-
export type { WaterMeshOptions as Water2MeshOptions } from "./objects/Water2Mesh.js";
|
|
178
|
-
export * from "./objects/WaterMesh.js";
|
|
179
174
|
|
|
180
175
|
export * from "./physics/AmmoPhysics.js";
|
|
181
176
|
export * from "./physics/RapierPhysics.js";
|
|
@@ -274,15 +269,13 @@ export * as BufferGeometryUtils from "./utils/BufferGeometryUtils.js";
|
|
|
274
269
|
export * as CameraUtils from "./utils/CameraUtils.js";
|
|
275
270
|
export * as GeometryCompressionUtils from "./utils/GeometryCompressionUtils.js";
|
|
276
271
|
export * as GeometryUtils from "./utils/GeometryUtils.js";
|
|
277
|
-
export * from "./utils/GPUStatsPanel.js";
|
|
278
272
|
export * from "./utils/LDrawUtils.js";
|
|
279
|
-
export * from "./utils/PackedPhongMaterial.js";
|
|
280
273
|
export * as SceneUtils from "./utils/SceneUtils.js";
|
|
281
274
|
export * from "./utils/ShadowMapViewer.js";
|
|
282
275
|
export * as SkeletonUtils from "./utils/SkeletonUtils.js";
|
|
283
276
|
export * as SortUtils from "./utils/SortUtils.js";
|
|
284
|
-
export * from "./utils/TextureUtils.js";
|
|
285
277
|
export * from "./utils/UVsDebug.js";
|
|
278
|
+
export * from "./utils/WebGLTextureUtils.js";
|
|
286
279
|
export * from "./utils/WorkerPool.js";
|
|
287
280
|
|
|
288
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
|
|
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;
|
|
@@ -77,21 +77,6 @@ declare class DragControls extends Controls<DragControlsEventMap> {
|
|
|
77
77
|
*/
|
|
78
78
|
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | null);
|
|
79
79
|
|
|
80
|
-
/**
|
|
81
|
-
* Adds the event listeners of the controls.
|
|
82
|
-
*/
|
|
83
|
-
connect(): void;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Removes the event listeners of the controls.
|
|
87
|
-
*/
|
|
88
|
-
disconnect(): void;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Should be called if the controls is no longer required.
|
|
92
|
-
*/
|
|
93
|
-
dispose(): void;
|
|
94
|
-
|
|
95
80
|
/**
|
|
96
81
|
* Returns the internal {@link Raycaster} instance that is used for intersection tests.
|
|
97
82
|
* @deprecated getRaycaster() has been deprecated. Use controls.raycaster instead.
|
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
import { Camera,
|
|
1
|
+
import { Camera, Controls, Mesh, Object3D, Quaternion, Raycaster, Vector3 } from "three";
|
|
2
2
|
|
|
3
3
|
type TransformControlsMode = "translate" | "rotate" | "scale";
|
|
4
4
|
|
|
5
|
-
export interface TransformControlsEventMap
|
|
5
|
+
export interface TransformControlsEventMap {
|
|
6
|
+
/**
|
|
7
|
+
* Fires if any type of change (object or property change) is performed. Property changes are separate events you
|
|
8
|
+
* can add event listeners to. The event type is "propertyname-changed".
|
|
9
|
+
*/
|
|
6
10
|
change: {};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Fires if a pointer (mouse/touch) becomes active.
|
|
14
|
+
*/
|
|
7
15
|
mouseDown: { mode: TransformControlsMode };
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Fires if a pointer (mouse/touch) is no longer active.
|
|
19
|
+
*/
|
|
8
20
|
mouseUp: { mode: TransformControlsMode };
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Fires if the controlled 3D object is changed.
|
|
24
|
+
*/
|
|
9
25
|
objectChange: {};
|
|
26
|
+
|
|
10
27
|
"camera-changed": { value: unknown };
|
|
11
28
|
"object-changed": { value: unknown };
|
|
12
29
|
"enabled-changed": { value: unknown };
|
|
@@ -21,6 +38,12 @@ export interface TransformControlsEventMap extends Object3DEventMap {
|
|
|
21
38
|
"showX-changed": { value: unknown };
|
|
22
39
|
"showY-changed": { value: unknown };
|
|
23
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 };
|
|
24
47
|
"worldPosition-changed": { value: unknown };
|
|
25
48
|
"worldPositionStart-changed": { value: unknown };
|
|
26
49
|
"worldQuaternion-changed": { value: unknown };
|
|
@@ -34,55 +57,202 @@ export interface TransformControlsEventMap extends Object3DEventMap {
|
|
|
34
57
|
"eye-changed": { value: unknown };
|
|
35
58
|
}
|
|
36
59
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
60
|
+
/**
|
|
61
|
+
* This class can be used to transform objects in 3D space by adapting a similar interaction model of DCC tools like
|
|
62
|
+
* Blender. Unlike other controls, it is not intended to transform the scene's camera.
|
|
63
|
+
*
|
|
64
|
+
* TransformControls expects that its attached 3D object is part of the scene graph.
|
|
65
|
+
*/
|
|
66
|
+
declare class TransformControls extends Controls<TransformControlsEventMap> {
|
|
67
|
+
/**
|
|
68
|
+
* The camera of the rendered scene.
|
|
69
|
+
*/
|
|
44
70
|
camera: Camera;
|
|
45
|
-
|
|
46
|
-
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The current transformation axis.
|
|
74
|
+
*/
|
|
47
75
|
axis: "X" | "Y" | "Z" | "E" | "XY" | "YZ" | "XZ" | "XYZ" | "XYZE" | null;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The current transformation mode. Possible values are "translate", "rotate" and "scale". Default is `translate`.
|
|
79
|
+
*/
|
|
48
80
|
mode: TransformControlsMode;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* By default, 3D objects are continuously translated. If you set this property to a numeric value (world units),
|
|
84
|
+
* you can define in which steps the 3D object should be translated. Default is `null`.
|
|
85
|
+
*/
|
|
49
86
|
translationSnap: number | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* By default, 3D objects are continuously rotated. If you set this property to a numeric value (radians), you can
|
|
90
|
+
* define in which steps the 3D object should be rotated. Default is `null`.
|
|
91
|
+
*/
|
|
50
92
|
rotationSnap: number | null;
|
|
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
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Defines in which coordinate space transformations should be performed. Possible values are "world" and "local".
|
|
102
|
+
* Default is `world`.
|
|
103
|
+
*/
|
|
51
104
|
space: "world" | "local";
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The size of the helper UI (axes/planes). Default is *1*.
|
|
108
|
+
*/
|
|
52
109
|
size: number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Whether or not dragging is currently performed. Read-only property.
|
|
113
|
+
*/
|
|
53
114
|
dragging: boolean;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Whether or not the x-axis helper should be visible. Default is `true`.
|
|
118
|
+
*/
|
|
54
119
|
showX: boolean;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Whether or not the y-axis helper should be visible. Default is `true`.
|
|
123
|
+
*/
|
|
55
124
|
showY: boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Whether or not the z-axis helper should be visible. Default is `true`.
|
|
128
|
+
*/
|
|
56
129
|
showZ: boolean;
|
|
57
130
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Creates a new instance of TransformControls.
|
|
163
|
+
* @param camera The camera of the rendered scene.
|
|
164
|
+
* @param domElement The HTML element used for event listeners. (optional)
|
|
165
|
+
*/
|
|
166
|
+
constructor(camera: Camera, domElement?: HTMLElement);
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Returns the visual representation of the controls. Add the helper to your scene to visually transform the
|
|
170
|
+
* attached 3D object.
|
|
171
|
+
*/
|
|
172
|
+
getHelper(): TransformControlsRoot;
|
|
64
173
|
|
|
65
174
|
pointerHover(pointer: PointerEvent | null): void;
|
|
66
175
|
pointerDown(pointer: PointerEvent | null): void;
|
|
67
176
|
pointerMove(pointer: PointerEvent | null): void;
|
|
68
177
|
pointerUp(pointer: PointerEvent | null): void;
|
|
69
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Sets the 3D object that should be transformed and ensures the controls UI is visible.
|
|
181
|
+
* @param object The 3D object that should be transformed.
|
|
182
|
+
*/
|
|
70
183
|
attach(object: Object3D): this;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Removes the current 3D object from the controls and makes the helper UI invisible.
|
|
187
|
+
*/
|
|
71
188
|
detach(): this;
|
|
72
|
-
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Resets the object's position, rotation and scale to when the current transform began.
|
|
192
|
+
*/
|
|
193
|
+
reset(): void;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Returns the {@link Raycaster} object that is used for user interaction. This object is shared between all
|
|
197
|
+
* instances of TransformControls. If you set the [.layers]{@link Object3D.layers} property of the
|
|
198
|
+
* TransformControls, you will also want to set the [.layers]{@link Raycaster.layers} property on the
|
|
199
|
+
* {@link Raycaster} with a matching value, or else the TransformControls won't work as expected.
|
|
200
|
+
*/
|
|
73
201
|
getRaycaster(): Raycaster;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Returns the transformation mode.
|
|
205
|
+
*/
|
|
206
|
+
getMode(): TransformControlsMode;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Sets the transformation mode.
|
|
210
|
+
* @param mode The transformation mode.
|
|
211
|
+
*/
|
|
74
212
|
setMode(mode: TransformControlsMode): void;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Sets the translation snap.
|
|
216
|
+
* @param translationSnap The translation snap.
|
|
217
|
+
*/
|
|
75
218
|
setTranslationSnap(translationSnap: number | null): void;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Sets the rotation snap.
|
|
222
|
+
* @param rotationSnap The rotation snap.
|
|
223
|
+
*/
|
|
76
224
|
setRotationSnap(rotationSnap: number | null): void;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Sets the scale snap.
|
|
228
|
+
* @param scaleSnap The scale snap.
|
|
229
|
+
*/
|
|
77
230
|
setScaleSnap(scaleSnap: number | null): void;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Sets the size of the helper UI.
|
|
234
|
+
* @param size The size of the helper UI.
|
|
235
|
+
*/
|
|
78
236
|
setSize(size: number): void;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Sets the coordinate space in which transformations are applied.
|
|
240
|
+
* @param space The coordinate space in which transformations are applied.
|
|
241
|
+
*/
|
|
79
242
|
setSpace(space: "world" | "local"): void;
|
|
80
|
-
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare class TransformControlsRoot extends Object3D {
|
|
246
|
+
readonly isTransformControlsRoot: true;
|
|
247
|
+
|
|
248
|
+
controls: TransformControls;
|
|
249
|
+
|
|
250
|
+
constructor(controls: TransformControls);
|
|
251
|
+
|
|
81
252
|
dispose(): void;
|
|
82
253
|
}
|
|
83
254
|
|
|
84
|
-
|
|
85
|
-
type: "TransformControlsGizmo";
|
|
255
|
+
declare class TransformControlsGizmo extends Object3D {
|
|
86
256
|
isTransformControlsGizmo: true;
|
|
87
257
|
|
|
88
258
|
gizmo: {
|
|
@@ -104,9 +274,8 @@ export class TransformControlsGizmo extends Object3D {
|
|
|
104
274
|
constructor();
|
|
105
275
|
}
|
|
106
276
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
isTransformControlsPlane: true;
|
|
277
|
+
declare class TransformControlsPlane extends Mesh {
|
|
278
|
+
readonly isTransformControlsPlane: true;
|
|
110
279
|
|
|
111
280
|
constructor();
|
|
112
281
|
|
|
@@ -120,3 +289,5 @@ export class TransformControlsPlane extends Mesh {
|
|
|
120
289
|
worldPosition: Vector3;
|
|
121
290
|
worldQuaternion: Quaternion;
|
|
122
291
|
}
|
|
292
|
+
|
|
293
|
+
export { TransformControls, TransformControlsGizmo, TransformControlsPlane };
|
|
@@ -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
|
-
|
|
14
|
-
|
|
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
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { DataTexture, TextureDataType, WebGLRenderer, WebGLRenderTarget } from "three";
|
|
9
|
+
import { WebGPURenderer } from "three/webgpu";
|
|
9
10
|
|
|
10
11
|
export const NO_COMPRESSION: 0;
|
|
11
12
|
export const ZIPS_COMPRESSION: 2;
|
|
@@ -17,6 +18,10 @@ export interface EXRExporterParseOptions {
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export class EXRExporter {
|
|
20
|
-
parse(
|
|
21
|
-
|
|
21
|
+
parse(
|
|
22
|
+
renderer: WebGLRenderer | WebGPURenderer,
|
|
23
|
+
renderTarget: WebGLRenderTarget,
|
|
24
|
+
options?: EXRExporterParseOptions,
|
|
25
|
+
): Promise<Uint8Array>;
|
|
26
|
+
parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Promise<Uint8Array>;
|
|
22
27
|
}
|
|
@@ -47,12 +47,22 @@ export interface GLTFExporterOptions {
|
|
|
47
47
|
includeCustomExtensions?: boolean;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,7 @@
|
|
|
1
1
|
import { Data3DTexture, DataTexture, WebGLRenderer, WebGLRenderTarget } from "three";
|
|
2
|
+
import { WebGPURenderer } from "three/webgpu";
|
|
2
3
|
|
|
3
4
|
export class KTX2Exporter {
|
|
4
|
-
parse(
|
|
5
|
+
parse(renderer: WebGLRenderer | WebGPURenderer, rtt?: WebGLRenderTarget): Promise<Uint8Array>;
|
|
6
|
+
parse(texture: Data3DTexture | DataTexture): Promise<Uint8Array>;
|
|
5
7
|
}
|
|
@@ -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
|
-
|
|
3
|
+
declare class DecalGeometry extends BufferGeometry {
|
|
4
4
|
constructor(mesh: Mesh, position: Vector3, orientation: Euler, size: Vector3);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
*
|
|
4
|
+
* TeapotGeometry tessellates the famous Utah teapot database by Martin Newell.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
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
|