@types/three 0.157.2 → 0.158.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/examples/jsm/Addons.d.ts +290 -0
- three/examples/jsm/controls/OrbitControls.d.ts +18 -0
- three/examples/jsm/libs/lil-gui.module.min.d.ts +5 -5
- three/examples/jsm/loaders/KTX2Loader.d.ts +2 -1
- three/examples/jsm/loaders/LogLuvLoader.d.ts +1 -1
- three/examples/jsm/loaders/PCDLoader.d.ts +3 -3
- three/examples/jsm/math/Capsule.d.ts +0 -1
- three/examples/jsm/misc/MD2CharacterComplex.d.ts +9 -1
- three/examples/jsm/objects/ReflectorForSSRPass.d.ts +1 -0
- three/examples/jsm/objects/Refractor.d.ts +2 -1
- three/examples/jsm/physics/AmmoPhysics.d.ts +2 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +2 -1
- three/examples/jsm/renderers/SVGRenderer.d.ts +2 -1
- three/examples/jsm/renderers/common/Backend.d.ts +15 -0
- three/examples/jsm/renderers/common/Info.d.ts +15 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +42 -0
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +9 -0
- three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +1 -0
- three/examples/jsm/shaders/AfterimageShader.d.ts +1 -0
- three/examples/jsm/shaders/BasicShader.d.ts +1 -0
- three/examples/jsm/shaders/BlendShader.d.ts +1 -0
- three/examples/jsm/shaders/BokehShader.d.ts +1 -0
- three/examples/jsm/shaders/BokehShader2.d.ts +2 -0
- three/examples/jsm/shaders/BrightnessContrastShader.d.ts +1 -0
- three/examples/jsm/shaders/ColorCorrectionShader.d.ts +1 -0
- three/examples/jsm/shaders/DOFMipMapShader.d.ts +1 -0
- three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +1 -0
- three/examples/jsm/shaders/FXAAShader.d.ts +1 -0
- three/examples/jsm/shaders/FocusShader.d.ts +1 -0
- three/examples/jsm/shaders/FreiChenShader.d.ts +1 -0
- three/examples/jsm/shaders/GodRaysShader.d.ts +4 -0
- three/examples/jsm/shaders/HalftoneShader.d.ts +1 -0
- three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +1 -0
- three/examples/jsm/shaders/HueSaturationShader.d.ts +1 -0
- three/examples/jsm/shaders/KaleidoShader.d.ts +1 -0
- three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +1 -0
- three/examples/jsm/shaders/LuminosityShader.d.ts +1 -0
- three/examples/jsm/shaders/MirrorShader.d.ts +1 -0
- three/examples/jsm/shaders/NormalMapShader.d.ts +1 -0
- three/examples/jsm/shaders/OutputShader.d.ts +1 -0
- three/examples/jsm/shaders/SAOShader.d.ts +1 -0
- three/examples/jsm/shaders/SMAAShader.d.ts +3 -0
- three/examples/jsm/shaders/SSAOShader.d.ts +3 -0
- three/examples/jsm/shaders/SSRShader.d.ts +3 -0
- three/examples/jsm/shaders/SobelOperatorShader.d.ts +1 -0
- three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +1 -0
- three/examples/jsm/shaders/TechnicolorShader.d.ts +1 -0
- three/examples/jsm/shaders/TriangleBlurShader.d.ts +1 -0
- three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +1 -0
- three/examples/jsm/shaders/VelocityShader.d.ts +1 -0
- three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +1 -0
- three/examples/jsm/shaders/WaterRefractionShader.d.ts +1 -0
- three/examples/jsm/utils/GPUStatsPanel.d.ts +12 -0
- three/examples/jsm/webxr/XRButton.d.ts +1 -1
- three/examples/jsm/webxr/XREstimatedLight.d.ts +32 -0
- three/package.json +3 -2
- three/src/cameras/CubeCamera.d.ts +1 -2
- three/src/constants.d.ts +21 -10
- three/src/core/Object3D.d.ts +4 -4
- three/src/core/Raycaster.d.ts +1 -0
- three/src/extras/core/Curve.d.ts +1 -1
- three/src/geometries/CapsuleGeometry.d.ts +1 -1
- three/src/helpers/AxesHelper.d.ts +2 -2
- three/src/helpers/Box3Helper.d.ts +2 -2
- three/src/lights/Light.d.ts +1 -2
- three/src/materials/Material.d.ts +20 -2
- three/src/materials/MeshPhysicalMaterial.d.ts +8 -6
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/math/Matrix4.d.ts +2 -1
- three/src/objects/SkinnedMesh.d.ts +9 -8
- three/src/renderers/WebGLRenderer.d.ts +12 -2
- three/src/scenes/Scene.d.ts +2 -2
- three/src/textures/DepthTexture.d.ts +3 -3
- three/src/textures/Texture.d.ts +2 -2
- three/examples/jsm/controls/FirstPersonControls.d.ts +0 -31
- three/examples/jsm/geometries/TextGeometry.d.ts +0 -115
- three/examples/jsm/loaders/FontLoader.d.ts +0 -27
- three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +0 -18
- three/examples/jsm/loaders/RGBMLoader.d.ts +0 -32
- three/examples/jsm/modifiers/TessellateModifier.d.ts +0 -9
- three/examples/jsm/objects/GroundProjectedSkybox.d.ts +0 -13
- three/examples/jsm/objects/MarchingCubes.d.ts +0 -76
- three/examples/jsm/shaders/ToonShader.d.ts +0 -54
- three/examples/jsm/textures/FlakesTexture.d.ts +0 -3
- three/examples/jsm/utils/CameraUtils.d.ts +0 -9
- three/examples/jsm/utils/ShadowMapViewer.d.ts +0 -24
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IUniform } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
export const GodRaysDepthMaskShader: {
|
|
4
|
+
name: string;
|
|
4
5
|
uniforms: {
|
|
5
6
|
tInput: IUniform;
|
|
6
7
|
};
|
|
@@ -9,6 +10,7 @@ export const GodRaysDepthMaskShader: {
|
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export const GodRaysGenerateShader: {
|
|
13
|
+
name: string;
|
|
12
14
|
uniforms: {
|
|
13
15
|
tInput: IUniform;
|
|
14
16
|
fStepSize: IUniform;
|
|
@@ -19,6 +21,7 @@ export const GodRaysGenerateShader: {
|
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export const GodRaysCombineShader: {
|
|
24
|
+
name: string;
|
|
22
25
|
uniforms: {
|
|
23
26
|
tColors: IUniform;
|
|
24
27
|
tGodRays: IUniform;
|
|
@@ -29,6 +32,7 @@ export const GodRaysCombineShader: {
|
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
export const GodRaysFakeSunShader: {
|
|
35
|
+
name: string;
|
|
32
36
|
uniforms: {
|
|
33
37
|
vSunPositionScreenSpace: IUniform;
|
|
34
38
|
fAspect: IUniform;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IUniform } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
export const SMAAEdgesShader: {
|
|
4
|
+
name: string;
|
|
4
5
|
defines: {
|
|
5
6
|
SMAA_THRESHOLD: string;
|
|
6
7
|
};
|
|
@@ -13,6 +14,7 @@ export const SMAAEdgesShader: {
|
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
export const SMAAWeightsShader: {
|
|
17
|
+
name: string;
|
|
16
18
|
defines: {
|
|
17
19
|
SMAA_MAX_SEARCH_STEPS: string;
|
|
18
20
|
SMAA_AREATEX_MAX_DISTANCE: string;
|
|
@@ -30,6 +32,7 @@ export const SMAAWeightsShader: {
|
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
export const SMAABlendShader: {
|
|
35
|
+
name: string;
|
|
33
36
|
uniforms: {
|
|
34
37
|
tDiffuse: IUniform;
|
|
35
38
|
tColor: IUniform;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IUniform } from '../../../src/Three.js';
|
|
2
2
|
|
|
3
3
|
export const SSAOShader: {
|
|
4
|
+
name: string;
|
|
4
5
|
defines: {
|
|
5
6
|
PERSPECTIVE_CAMERA: number;
|
|
6
7
|
KERNEL_SIZE: number;
|
|
@@ -24,6 +25,7 @@ export const SSAOShader: {
|
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export const SSAODepthShader: {
|
|
28
|
+
name: string;
|
|
27
29
|
defines: {
|
|
28
30
|
PERSPECTIVE_CAMERA: number;
|
|
29
31
|
};
|
|
@@ -37,6 +39,7 @@ export const SSAODepthShader: {
|
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
export const SSAOBlurShader: {
|
|
42
|
+
name: string;
|
|
40
43
|
uniforms: {
|
|
41
44
|
tDiffuse: IUniform;
|
|
42
45
|
resolution: IUniform;
|
|
@@ -6,6 +6,7 @@ import { Matrix4, Vector2, Texture, IUniform } from '../../../src/Three.js';
|
|
|
6
6
|
|
|
7
7
|
export const SSRShader: SSRShader;
|
|
8
8
|
export interface SSRShader {
|
|
9
|
+
name: string;
|
|
9
10
|
defines: {
|
|
10
11
|
MAX_STEP: number;
|
|
11
12
|
isPerspectiveCamera: boolean;
|
|
@@ -35,6 +36,7 @@ export interface SSRShader {
|
|
|
35
36
|
|
|
36
37
|
export const SSRDepthShader: SSRDepthShader;
|
|
37
38
|
export interface SSRDepthShader {
|
|
39
|
+
name: string;
|
|
38
40
|
defines: {
|
|
39
41
|
PERSPECTIVE_CAMERA: number;
|
|
40
42
|
};
|
|
@@ -49,6 +51,7 @@ export interface SSRDepthShader {
|
|
|
49
51
|
|
|
50
52
|
export const SSRBlurShader: SSRBlurShader;
|
|
51
53
|
export interface SSRBlurShader {
|
|
54
|
+
name: string;
|
|
52
55
|
uniforms: {
|
|
53
56
|
tDiffuse: IUniform<Texture | null>;
|
|
54
57
|
resolution: IUniform<Vector2>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Stats from '../libs/stats.module.js';
|
|
2
|
+
|
|
3
|
+
export class GPUStatsPanel extends Stats.Panel {
|
|
4
|
+
context: WebGLRenderingContext | WebGL2RenderingContext;
|
|
5
|
+
extension: unknown;
|
|
6
|
+
maxTime: number;
|
|
7
|
+
activeQueries: number;
|
|
8
|
+
startQuery: () => void;
|
|
9
|
+
endQuery: () => void;
|
|
10
|
+
|
|
11
|
+
constructor(context: WebGLRenderingContext | WebGL2RenderingContext, name?: string);
|
|
12
|
+
}
|
|
@@ -2,5 +2,5 @@ import { WebGLRenderer } from '../../../src/Three.js';
|
|
|
2
2
|
|
|
3
3
|
// tslint:disable-next-line:no-unnecessary-class
|
|
4
4
|
export class XRButton {
|
|
5
|
-
static createButton(renderer: WebGLRenderer): HTMLElement;
|
|
5
|
+
static createButton(renderer: WebGLRenderer, sessionInit?: XRSessionInit): HTMLElement;
|
|
6
6
|
}
|
|
@@ -24,14 +24,46 @@ export class SessionLightProbe {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface XREstimatedLightEventMap extends Object3DEventMap {
|
|
27
|
+
/**
|
|
28
|
+
* Fires when the estimated lighting values start being updated.
|
|
29
|
+
*/
|
|
27
30
|
estimationstart: {};
|
|
31
|
+
/**
|
|
32
|
+
* Fires when the estimated lighting values stop being updated.
|
|
33
|
+
*/
|
|
28
34
|
estimationend: {};
|
|
29
35
|
}
|
|
30
36
|
|
|
37
|
+
/**
|
|
38
|
+
* XREstimatedLight uses WebXR's light estimation to create a light probe, a directional light, and (optionally) an
|
|
39
|
+
* environment map that model the user's real-world environment and lighting.
|
|
40
|
+
* As WebXR updates the light and environment estimation, XREstimatedLight automatically updates the light probe,
|
|
41
|
+
* directional light, and environment map.
|
|
42
|
+
*
|
|
43
|
+
* It's important to specify `light-estimation` as an optional or required feature when creating the WebXR session,
|
|
44
|
+
* otherwise the light estimation can't work.
|
|
45
|
+
*
|
|
46
|
+
* See {@link https://developer.mozilla.org/en-US/docs/Web/API/XRLightProbe#browser_compatibility here} for browser
|
|
47
|
+
* compatibility information, as this is still an experimental feature in WebXR.
|
|
48
|
+
*
|
|
49
|
+
* To use this, as with all files in the /examples directory, you will have to include the file separately in your HTML.
|
|
50
|
+
*/
|
|
31
51
|
export class XREstimatedLight extends Group<XREstimatedLightEventMap> {
|
|
32
52
|
lightProbe: LightProbe;
|
|
53
|
+
|
|
33
54
|
directionalLight: DirectionalLight;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The environment map estimated by WebXR. This is only available if environmentEstimation is `true`.
|
|
58
|
+
*
|
|
59
|
+
* It can be used as the {@link Scene.environment}, for {@link MeshStandardMaterial.envMap}, or as the
|
|
60
|
+
* {@link Scene.background}.
|
|
61
|
+
*/
|
|
34
62
|
environment: Texture;
|
|
35
63
|
|
|
64
|
+
/**
|
|
65
|
+
* @param renderer The renderer used to render the Scene. Mainly used to interact with WebXRManager.
|
|
66
|
+
* @param environmentEstimation If `true`, use WebXR to estimate an environment map.
|
|
67
|
+
*/
|
|
36
68
|
constructor(renderer: WebGLRenderer, environmentEstimation?: boolean);
|
|
37
69
|
}
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.158.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"./examples/fonts/*": "./examples/fonts/*",
|
|
28
28
|
"./examples/jsm/*": "./examples/jsm/*",
|
|
29
|
+
"./addons": "./examples/jsm/Addons.js",
|
|
29
30
|
"./addons/*": "./examples/jsm/*",
|
|
30
31
|
"./src/*": "./src/*",
|
|
31
32
|
"./nodes": "./examples/jsm/nodes/Nodes.js",
|
|
@@ -43,6 +44,6 @@
|
|
|
43
44
|
"fflate": "~0.6.10",
|
|
44
45
|
"meshoptimizer": "~0.18.1"
|
|
45
46
|
},
|
|
46
|
-
"typesPublisherContentHash": "
|
|
47
|
+
"typesPublisherContentHash": "255a6a1803d2017678c3abe305771d2dc7b3a2db590cb731e2a0f99e04dfcc14",
|
|
47
48
|
"typeScriptVersion": "4.5"
|
|
48
49
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { WebGLCubeRenderTarget } from '../renderers/WebGLCubeRenderTarget.js';
|
|
2
|
-
import { Scene } from '../scenes/Scene.js';
|
|
3
2
|
import { WebGLRenderer } from '../renderers/WebGLRenderer.js';
|
|
4
3
|
import { Object3D } from '../core/Object3D.js';
|
|
5
4
|
import { CoordinateSystem } from '../constants.js';
|
|
@@ -65,5 +64,5 @@ export class CubeCamera extends Object3D {
|
|
|
65
64
|
* @param renderer The current WebGL renderer
|
|
66
65
|
* @param scene The current scene
|
|
67
66
|
*/
|
|
68
|
-
update(renderer: WebGLRenderer, scene:
|
|
67
|
+
update(renderer: WebGLRenderer, scene: Object3D): void;
|
|
69
68
|
}
|
three/src/constants.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export type BlendingEquation =
|
|
|
74
74
|
| typeof MinEquation
|
|
75
75
|
| typeof MaxEquation;
|
|
76
76
|
|
|
77
|
-
// custom blending
|
|
77
|
+
// custom blending factors
|
|
78
78
|
export const ZeroFactor: 200;
|
|
79
79
|
export const OneFactor: 201;
|
|
80
80
|
export const SrcColorFactor: 202;
|
|
@@ -85,6 +85,11 @@ export const DstAlphaFactor: 206;
|
|
|
85
85
|
export const OneMinusDstAlphaFactor: 207;
|
|
86
86
|
export const DstColorFactor: 208;
|
|
87
87
|
export const OneMinusDstColorFactor: 209;
|
|
88
|
+
export const SrcAlphaSaturateFactor: 210;
|
|
89
|
+
export const ConstantColorFactor: 211;
|
|
90
|
+
export const OneMinusConstantColorFactor: 212;
|
|
91
|
+
export const ConstantAlphaFactor: 213;
|
|
92
|
+
export const OneMinusConstantAlphaFactor: 214;
|
|
88
93
|
export type BlendingDstFactor =
|
|
89
94
|
| typeof ZeroFactor
|
|
90
95
|
| typeof OneFactor
|
|
@@ -95,11 +100,12 @@ export type BlendingDstFactor =
|
|
|
95
100
|
| typeof DstAlphaFactor
|
|
96
101
|
| typeof OneMinusDstAlphaFactor
|
|
97
102
|
| typeof DstColorFactor
|
|
98
|
-
| typeof OneMinusDstColorFactor
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
| typeof OneMinusDstColorFactor
|
|
104
|
+
| typeof ConstantColorFactor
|
|
105
|
+
| typeof OneMinusConstantColorFactor
|
|
106
|
+
| typeof ConstantAlphaFactor
|
|
107
|
+
| typeof OneMinusConstantAlphaFactor;
|
|
108
|
+
export type BlendingSrcFactor = BlendingDstFactor | typeof SrcAlphaSaturateFactor;
|
|
103
109
|
|
|
104
110
|
// depth modes
|
|
105
111
|
export const NeverDepth: 0;
|
|
@@ -142,6 +148,11 @@ export type ToneMapping =
|
|
|
142
148
|
| typeof ACESFilmicToneMapping
|
|
143
149
|
| typeof CustomToneMapping;
|
|
144
150
|
|
|
151
|
+
// Bind modes
|
|
152
|
+
export const AttachedBindMode: 'attached';
|
|
153
|
+
export const DetachedBindMode: 'detached';
|
|
154
|
+
export type BindMode = typeof AttachedBindMode | typeof DetachedBindMode;
|
|
155
|
+
|
|
145
156
|
///////////////////////////////////////////////////////////////////////////////
|
|
146
157
|
///////////////////////////////////////////////////////////////////////////////
|
|
147
158
|
///////////////////////////////////////////////////////////////////////////////
|
|
@@ -462,11 +473,11 @@ export type WebGL2PixelFormat =
|
|
|
462
473
|
export type PixelFormat = WebGL1PixelFormat | WebGL2PixelFormat;
|
|
463
474
|
|
|
464
475
|
/**
|
|
465
|
-
* All Texture Pixel Formats Modes for {@link THREE.
|
|
476
|
+
* All Texture Pixel Formats Modes for {@link THREE.DepthTexture}.
|
|
466
477
|
* @see {@link WebGLRenderingContext.texImage2D} for details.
|
|
467
478
|
* @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
|
|
468
479
|
*/
|
|
469
|
-
export type
|
|
480
|
+
export type DepthTexturePixelFormat = typeof DepthFormat | typeof DepthStencilFormat;
|
|
470
481
|
|
|
471
482
|
///////////////////////////////////////////////////////////////////////////////
|
|
472
483
|
// Compressed texture formats
|
|
@@ -649,10 +660,10 @@ export type CompressedPixelFormat =
|
|
|
649
660
|
* All Possible Texture Pixel Formats Modes. For any Type or SubType of Textures.
|
|
650
661
|
* @remarks Note that the texture must have the correct {@link THREE.Texture.type} set, as described in {@link TextureDataType}.
|
|
651
662
|
* @see {@link WebGLRenderingContext.texImage2D} for details.
|
|
652
|
-
* @see {@link PixelFormat} and {@link
|
|
663
|
+
* @see {@link PixelFormat} and {@link DepthTexturePixelFormat} and {@link CompressedPixelFormat}
|
|
653
664
|
* @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
|
|
654
665
|
*/
|
|
655
|
-
export type AnyPixelFormat = PixelFormat |
|
|
666
|
+
export type AnyPixelFormat = PixelFormat | DepthTexturePixelFormat | CompressedPixelFormat;
|
|
656
667
|
|
|
657
668
|
///////////////////////////////////////////////////////////////////////////////
|
|
658
669
|
// Loop styles for AnimationAction
|
three/src/core/Object3D.d.ts
CHANGED
|
@@ -235,14 +235,14 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
|
|
|
235
235
|
* are not renderable and thus this callback is not executed for such objects.
|
|
236
236
|
* @defaultValue `() => {}`
|
|
237
237
|
*/
|
|
238
|
-
onBeforeRender
|
|
238
|
+
onBeforeRender(
|
|
239
239
|
renderer: WebGLRenderer,
|
|
240
240
|
scene: Scene,
|
|
241
241
|
camera: Camera,
|
|
242
242
|
geometry: BufferGeometry,
|
|
243
243
|
material: Material,
|
|
244
244
|
group: Group,
|
|
245
|
-
)
|
|
245
|
+
): void;
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* An optional callback that is executed immediately after a 3D object is rendered.
|
|
@@ -254,14 +254,14 @@ export class Object3D<TEventMap extends Object3DEventMap = Object3DEventMap> ext
|
|
|
254
254
|
* are not renderable and thus this callback is not executed for such objects.
|
|
255
255
|
* @defaultValue `() => {}`
|
|
256
256
|
*/
|
|
257
|
-
onAfterRender
|
|
257
|
+
onAfterRender(
|
|
258
258
|
renderer: WebGLRenderer,
|
|
259
259
|
scene: Scene,
|
|
260
260
|
camera: Camera,
|
|
261
261
|
geometry: BufferGeometry,
|
|
262
262
|
material: Material,
|
|
263
263
|
group: Group,
|
|
264
|
-
)
|
|
264
|
+
): void;
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* The default {@link up} direction for objects, also used as the default position for {@link THREE.DirectionalLight | DirectionalLight},
|
three/src/core/Raycaster.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export interface Intersection<TIntersected extends Object3D = Object3D> {
|
|
|
31
31
|
normal?: Vector3;
|
|
32
32
|
/** The index number of the instance where the ray intersects the {@link THREE.InstancedMesh | InstancedMesh } */
|
|
33
33
|
instanceId?: number | undefined;
|
|
34
|
+
pointOnLine?: Vector3;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export interface RaycasterParameters {
|
three/src/extras/core/Curve.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ export abstract class Curve<T extends Vector> {
|
|
|
82
82
|
getLengths(divisions?: number): number[];
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* Update the
|
|
85
|
+
* Update the cumulative segment distance cache
|
|
86
86
|
* @remarks
|
|
87
87
|
* The method must be called every time {@link Curve} parameters are changed
|
|
88
88
|
* If an updated {@link Curve} is part of a composed {@link Curve} like {@link THREE.CurvePath | CurvePath},
|
|
@@ -20,7 +20,7 @@ export class CapsuleGeometry extends BufferGeometry {
|
|
|
20
20
|
* Create a new instance of {@link CapsuleGeometry}
|
|
21
21
|
* @param radius Radius of the capsule. Expects a `Float`. Default `1`
|
|
22
22
|
* @param length Length of the middle section. Expects a `Float`. Default `1`
|
|
23
|
-
* @param
|
|
23
|
+
* @param capSegments Number of curve segments used to build the caps. Expects a `Integer`. Default `4`
|
|
24
24
|
* @param radialSegments Number of segmented faces around the circumference of the capsule. Expects a `Integer`. Default `8`
|
|
25
25
|
*/
|
|
26
26
|
constructor(radius?: number, length?: number, capSegments?: number, radialSegments?: number);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorRepresentation } from '../math/Color.js';
|
|
2
2
|
import { LineSegments } from './../objects/LineSegments.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -39,7 +39,7 @@ export class AxesHelper extends LineSegments {
|
|
|
39
39
|
* @param yAxisColor
|
|
40
40
|
* @param zAxisColor
|
|
41
41
|
*/
|
|
42
|
-
setColors(xAxisColor:
|
|
42
|
+
setColors(xAxisColor: ColorRepresentation, yAxisColor: ColorRepresentation, zAxisColor: ColorRepresentation): this;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* Frees the GPU-related resources allocated by this instance
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Box3 } from './../math/Box3.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ColorRepresentation } from './../math/Color.js';
|
|
3
3
|
import { LineSegments } from './../objects/LineSegments.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -20,7 +20,7 @@ export class Box3Helper extends LineSegments {
|
|
|
20
20
|
* @param box The Box3 to show.
|
|
21
21
|
* @param color The box's color. Default `0xffff00`
|
|
22
22
|
*/
|
|
23
|
-
constructor(box: Box3, color?:
|
|
23
|
+
constructor(box: Box3, color?: ColorRepresentation);
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* A Read-only _string_ to check if `this` object type.
|
three/src/lights/Light.d.ts
CHANGED
|
@@ -38,8 +38,7 @@ export abstract class Light<TShadowSupport extends LightShadow | undefined = Lig
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* The light's intensity, or strength.
|
|
41
|
-
*
|
|
42
|
-
* @remarks Expects a `Float`
|
|
41
|
+
* The units of intensity depend on the type of light.
|
|
43
42
|
* @defaultValue `1`
|
|
44
43
|
*/
|
|
45
44
|
intensity: number;
|