@types/three 0.137.0 → 0.140.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/{WebGL.d.ts → capabilities/WebGL.d.ts} +3 -1
- three/examples/jsm/controls/OrbitControls.d.ts +1 -2
- three/examples/jsm/controls/TransformControls.d.ts +41 -1
- three/examples/jsm/curves/CurveExtras.d.ts +52 -54
- three/examples/jsm/exporters/EXRExporter.d.ts +21 -0
- three/examples/jsm/exporters/GLTFExporter.d.ts +102 -5
- three/examples/jsm/helpers/OctreeHelper.d.ts +14 -0
- three/examples/jsm/interactive/HTMLMesh.d.ts +1 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +8 -10
- three/examples/jsm/loaders/LUT3dlLoader.d.ts +2 -2
- three/examples/jsm/loaders/LUTCubeLoader.d.ts +2 -2
- three/examples/jsm/loaders/VOXLoader.d.ts +2 -2
- three/examples/jsm/objects/Reflector.d.ts +12 -1
- three/examples/jsm/objects/Refractor.d.ts +12 -1
- three/examples/jsm/postprocessing/LUTPass.d.ts +3 -3
- three/examples/jsm/postprocessing/SSAARenderPass.d.ts +1 -1
- three/examples/jsm/postprocessing/SavePass.d.ts +1 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +8 -0
- three/examples/jsm/utils/SceneUtils.d.ts +3 -1
- three/examples/jsm/utils/SkeletonUtils.d.ts +15 -11
- three/index.d.ts +6 -5
- three/package.json +3 -3
- three/src/Three.d.ts +7 -0
- three/src/animation/AnimationUtils.d.ts +1 -1
- three/src/constants.d.ts +6 -4
- three/src/core/BufferGeometry.d.ts +0 -2
- three/src/core/InstancedBufferGeometry.d.ts +0 -4
- three/src/core/Raycaster.d.ts +2 -2
- three/src/core/Uniform.d.ts +0 -1
- three/src/extras/DataUtils.d.ts +1 -0
- three/src/extras/Earcut.d.ts +4 -0
- three/src/geometries/CapsuleGeometry.d.ts +27 -0
- three/src/geometries/Geometries.d.ts +1 -0
- three/src/materials/Material.d.ts +0 -15
- three/src/materials/MeshBasicMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +7 -0
- three/src/materials/MeshMatcapMaterial.d.ts +7 -1
- three/src/materials/MeshPhongMaterial.d.ts +7 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -7
- three/src/materials/MeshToonMaterial.d.ts +7 -0
- three/src/materials/PointsMaterial.d.ts +7 -0
- three/src/materials/ShadowMaterial.d.ts +7 -0
- three/src/materials/SpriteMaterial.d.ts +7 -0
- three/src/math/Color.d.ts +22 -10
- three/src/math/ColorManagement.d.ts +18 -0
- three/src/math/Euler.d.ts +2 -1
- three/src/math/Plane.d.ts +0 -1
- three/src/math/Quaternion.d.ts +2 -0
- three/src/math/Vector3.d.ts +5 -0
- three/src/renderers/WebGL3DRenderTarget.d.ts +28 -0
- three/src/renderers/WebGLArrayRenderTarget.d.ts +28 -0
- three/src/renderers/WebGLMultipleRenderTargets.d.ts +9 -1
- three/src/renderers/WebGLMultisampleRenderTarget.d.ts +5 -12
- three/src/renderers/WebGLRenderTarget.d.ts +7 -2
- three/src/renderers/WebGLRenderer.d.ts +4 -5
- three/src/renderers/webgl/WebGLUtils.d.ts +2 -2
- three/src/scenes/Scene.d.ts +0 -15
- three/src/textures/CompressedTexture.d.ts +2 -1
- three/src/textures/Data3DTexture.d.ts +33 -0
- three/src/textures/DataArrayTexture.d.ts +33 -0
- three/src/textures/DataTexture.d.ts +2 -1
- three/src/textures/DataTexture2DArray.d.ts +5 -32
- three/src/textures/DataTexture3D.d.ts +5 -32
- three/src/textures/DepthTexture.d.ts +2 -1
- three/src/textures/Source.d.ts +39 -0
- three/src/textures/Texture.d.ts +30 -3
- three/examples/jsm/loaders/VRMLoader.d.ts +0 -19
- three/examples/jsm/nodes/Nodes.d.ts +0 -106
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +0 -29
- three/examples/jsm/nodes/accessors/ColorsNode.d.ts +0 -10
- three/examples/jsm/nodes/accessors/LightNode.d.ts +0 -12
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +0 -13
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +0 -15
- three/examples/jsm/nodes/accessors/ReflectNode.d.ts +0 -12
- three/examples/jsm/nodes/accessors/ResolutionNode.d.ts +0 -14
- three/examples/jsm/nodes/accessors/ScreenUVNode.d.ts +0 -11
- three/examples/jsm/nodes/accessors/UVNode.d.ts +0 -10
- three/examples/jsm/nodes/core/AttributeNode.d.ts +0 -13
- three/examples/jsm/nodes/core/ConstNode.d.ts +0 -22
- three/examples/jsm/nodes/core/ExpressionNode.d.ts +0 -5
- three/examples/jsm/nodes/core/FunctionCallNode.d.ts +0 -17
- three/examples/jsm/nodes/core/FunctionNode.d.ts +0 -28
- three/examples/jsm/nodes/core/InputNode.d.ts +0 -12
- three/examples/jsm/nodes/core/Node.d.ts +0 -34
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +0 -149
- three/examples/jsm/nodes/core/NodeFrame.d.ts +0 -17
- three/examples/jsm/nodes/core/NodeLib.d.ts +0 -22
- three/examples/jsm/nodes/core/NodeUniform.d.ts +0 -17
- three/examples/jsm/nodes/core/NodeUtils.d.ts +0 -7
- three/examples/jsm/nodes/core/StructNode.d.ts +0 -19
- three/examples/jsm/nodes/core/TempNode.d.ts +0 -23
- three/examples/jsm/nodes/core/VarNode.d.ts +0 -12
- three/examples/jsm/nodes/effects/BlurNode.d.ts +0 -31
- three/examples/jsm/nodes/effects/ColorAdjustmentNode.d.ts +0 -27
- three/examples/jsm/nodes/effects/LuminanceNode.d.ts +0 -18
- three/examples/jsm/nodes/inputs/BoolNode.d.ts +0 -19
- three/examples/jsm/nodes/inputs/ColorNode.d.ts +0 -21
- three/examples/jsm/nodes/inputs/CubeTextureNode.d.ts +0 -17
- three/examples/jsm/nodes/inputs/FloatNode.d.ts +0 -19
- three/examples/jsm/nodes/inputs/IntNode.d.ts +0 -19
- three/examples/jsm/nodes/inputs/Matrix3Node.d.ts +0 -22
- three/examples/jsm/nodes/inputs/Matrix4Node.d.ts +0 -22
- three/examples/jsm/nodes/inputs/PropertyNode.d.ts +0 -10
- three/examples/jsm/nodes/inputs/RTTNode.d.ts +0 -27
- three/examples/jsm/nodes/inputs/ReflectorNode.d.ts +0 -21
- three/examples/jsm/nodes/inputs/ScreenNode.d.ts +0 -11
- three/examples/jsm/nodes/inputs/TextureNode.d.ts +0 -20
- three/examples/jsm/nodes/inputs/Vector2Node.d.ts +0 -21
- three/examples/jsm/nodes/inputs/Vector3Node.d.ts +0 -21
- three/examples/jsm/nodes/inputs/Vector4Node.d.ts +0 -21
- three/examples/jsm/nodes/materials/BasicNodeMaterial.d.ts +0 -11
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +0 -21
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +0 -28
- three/examples/jsm/nodes/materials/PhongNodeMaterial.d.ts +0 -21
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +0 -12
- three/examples/jsm/nodes/materials/StandardNodeMaterial.d.ts +0 -25
- three/examples/jsm/nodes/materials/nodes/BasicNode.d.ts +0 -15
- three/examples/jsm/nodes/materials/nodes/MeshStandardNode.d.ts +0 -25
- three/examples/jsm/nodes/materials/nodes/PhongNode.d.ts +0 -14
- three/examples/jsm/nodes/materials/nodes/RawNode.d.ts +0 -10
- three/examples/jsm/nodes/materials/nodes/SpriteNode.d.ts +0 -13
- three/examples/jsm/nodes/materials/nodes/StandardNode.d.ts +0 -15
- three/examples/jsm/nodes/math/CondNode.d.ts +0 -26
- three/examples/jsm/nodes/math/MathNode.d.ts +0 -57
- three/examples/jsm/nodes/math/OperatorNode.d.ts +0 -17
- three/examples/jsm/nodes/misc/BumpMapNode.d.ts +0 -21
- three/examples/jsm/nodes/misc/NormalMapNode.d.ts +0 -19
- three/examples/jsm/nodes/misc/TextureCubeNode.d.ts +0 -21
- three/examples/jsm/nodes/misc/TextureCubeUVNode.d.ts +0 -18
- three/examples/jsm/nodes/postprocessing/NodePass.d.ts +0 -15
- three/examples/jsm/nodes/postprocessing/NodePostProcessing.d.ts +0 -26
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +0 -17
- three/examples/jsm/nodes/procedural/NoiseNode.d.ts +0 -17
- three/examples/jsm/nodes/utils/BypassNode.d.ts +0 -11
- three/examples/jsm/nodes/utils/ColorSpaceNode.d.ts +0 -55
- three/examples/jsm/nodes/utils/JoinNode.d.ts +0 -15
- three/examples/jsm/nodes/utils/MaxMIPLevelNode.d.ts +0 -11
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +0 -17
- three/examples/jsm/nodes/utils/SubSlot.d.ts +0 -9
- three/examples/jsm/nodes/utils/SwitchNode.d.ts +0 -11
- three/examples/jsm/nodes/utils/TimerNode.d.ts +0 -19
- three/examples/jsm/nodes/utils/UVTransformNode.d.ts +0 -15
- three/examples/jsm/nodes/utils/VelocityNode.d.ts +0 -28
- three/examples/jsm/objects/ReflectorRTT.d.ts +0 -6
- three/examples/jsm/postprocessing/SSRrPass.d.ts +0 -121
three/src/Three.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export * from './extras/core/ShapePath';
|
|
|
65
65
|
export * from './extras/core/CurvePath';
|
|
66
66
|
export * from './extras/core/Curve';
|
|
67
67
|
export * from './extras/DataUtils';
|
|
68
|
+
export * from './extras/Earcut';
|
|
68
69
|
export * from './extras/ImageUtils';
|
|
69
70
|
export * from './extras/ShapeUtils';
|
|
70
71
|
export * from './extras/PMREMGenerator';
|
|
@@ -181,6 +182,8 @@ export * from './renderers/WebGLMultipleRenderTargets';
|
|
|
181
182
|
export * from './renderers/WebGLRenderTarget';
|
|
182
183
|
export * from './renderers/WebGLRenderer';
|
|
183
184
|
export * from './renderers/WebGL1Renderer';
|
|
185
|
+
export * from './renderers/WebGL3DRenderTarget';
|
|
186
|
+
export * from './renderers/WebGLArrayRenderTarget';
|
|
184
187
|
export * from './renderers/shaders/ShaderLib';
|
|
185
188
|
export * from './renderers/shaders/UniformsLib';
|
|
186
189
|
export * from './renderers/shaders/UniformsUtils';
|
|
@@ -207,6 +210,7 @@ export * from './renderers/webgl/WebGLUniforms';
|
|
|
207
210
|
export * from './renderers/webxr/WebXR';
|
|
208
211
|
export * from './renderers/webxr/WebXRController';
|
|
209
212
|
export * from './renderers/webxr/WebXRManager';
|
|
213
|
+
export { WebGLUtils } from './renderers/webgl/WebGLUtils.js';
|
|
210
214
|
/**
|
|
211
215
|
* Scenes
|
|
212
216
|
*/
|
|
@@ -222,7 +226,10 @@ export * from './textures/DataTexture2DArray';
|
|
|
222
226
|
export * from './textures/DataTexture3D';
|
|
223
227
|
export * from './textures/CompressedTexture';
|
|
224
228
|
export * from './textures/CubeTexture';
|
|
229
|
+
export * from './textures/Data3DTexture';
|
|
230
|
+
export * from './textures/DataArrayTexture';
|
|
225
231
|
export * from './textures/CanvasTexture';
|
|
226
232
|
export * from './textures/DepthTexture';
|
|
227
233
|
export * from './textures/FramebufferTexture';
|
|
234
|
+
export * from './textures/Source';
|
|
228
235
|
export * from './textures/Texture';
|
|
@@ -4,7 +4,7 @@ export namespace AnimationUtils {
|
|
|
4
4
|
function arraySlice(array: any, from: number, to: number): any;
|
|
5
5
|
function convertArray(array: any, type: any, forceClone: boolean): any;
|
|
6
6
|
function isTypedArray(object: any): boolean;
|
|
7
|
-
function
|
|
7
|
+
function getKeyframeOrder(times: number[]): number[];
|
|
8
8
|
function sortedArray(values: any[], stride: number, order: number[]): any[];
|
|
9
9
|
function flattenJSON(jsonKeys: string[], times: any[], values: any[], valuePropertyName: string): void;
|
|
10
10
|
|
three/src/constants.d.ts
CHANGED
|
@@ -115,7 +115,6 @@ export const CubeRefractionMapping: Mapping;
|
|
|
115
115
|
export const EquirectangularReflectionMapping: Mapping;
|
|
116
116
|
export const EquirectangularRefractionMapping: Mapping;
|
|
117
117
|
export const CubeUVReflectionMapping: Mapping;
|
|
118
|
-
export const CubeUVRefractionMapping: Mapping;
|
|
119
118
|
|
|
120
119
|
// Wrapping modes
|
|
121
120
|
export enum Wrapping {}
|
|
@@ -153,6 +152,7 @@ export const UnsignedInt248Type: TextureDataType;
|
|
|
153
152
|
// Pixel formats
|
|
154
153
|
export enum PixelFormat {}
|
|
155
154
|
export const AlphaFormat: PixelFormat;
|
|
155
|
+
export const RGBFormat: PixelFormat;
|
|
156
156
|
export const RGBAFormat: PixelFormat;
|
|
157
157
|
export const LuminanceFormat: PixelFormat;
|
|
158
158
|
export const LuminanceAlphaFormat: PixelFormat;
|
|
@@ -301,9 +301,6 @@ export const TriangleFanDrawMode: TrianglesDrawModes;
|
|
|
301
301
|
export enum TextureEncoding {}
|
|
302
302
|
export const LinearEncoding: TextureEncoding;
|
|
303
303
|
export const sRGBEncoding: TextureEncoding;
|
|
304
|
-
export const LogLuvEncoding: TextureEncoding;
|
|
305
|
-
export const RGBM7Encoding: TextureEncoding;
|
|
306
|
-
export const RGBM16Encoding: TextureEncoding;
|
|
307
304
|
|
|
308
305
|
// Depth packing strategies
|
|
309
306
|
export enum DepthPackingStrategies {}
|
|
@@ -315,6 +312,11 @@ export enum NormalMapTypes {}
|
|
|
315
312
|
export const TangentSpaceNormalMap: NormalMapTypes;
|
|
316
313
|
export const ObjectSpaceNormalMap: NormalMapTypes;
|
|
317
314
|
|
|
315
|
+
export type ColorSpace = NoColorSpace | SRGBColorSpace | LinearSRGBColorSpace;
|
|
316
|
+
export type NoColorSpace = '';
|
|
317
|
+
export type SRGBColorSpace = 'srgb';
|
|
318
|
+
export type LinearSRGBColorSpace = 'srgb-linear';
|
|
319
|
+
|
|
318
320
|
// Stencil Op types
|
|
319
321
|
export enum StencilOp {}
|
|
320
322
|
export const ZeroStencilOp: StencilOp;
|
|
@@ -13,12 +13,8 @@ export class InstancedBufferGeometry extends BufferGeometry {
|
|
|
13
13
|
|
|
14
14
|
isInstancedBufferGeometry: boolean;
|
|
15
15
|
|
|
16
|
-
groups: Array<{ start: number; count: number; instances: number }>;
|
|
17
|
-
|
|
18
16
|
/**
|
|
19
17
|
* @default Infinity
|
|
20
18
|
*/
|
|
21
19
|
instanceCount: number;
|
|
22
|
-
|
|
23
|
-
addGroup(start: number, count: number, instances: number): void;
|
|
24
20
|
}
|
three/src/core/Raycaster.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export class Raycaster {
|
|
|
95
95
|
/**
|
|
96
96
|
* Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first.
|
|
97
97
|
* @param object The object to check for intersection with the ray.
|
|
98
|
-
* @param recursive If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is
|
|
98
|
+
* @param recursive If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is true.
|
|
99
99
|
* @param optionalTarget (optional) target to set the result. Otherwise a new Array is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
|
|
100
100
|
*/
|
|
101
101
|
intersectObject<TIntersected extends Object3D>(
|
|
@@ -109,7 +109,7 @@ export class Raycaster {
|
|
|
109
109
|
* Intersections are returned sorted by distance, closest first.
|
|
110
110
|
* Intersections are of the same form as those returned by .intersectObject.
|
|
111
111
|
* @param objects The objects to check for intersection with the ray.
|
|
112
|
-
* @param recursive If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is
|
|
112
|
+
* @param recursive If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is true.
|
|
113
113
|
* @param optionalTarget (optional) target to set the result. Otherwise a new Array is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).
|
|
114
114
|
*/
|
|
115
115
|
intersectObjects<TIntersected extends Object3D>(
|
three/src/core/Uniform.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export class Uniform {
|
|
|
13
13
|
* @deprecated Use {@link Object3D#onBeforeRender object.onBeforeRender()} instead.
|
|
14
14
|
*/
|
|
15
15
|
dynamic: boolean;
|
|
16
|
-
onUpdateCallback: () => void;
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* @deprecated Use {@link Object3D#onBeforeRender object.onBeforeRender()} instead.
|
three/src/extras/DataUtils.d.ts
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BufferGeometry } from '../core/BufferGeometry';
|
|
2
|
+
|
|
3
|
+
export class CapsuleGeometry extends BufferGeometry {
|
|
4
|
+
/**
|
|
5
|
+
* @param [radius=1] — Radius of the capsule.
|
|
6
|
+
* @param [length=1] — Length of the middle section.
|
|
7
|
+
* @param [capSegments=4] — Number of curve segments used to build the caps.
|
|
8
|
+
* @param [radialSegments=8] — Number of segmented faces around the circumference of the capsule.
|
|
9
|
+
*/
|
|
10
|
+
constructor(radius?: number, length?: number, capSegments?: number, radialSegments?: number);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @default 'CapsuleGeometry'
|
|
14
|
+
*/
|
|
15
|
+
type: string;
|
|
16
|
+
|
|
17
|
+
parameters: {
|
|
18
|
+
radius: number;
|
|
19
|
+
length: number;
|
|
20
|
+
capSegments: number;
|
|
21
|
+
radialSegments: number;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
static fromJSON(data: any): CapsuleGeometry;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { CapsuleGeometry as CapsuleBufferGeometry };
|
|
@@ -13,9 +13,6 @@ import {
|
|
|
13
13
|
StencilOp,
|
|
14
14
|
PixelFormat,
|
|
15
15
|
} from '../constants';
|
|
16
|
-
import { ColorRepresentation } from '../utils';
|
|
17
|
-
import { Color } from '../math/Color';
|
|
18
|
-
import { Texture } from '../textures/Texture';
|
|
19
16
|
|
|
20
17
|
export interface MaterialParameters {
|
|
21
18
|
alphaTest?: number | undefined;
|
|
@@ -35,7 +32,6 @@ export interface MaterialParameters {
|
|
|
35
32
|
depthFunc?: DepthModes | undefined;
|
|
36
33
|
depthTest?: boolean | undefined;
|
|
37
34
|
depthWrite?: boolean | undefined;
|
|
38
|
-
fog?: boolean | undefined;
|
|
39
35
|
name?: string | undefined;
|
|
40
36
|
opacity?: number | undefined;
|
|
41
37
|
polygonOffset?: boolean | undefined;
|
|
@@ -80,11 +76,6 @@ export class Material extends EventDispatcher {
|
|
|
80
76
|
*/
|
|
81
77
|
alphaToCoverage: boolean;
|
|
82
78
|
|
|
83
|
-
/**
|
|
84
|
-
* @default false
|
|
85
|
-
*/
|
|
86
|
-
alphaWrite: boolean;
|
|
87
|
-
|
|
88
79
|
/**
|
|
89
80
|
* Blending destination. It's one of the blending mode constants defined in Three.js. Default is {@link OneMinusSrcAlphaFactor}.
|
|
90
81
|
* @default THREE.OneMinusSrcAlphaFactor
|
|
@@ -180,12 +171,6 @@ export class Material extends EventDispatcher {
|
|
|
180
171
|
*/
|
|
181
172
|
depthWrite: boolean;
|
|
182
173
|
|
|
183
|
-
/**
|
|
184
|
-
* Whether the material is affected by fog. Default is true.
|
|
185
|
-
* @default fog
|
|
186
|
-
*/
|
|
187
|
-
fog: boolean;
|
|
188
|
-
|
|
189
174
|
/**
|
|
190
175
|
* Unique number of this material instance.
|
|
191
176
|
*/
|
|
@@ -16,6 +16,7 @@ export interface MeshBasicMaterialParameters extends MaterialParameters {
|
|
|
16
16
|
aoMapIntensity?: number | undefined;
|
|
17
17
|
specularMap?: Texture | null | undefined;
|
|
18
18
|
alphaMap?: Texture | null | undefined;
|
|
19
|
+
fog?: boolean | undefined;
|
|
19
20
|
envMap?: Texture | null | undefined;
|
|
20
21
|
combine?: Combine | undefined;
|
|
21
22
|
reflectivity?: number | undefined;
|
|
@@ -114,5 +115,11 @@ export class MeshBasicMaterial extends Material {
|
|
|
114
115
|
*/
|
|
115
116
|
wireframeLinejoin: string;
|
|
116
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Whether the material is affected by fog. Default is true.
|
|
120
|
+
* @default fog
|
|
121
|
+
*/
|
|
122
|
+
fog: boolean;
|
|
123
|
+
|
|
117
124
|
setValues(parameters: MeshBasicMaterialParameters): void;
|
|
118
125
|
}
|
|
@@ -24,6 +24,7 @@ export interface MeshLambertMaterialParameters extends MaterialParameters {
|
|
|
24
24
|
wireframeLinewidth?: number | undefined;
|
|
25
25
|
wireframeLinecap?: string | undefined;
|
|
26
26
|
wireframeLinejoin?: string | undefined;
|
|
27
|
+
fog?: boolean | undefined;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export class MeshLambertMaterial extends Material {
|
|
@@ -129,5 +130,11 @@ export class MeshLambertMaterial extends Material {
|
|
|
129
130
|
*/
|
|
130
131
|
wireframeLinejoin: string;
|
|
131
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Whether the material is affected by fog. Default is true.
|
|
135
|
+
* @default fog
|
|
136
|
+
*/
|
|
137
|
+
fog: boolean;
|
|
138
|
+
|
|
132
139
|
setValues(parameters: MeshLambertMaterialParameters): void;
|
|
133
140
|
}
|
|
@@ -18,7 +18,7 @@ export interface MeshMatcapMaterialParameters extends MaterialParameters {
|
|
|
18
18
|
displacementScale?: number | undefined;
|
|
19
19
|
displacementBias?: number | undefined;
|
|
20
20
|
alphaMap?: Texture | null | undefined;
|
|
21
|
-
|
|
21
|
+
fog?: boolean | undefined;
|
|
22
22
|
flatShading?: boolean | undefined;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -101,5 +101,11 @@ export class MeshMatcapMaterial extends Material {
|
|
|
101
101
|
*/
|
|
102
102
|
flatShading: boolean;
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Whether the material is affected by fog. Default is true.
|
|
106
|
+
* @default fog
|
|
107
|
+
*/
|
|
108
|
+
fog: boolean;
|
|
109
|
+
|
|
104
110
|
setValues(parameters: MeshMatcapMaterialParameters): void;
|
|
105
111
|
}
|
|
@@ -37,7 +37,7 @@ export interface MeshPhongMaterialParameters extends MaterialParameters {
|
|
|
37
37
|
wireframeLinewidth?: number | undefined;
|
|
38
38
|
wireframeLinecap?: string | undefined;
|
|
39
39
|
wireframeLinejoin?: string | undefined;
|
|
40
|
-
|
|
40
|
+
fog?: boolean | undefined;
|
|
41
41
|
flatShading?: boolean | undefined;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -205,5 +205,11 @@ export class MeshPhongMaterial extends Material {
|
|
|
205
205
|
*/
|
|
206
206
|
metal: boolean;
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Whether the material is affected by fog. Default is true.
|
|
210
|
+
* @default fog
|
|
211
|
+
*/
|
|
212
|
+
fog: boolean;
|
|
213
|
+
|
|
208
214
|
setValues(parameters: MeshPhongMaterialParameters): void;
|
|
209
215
|
}
|
|
@@ -30,10 +30,9 @@ export interface MeshStandardMaterialParameters extends MaterialParameters {
|
|
|
30
30
|
alphaMap?: Texture | null | undefined;
|
|
31
31
|
envMap?: Texture | null | undefined;
|
|
32
32
|
envMapIntensity?: number | undefined;
|
|
33
|
-
refractionRatio?: number | undefined;
|
|
34
33
|
wireframe?: boolean | undefined;
|
|
35
34
|
wireframeLinewidth?: number | undefined;
|
|
36
|
-
|
|
35
|
+
fog?: boolean | undefined;
|
|
37
36
|
flatShading?: boolean | undefined;
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -170,11 +169,6 @@ export class MeshStandardMaterial extends Material {
|
|
|
170
169
|
*/
|
|
171
170
|
envMapIntensity: number;
|
|
172
171
|
|
|
173
|
-
/**
|
|
174
|
-
* @default 0.98
|
|
175
|
-
*/
|
|
176
|
-
refractionRatio: number;
|
|
177
|
-
|
|
178
172
|
/**
|
|
179
173
|
* @default false
|
|
180
174
|
*/
|
|
@@ -201,6 +195,12 @@ export class MeshStandardMaterial extends Material {
|
|
|
201
195
|
*/
|
|
202
196
|
flatShading: boolean;
|
|
203
197
|
|
|
198
|
+
/**
|
|
199
|
+
* Whether the material is affected by fog. Default is true.
|
|
200
|
+
* @default fog
|
|
201
|
+
*/
|
|
202
|
+
fog: boolean;
|
|
203
|
+
|
|
204
204
|
isMeshStandardMaterial: boolean;
|
|
205
205
|
|
|
206
206
|
setValues(parameters: MeshStandardMaterialParameters): void;
|
|
@@ -31,6 +31,7 @@ export interface MeshToonMaterialParameters extends MaterialParameters {
|
|
|
31
31
|
wireframeLinewidth?: number | undefined;
|
|
32
32
|
wireframeLinecap?: string | undefined;
|
|
33
33
|
wireframeLinejoin?: string | undefined;
|
|
34
|
+
fog?: boolean | undefined;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export class MeshToonMaterial extends Material {
|
|
@@ -161,5 +162,11 @@ export class MeshToonMaterial extends Material {
|
|
|
161
162
|
*/
|
|
162
163
|
wireframeLinejoin: string;
|
|
163
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Whether the material is affected by fog. Default is true.
|
|
167
|
+
* @default fog
|
|
168
|
+
*/
|
|
169
|
+
fog: boolean;
|
|
170
|
+
|
|
164
171
|
setValues(parameters: MeshToonMaterialParameters): void;
|
|
165
172
|
}
|
|
@@ -9,6 +9,7 @@ export interface PointsMaterialParameters extends MaterialParameters {
|
|
|
9
9
|
alphaMap?: Texture | null | undefined;
|
|
10
10
|
size?: number | undefined;
|
|
11
11
|
sizeAttenuation?: boolean | undefined;
|
|
12
|
+
fog?: boolean | undefined;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export class PointsMaterial extends Material {
|
|
@@ -44,5 +45,11 @@ export class PointsMaterial extends Material {
|
|
|
44
45
|
*/
|
|
45
46
|
sizeAttenuation: boolean;
|
|
46
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Whether the material is affected by fog. Default is true.
|
|
50
|
+
* @default fog
|
|
51
|
+
*/
|
|
52
|
+
fog: boolean;
|
|
53
|
+
|
|
47
54
|
setValues(parameters: PointsMaterialParameters): void;
|
|
48
55
|
}
|
|
@@ -4,6 +4,7 @@ import { MaterialParameters, Material } from './Material';
|
|
|
4
4
|
|
|
5
5
|
export interface ShadowMaterialParameters extends MaterialParameters {
|
|
6
6
|
color?: ColorRepresentation | undefined;
|
|
7
|
+
fog?: boolean | undefined;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export class ShadowMaterial extends Material {
|
|
@@ -23,4 +24,10 @@ export class ShadowMaterial extends Material {
|
|
|
23
24
|
* @default true
|
|
24
25
|
*/
|
|
25
26
|
transparent: boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Whether the material is affected by fog. Default is true.
|
|
30
|
+
* @default fog
|
|
31
|
+
*/
|
|
32
|
+
fog: boolean;
|
|
26
33
|
}
|
|
@@ -9,6 +9,7 @@ export interface SpriteMaterialParameters extends MaterialParameters {
|
|
|
9
9
|
alphaMap?: Texture | null | undefined;
|
|
10
10
|
rotation?: number | undefined;
|
|
11
11
|
sizeAttenuation?: boolean | undefined;
|
|
12
|
+
fog?: boolean | undefined;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export class SpriteMaterial extends Material {
|
|
@@ -48,6 +49,12 @@ export class SpriteMaterial extends Material {
|
|
|
48
49
|
*/
|
|
49
50
|
transparent: boolean;
|
|
50
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Whether the material is affected by fog. Default is true.
|
|
54
|
+
* @default fog
|
|
55
|
+
*/
|
|
56
|
+
fog: boolean;
|
|
57
|
+
|
|
51
58
|
readonly isSpriteMaterial: true;
|
|
52
59
|
|
|
53
60
|
setValues(parameters: SpriteMaterialParameters): void;
|
three/src/math/Color.d.ts
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
import { ColorSpace } from '../constants';
|
|
1
2
|
import { ColorRepresentation } from '../utils';
|
|
3
|
+
|
|
2
4
|
import { BufferAttribute } from './../core/BufferAttribute';
|
|
3
5
|
|
|
6
|
+
export { SRGBToLinear } from './ColorManagement';
|
|
7
|
+
|
|
4
8
|
export interface HSL {
|
|
5
9
|
h: number;
|
|
6
10
|
s: number;
|
|
7
11
|
l: number;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
|
-
export
|
|
14
|
+
export interface RGB {
|
|
15
|
+
r: number;
|
|
16
|
+
g: number;
|
|
17
|
+
b: number;
|
|
18
|
+
}
|
|
11
19
|
|
|
12
20
|
/**
|
|
13
21
|
* Represents a color. See also {@link ColorUtils}.
|
|
@@ -43,7 +51,7 @@ export class Color {
|
|
|
43
51
|
|
|
44
52
|
set(color: ColorRepresentation): Color;
|
|
45
53
|
setScalar(scalar: number): Color;
|
|
46
|
-
setHex(hex: number): Color;
|
|
54
|
+
setHex(hex: number, colorSpace?: ColorSpace): Color;
|
|
47
55
|
|
|
48
56
|
/**
|
|
49
57
|
* Sets this color from RGB values.
|
|
@@ -51,7 +59,7 @@ export class Color {
|
|
|
51
59
|
* @param g Green channel value between 0 and 1.
|
|
52
60
|
* @param b Blue channel value between 0 and 1.
|
|
53
61
|
*/
|
|
54
|
-
setRGB(r: number, g: number, b: number): Color;
|
|
62
|
+
setRGB(r: number, g: number, b: number, colorSpace?: ColorSpace): Color;
|
|
55
63
|
|
|
56
64
|
/**
|
|
57
65
|
* Sets this color from HSL values.
|
|
@@ -61,20 +69,20 @@ export class Color {
|
|
|
61
69
|
* @param s Saturation value channel between 0 and 1.
|
|
62
70
|
* @param l Value channel value between 0 and 1.
|
|
63
71
|
*/
|
|
64
|
-
setHSL(h: number, s: number, l: number): Color;
|
|
72
|
+
setHSL(h: number, s: number, l: number, colorSpace?: ColorSpace): Color;
|
|
65
73
|
|
|
66
74
|
/**
|
|
67
75
|
* Sets this color from a CSS context style string.
|
|
68
76
|
* @param contextStyle Color in CSS context style format.
|
|
69
77
|
*/
|
|
70
|
-
setStyle(style: string): Color;
|
|
78
|
+
setStyle(style: string, colorSpace?: ColorSpace): Color;
|
|
71
79
|
|
|
72
80
|
/**
|
|
73
81
|
* Sets this color from a color name.
|
|
74
82
|
* Faster than {@link Color#setStyle .setStyle()} method if you don't need the other CSS-style formats.
|
|
75
83
|
* @param style Color name in X11 format.
|
|
76
84
|
*/
|
|
77
|
-
setColorName(style: string): Color;
|
|
85
|
+
setColorName(style: string, colorSpace?: ColorSpace): Color;
|
|
78
86
|
|
|
79
87
|
/**
|
|
80
88
|
* Clones this color.
|
|
@@ -112,20 +120,22 @@ export class Color {
|
|
|
112
120
|
/**
|
|
113
121
|
* Returns the hexadecimal value of this color.
|
|
114
122
|
*/
|
|
115
|
-
getHex(): number;
|
|
123
|
+
getHex(colorSpace?: ColorSpace): number;
|
|
116
124
|
|
|
117
125
|
/**
|
|
118
126
|
* Returns the string formated hexadecimal value of this color.
|
|
119
127
|
*/
|
|
120
|
-
getHexString(): string;
|
|
128
|
+
getHexString(colorSpace?: ColorSpace): string;
|
|
121
129
|
|
|
122
|
-
getHSL(target: HSL): HSL;
|
|
130
|
+
getHSL(target: HSL, colorSpace?: ColorSpace): HSL;
|
|
131
|
+
|
|
132
|
+
getRGB(target: RGB, colorSpace?: ColorSpace): RGB;
|
|
123
133
|
|
|
124
134
|
/**
|
|
125
135
|
* Returns the value of this color in CSS context style.
|
|
126
136
|
* Example: rgb(r, g, b)
|
|
127
137
|
*/
|
|
128
|
-
getStyle(): string;
|
|
138
|
+
getStyle(colorSpace?: ColorSpace): string;
|
|
129
139
|
|
|
130
140
|
offsetHSL(h: number, s: number, l: number): this;
|
|
131
141
|
|
|
@@ -165,6 +175,8 @@ export class Color {
|
|
|
165
175
|
|
|
166
176
|
fromBufferAttribute(attribute: BufferAttribute, index: number): this;
|
|
167
177
|
|
|
178
|
+
[Symbol.iterator](): Generator<number, void>;
|
|
179
|
+
|
|
168
180
|
/**
|
|
169
181
|
* List of X11 color names.
|
|
170
182
|
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LinearSRGBColorSpace, SRGBColorSpace } from '../constants';
|
|
2
|
+
import { Color } from './Color';
|
|
3
|
+
|
|
4
|
+
export function SRGBToLinear(c: number): number;
|
|
5
|
+
|
|
6
|
+
export function LinearToSRGB(c: number): number;
|
|
7
|
+
|
|
8
|
+
export namespace ColorManagement {
|
|
9
|
+
function convert(
|
|
10
|
+
color: Color,
|
|
11
|
+
sourceColorSpace: SRGBColorSpace | LinearSRGBColorSpace,
|
|
12
|
+
targetColorSpace: SRGBColorSpace | LinearSRGBColorSpace,
|
|
13
|
+
): Color;
|
|
14
|
+
|
|
15
|
+
function fromWorkingColorSpace(color: Color, targetColorSpace: SRGBColorSpace | LinearSRGBColorSpace): Color;
|
|
16
|
+
|
|
17
|
+
function toWorkingColorSpace(color: Color, sourceColorSpace: SRGBColorSpace | LinearSRGBColorSpace): Color;
|
|
18
|
+
}
|
three/src/math/Euler.d.ts
CHANGED
|
@@ -38,9 +38,10 @@ export class Euler {
|
|
|
38
38
|
equals(euler: Euler): boolean;
|
|
39
39
|
fromArray(xyzo: any[]): Euler;
|
|
40
40
|
toArray(array?: number[], offset?: number): number[];
|
|
41
|
-
toVector3(optionalResult?: Vector3): Vector3;
|
|
42
41
|
_onChange(callback: () => void): this;
|
|
43
42
|
|
|
44
43
|
static RotationOrders: string[];
|
|
45
44
|
static DefaultOrder: string;
|
|
45
|
+
|
|
46
|
+
[Symbol.iterator](): Generator<string | number, void>;
|
|
46
47
|
}
|
three/src/math/Plane.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ export class Plane {
|
|
|
31
31
|
distanceToPoint(point: Vector3): number;
|
|
32
32
|
distanceToSphere(sphere: Sphere): number;
|
|
33
33
|
projectPoint(point: Vector3, target: Vector3): Vector3;
|
|
34
|
-
orthoPoint(point: Vector3, target: Vector3): Vector3;
|
|
35
34
|
intersectLine(line: Line3, target: Vector3): Vector3 | null;
|
|
36
35
|
intersectsLine(line: Line3): boolean;
|
|
37
36
|
intersectsBox(box: Box3): boolean;
|
three/src/math/Quaternion.d.ts
CHANGED
three/src/math/Vector3.d.ts
CHANGED
|
@@ -252,6 +252,11 @@ export class Vector3 implements Vector {
|
|
|
252
252
|
setFromMatrixColumn(matrix: Matrix4, index: number): this;
|
|
253
253
|
setFromMatrix3Column(matrix: Matrix3, index: number): this;
|
|
254
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Sets this vector's {@link x}, {@link y} and {@link z} components from the x, y, and z components of the specified {@link Euler Euler Angle}.
|
|
257
|
+
*/
|
|
258
|
+
setFromEuler(e: Euler): this;
|
|
259
|
+
|
|
255
260
|
/**
|
|
256
261
|
* Checks for strict equality of this vector and v.
|
|
257
262
|
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Data3DTexture } from '../textures/Data3DTexture';
|
|
2
|
+
import { WebGLRenderTarget } from './WebGLRenderTarget';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents a three-dimensional render target.
|
|
6
|
+
*/
|
|
7
|
+
export class WebGL3DRenderTarget extends WebGLRenderTarget {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new WebGL3DRenderTarget.
|
|
10
|
+
*
|
|
11
|
+
* @param width the width of the render target, in pixels.
|
|
12
|
+
* @param height the height of the render target, in pixels.
|
|
13
|
+
* @param depth the depth of the render target.
|
|
14
|
+
*/
|
|
15
|
+
constructor(width: number, height: number, depth: number);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The depth of the render target.
|
|
19
|
+
*/
|
|
20
|
+
depth: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The texture property is overwritten with an instance of {@link Data3DTexture}.
|
|
24
|
+
*/
|
|
25
|
+
texture: Data3DTexture;
|
|
26
|
+
|
|
27
|
+
readonly isWebGL3DRenderTarget: true;
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DataArrayTexture } from '../textures/DataArrayTexture';
|
|
2
|
+
import { WebGLRenderTarget } from './WebGLRenderTarget';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This type of render target represents an array of textures.
|
|
6
|
+
*/
|
|
7
|
+
export class WebGLArrayRenderTarget extends WebGLRenderTarget {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new WebGLArrayRenderTarget.
|
|
10
|
+
*
|
|
11
|
+
* @param width the width of the render target, in pixels.
|
|
12
|
+
* @param height the height of the render target, in pixels.
|
|
13
|
+
* @param depth the depth/layer count of the render target.
|
|
14
|
+
*/
|
|
15
|
+
constructor(width: number, height: number, depth: number);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The depth of the render target.
|
|
19
|
+
*/
|
|
20
|
+
depth: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The texture property is overwritten with an instance of {@link DataArrayTexture}.
|
|
24
|
+
*/
|
|
25
|
+
texture: DataArrayTexture;
|
|
26
|
+
|
|
27
|
+
readonly isWebGLArrayRenderTarget: true;
|
|
28
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventDispatcher } from '../core/EventDispatcher';
|
|
2
2
|
import { Texture } from '../textures/Texture';
|
|
3
|
+
import { WebGLRenderTargetOptions } from './WebGLRenderTarget';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* This class originall extended WebGLMultipleRenderTarget
|
|
@@ -10,7 +11,14 @@ export class WebGLMultipleRenderTargets extends EventDispatcher {
|
|
|
10
11
|
|
|
11
12
|
readonly isWebGLMultipleRenderTargets = true;
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @param width The width of the render target.
|
|
16
|
+
* @param height The height of the render target.
|
|
17
|
+
* @param count The number of render targets.
|
|
18
|
+
* @param options object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans.
|
|
19
|
+
* For an explanation of the texture parameters see {@link Texture}.
|
|
20
|
+
*/
|
|
21
|
+
constructor(width: number, height: number, count: number, options?: WebGLRenderTargetOptions);
|
|
14
22
|
|
|
15
23
|
setSize(width: number, height: number, depth?: number): this;
|
|
16
24
|
copy(source: WebGLMultipleRenderTargets): this;
|