@types/three 0.150.0 → 0.150.2
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/controls/OrbitControls.d.ts +3 -3
- three/examples/jsm/controls/TrackballControls.d.ts +2 -2
- three/examples/jsm/controls/TransformControls.d.ts +2 -6
- three/examples/jsm/geometries/TextGeometry.d.ts +92 -15
- three/examples/jsm/loaders/EXRLoader.d.ts +3 -2
- three/examples/jsm/misc/GPUComputationRenderer.d.ts +4 -2
- three/package.json +2 -2
- three/src/Three.d.ts +0 -1
- three/src/audio/Audio.d.ts +184 -20
- three/src/audio/AudioAnalyser.d.ts +42 -4
- three/src/audio/AudioContext.d.ts +12 -1
- three/src/audio/AudioListener.d.ts +76 -8
- three/src/audio/PositionalAudio.d.ts +86 -5
- three/src/cameras/ArrayCamera.d.ts +23 -2
- three/src/cameras/Camera.d.ts +42 -13
- three/src/cameras/CubeCamera.d.ts +49 -1
- three/src/cameras/OrthographicCamera.d.ts +77 -25
- three/src/cameras/PerspectiveCamera.d.ts +132 -56
- three/src/cameras/StereoCamera.d.ts +29 -2
- three/src/constants.d.ts +431 -26
- three/src/core/BufferGeometry.d.ts +5 -3
- three/src/core/Object3D.d.ts +17 -13
- three/src/core/Raycaster.d.ts +1 -0
- three/src/geometries/BoxGeometry.d.ts +39 -16
- three/src/geometries/CapsuleGeometry.d.ts +35 -12
- three/src/geometries/CircleGeometry.d.ts +38 -12
- three/src/geometries/ConeGeometry.d.ts +45 -10
- three/src/geometries/CylinderGeometry.d.ts +41 -19
- three/src/geometries/DodecahedronGeometry.d.ts +14 -5
- three/src/geometries/EdgesGeometry.d.ts +30 -8
- three/src/geometries/ExtrudeGeometry.d.ts +93 -12
- three/src/geometries/IcosahedronGeometry.d.ts +15 -5
- three/src/geometries/LatheGeometry.d.ts +41 -12
- three/src/geometries/OctahedronGeometry.d.ts +14 -5
- three/src/geometries/PlaneGeometry.d.ts +35 -12
- three/src/geometries/PolyhedronGeometry.d.ts +41 -12
- three/src/geometries/RingGeometry.d.ts +39 -16
- three/src/geometries/ShapeGeometry.d.ts +44 -4
- three/src/geometries/SphereGeometry.d.ts +43 -21
- three/src/geometries/TetrahedronGeometry.d.ts +14 -5
- three/src/geometries/TorusGeometry.d.ts +35 -13
- three/src/geometries/TorusKnotGeometry.d.ts +39 -16
- three/src/geometries/TubeGeometry.d.ts +63 -15
- three/src/geometries/WireframeGeometry.d.ts +30 -4
- three/src/helpers/ArrowHelper.d.ts +1 -1
- three/src/helpers/BoxHelper.d.ts +1 -1
- three/src/helpers/DirectionalLightHelper.d.ts +1 -1
- three/src/helpers/GridHelper.d.ts +1 -1
- three/src/helpers/HemisphereLightHelper.d.ts +1 -2
- three/src/helpers/PointLightHelper.d.ts +1 -1
- three/src/helpers/PolarGridHelper.d.ts +1 -1
- three/src/helpers/SpotLightHelper.d.ts +1 -1
- three/src/lights/AmbientLight.d.ts +1 -1
- three/src/lights/AmbientLightProbe.d.ts +1 -1
- three/src/lights/DirectionalLight.d.ts +1 -1
- three/src/lights/HemisphereLight.d.ts +1 -2
- three/src/lights/HemisphereLightProbe.d.ts +1 -1
- three/src/lights/PointLight.d.ts +1 -1
- three/src/lights/RectAreaLight.d.ts +1 -1
- three/src/lights/SpotLight.d.ts +1 -2
- three/src/materials/LineBasicMaterial.d.ts +1 -2
- three/src/materials/MeshBasicMaterial.d.ts +1 -2
- three/src/materials/MeshLambertMaterial.d.ts +1 -2
- three/src/materials/MeshMatcapMaterial.d.ts +1 -2
- three/src/materials/MeshPhongMaterial.d.ts +1 -2
- three/src/materials/MeshStandardMaterial.d.ts +1 -2
- three/src/materials/MeshToonMaterial.d.ts +1 -2
- three/src/materials/PointsMaterial.d.ts +1 -2
- three/src/materials/ShadowMaterial.d.ts +1 -2
- three/src/materials/SpriteMaterial.d.ts +1 -2
- three/src/math/Color.d.ts +2 -3
- three/src/math/ColorManagement.d.ts +2 -2
- three/src/objects/Bone.d.ts +30 -3
- three/src/objects/Group.d.ts +37 -1
- three/src/objects/InstancedMesh.d.ts +122 -3
- three/src/objects/LOD.d.ts +62 -18
- three/src/objects/Line.d.ts +67 -4
- three/src/objects/LineLoop.d.ts +26 -1
- three/src/objects/LineSegments.d.ts +21 -9
- three/src/objects/Mesh.d.ts +60 -4
- three/src/objects/Points.d.ts +39 -8
- three/src/objects/Skeleton.d.ts +89 -3
- three/src/objects/SkinnedMesh.d.ts +122 -3
- three/src/objects/Sprite.d.ts +51 -4
- three/src/renderers/WebGLRenderTarget.d.ts +9 -3
- three/src/renderers/WebGLRenderer.d.ts +1 -2
- three/src/scenes/Fog.d.ts +60 -9
- three/src/scenes/FogExp2.d.ts +41 -7
- three/src/scenes/Scene.d.ts +45 -22
- three/src/textures/CanvasTexture.d.ts +35 -13
- three/src/textures/CompressedArrayTexture.d.ts +39 -5
- three/src/textures/CompressedTexture.d.ts +49 -20
- three/src/textures/CubeTexture.d.ts +71 -18
- three/src/textures/Data3DTexture.d.ts +74 -10
- three/src/textures/DataArrayTexture.d.ts +83 -9
- three/src/textures/DataTexture.d.ts +81 -26
- three/src/textures/DepthTexture.d.ts +71 -15
- three/src/textures/FramebufferTexture.d.ts +57 -2
- three/src/textures/Source.d.ts +23 -13
- three/src/textures/Texture.d.ts +289 -73
- three/src/textures/VideoTexture.d.ts +69 -13
- three/src/textures/types.d.ts +9 -0
- three/src/utils.d.ts +0 -6
|
@@ -2,37 +2,85 @@ import { Curve } from './../extras/core/Curve';
|
|
|
2
2
|
import { Vector3 } from './../math/Vector3';
|
|
3
3
|
import { BufferGeometry } from './../core/BufferGeometry';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Creates a tube that extrudes along a 3d curve.
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* class CustomSinCurve extends THREE.Curve {
|
|
10
|
+
* constructor(scale = 1) {
|
|
11
|
+
* super();
|
|
12
|
+
* this.scale = scale;
|
|
13
|
+
* }
|
|
14
|
+
* getPoint(t, optionalTarget = new THREE.Vector3()) {
|
|
15
|
+
* const tx = t * 3 - 1.5;
|
|
16
|
+
* const ty = Math.sin(2 * Math.PI * t);
|
|
17
|
+
* const tz = 0;
|
|
18
|
+
* return optionalTarget.set(tx, ty, tz).multiplyScalar(this.scale);
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* const path = new CustomSinCurve(10);
|
|
22
|
+
* const geometry = new THREE.TubeGeometry(path, 20, 2, 8, false);
|
|
23
|
+
* const material = new THREE.MeshBasicMaterial({
|
|
24
|
+
* color: 0x00ff00
|
|
25
|
+
* });
|
|
26
|
+
* const mesh = new THREE.Mesh(geometry, material);
|
|
27
|
+
* scene.add(mesh);
|
|
28
|
+
* ```
|
|
29
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/geometries/TubeGeometry | Official Documentation}
|
|
30
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/geometries/TubeGeometry.js | Source}
|
|
31
|
+
*/
|
|
5
32
|
export class TubeGeometry extends BufferGeometry {
|
|
6
33
|
/**
|
|
7
|
-
* @
|
|
8
|
-
* @param
|
|
9
|
-
* @
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
34
|
+
* Create a new instance of {@link TubeGeometry}
|
|
35
|
+
* @param path A 3D path that inherits from the {@link THREE.Curve | Curve} base class.
|
|
36
|
+
* Default {@link THREE.QuadraticBezierCurve3 | new THREE.QuadraticBezierCurve3(new Vector3(-1, -1, 0 ), new Vector3(-1, 1, 0), new Vector3(1, 1, 0))}.
|
|
37
|
+
* @param tubularSegments The number of segments that make up the tube. Expects a `Integer`. Default `64`.
|
|
38
|
+
* @param radius The radius of the tube. Expects a `Float`. Default `1`.
|
|
39
|
+
* @param radialSegments The number of segments that make up the cross-section. Expects a `Integer`. Default `8`.
|
|
40
|
+
* @param closed Is the tube open or closed. Default `false`.
|
|
12
41
|
*/
|
|
13
42
|
constructor(
|
|
14
43
|
path?: Curve<Vector3>,
|
|
15
44
|
tubularSegments?: number,
|
|
16
45
|
radius?: number,
|
|
17
|
-
|
|
46
|
+
radialSegments?: number,
|
|
18
47
|
closed?: boolean,
|
|
19
48
|
);
|
|
20
49
|
|
|
21
50
|
/**
|
|
22
|
-
*
|
|
51
|
+
* A Read-only _string_ to check if `this` object type.
|
|
52
|
+
* @remarks Sub-classes will update this value.
|
|
53
|
+
* @defaultValue `TubeGeometry`
|
|
23
54
|
*/
|
|
24
|
-
type: string;
|
|
55
|
+
override readonly type: string | 'TubeGeometry';
|
|
25
56
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
57
|
+
/**
|
|
58
|
+
* An object with a property for each of the constructor parameters.
|
|
59
|
+
* @remarks Any modification after instantiation does not change the geometry.
|
|
60
|
+
*/
|
|
61
|
+
readonly parameters: {
|
|
62
|
+
readonly path: Curve<Vector3>;
|
|
63
|
+
readonly tubularSegments: number;
|
|
64
|
+
readonly radius: number;
|
|
65
|
+
readonly radialSegments: number;
|
|
66
|
+
readonly closed: boolean;
|
|
32
67
|
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* An array of {@link THREE.Vector3 | Vector3} tangents
|
|
71
|
+
*/
|
|
33
72
|
tangents: Vector3[];
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* An array of {@link THREE.Vector3 | Vector3} normals
|
|
76
|
+
*/
|
|
34
77
|
normals: Vector3[];
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* An array of {@link THREE.Vector3 | Vector3} binormals
|
|
81
|
+
*/
|
|
35
82
|
binormals: Vector3[];
|
|
36
83
|
|
|
37
|
-
|
|
84
|
+
/** @internal */
|
|
85
|
+
static fromJSON(data: {}): TubeGeometry;
|
|
38
86
|
}
|
|
@@ -1,14 +1,40 @@
|
|
|
1
1
|
import { BufferGeometry } from './../core/BufferGeometry';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* This can be used as a helper object to view a {@link BufferGeometry | geometry} as a wireframe.
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* const geometry = new THREE.SphereGeometry(100, 100, 100);
|
|
8
|
+
* const wireframe = new THREE.WireframeGeometry(geometry);
|
|
9
|
+
* const line = new THREE.LineSegments(wireframe);
|
|
10
|
+
* line.material.depthTest = false;
|
|
11
|
+
* line.material.opacity = 0.25;
|
|
12
|
+
* line.material.transparent = true;
|
|
13
|
+
* scene.add(line);
|
|
14
|
+
* ```
|
|
15
|
+
* @see Example: {@link https://threejs.org/examples/#webgl_helpers | helpers}
|
|
16
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/geometries/WireframeGeometry | Official Documentation}
|
|
17
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/geometries/WireframeGeometry.js | Source}
|
|
18
|
+
*/
|
|
3
19
|
export class WireframeGeometry<TBufferGeometry extends BufferGeometry = BufferGeometry> extends BufferGeometry {
|
|
20
|
+
/**
|
|
21
|
+
* Create a new instance of {@link WireframeGeometry}
|
|
22
|
+
* @param geometry Any geometry object. Default `null`.
|
|
23
|
+
*/
|
|
4
24
|
constructor(geometry?: TBufferGeometry);
|
|
5
25
|
|
|
6
26
|
/**
|
|
7
|
-
*
|
|
27
|
+
* A Read-only _string_ to check if `this` object type.
|
|
28
|
+
* @remarks Sub-classes will update this value.
|
|
29
|
+
* @defaultValue `WireframeGeometry`
|
|
8
30
|
*/
|
|
9
|
-
type: string;
|
|
31
|
+
override readonly type: string | 'WireframeGeometry';
|
|
10
32
|
|
|
11
|
-
|
|
12
|
-
|
|
33
|
+
/**
|
|
34
|
+
* An object with a property for each of the constructor parameters.
|
|
35
|
+
* @remarks Any modification after instantiation does not change the geometry.
|
|
36
|
+
*/
|
|
37
|
+
readonly parameters: {
|
|
38
|
+
readonly geometry: TBufferGeometry;
|
|
13
39
|
};
|
|
14
40
|
}
|
|
@@ -2,7 +2,7 @@ import { Vector3 } from './../math/Vector3';
|
|
|
2
2
|
import { Line } from './../objects/Line';
|
|
3
3
|
import { Mesh } from './../objects/Mesh';
|
|
4
4
|
import { Object3D } from './../core/Object3D';
|
|
5
|
-
import { ColorRepresentation } from '../
|
|
5
|
+
import { ColorRepresentation } from '../math/Color';
|
|
6
6
|
|
|
7
7
|
// Extras / Helpers /////////////////////////////////////////////////////////////////////
|
|
8
8
|
|
three/src/helpers/BoxHelper.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { DirectionalLight } from './../lights/DirectionalLight';
|
|
|
2
2
|
import { Line } from './../objects/Line';
|
|
3
3
|
import { Matrix4 } from './../math/Matrix4';
|
|
4
4
|
import { Object3D } from './../core/Object3D';
|
|
5
|
-
import { ColorRepresentation } from '../
|
|
5
|
+
import { ColorRepresentation } from '../math/Color';
|
|
6
6
|
|
|
7
7
|
export class DirectionalLightHelper extends Object3D {
|
|
8
8
|
/**
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { HemisphereLight } from './../lights/HemisphereLight';
|
|
2
|
-
import { Color } from './../math/Color';
|
|
3
2
|
import { Matrix4 } from './../math/Matrix4';
|
|
4
3
|
import { MeshBasicMaterial } from './../materials/MeshBasicMaterial';
|
|
5
4
|
import { Object3D } from './../core/Object3D';
|
|
6
|
-
import { ColorRepresentation } from '../
|
|
5
|
+
import { ColorRepresentation } from '../math/Color';
|
|
7
6
|
|
|
8
7
|
export class HemisphereLightHelper extends Object3D {
|
|
9
8
|
constructor(light: HemisphereLight, size: number, color?: ColorRepresentation);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PointLight } from './../lights/PointLight';
|
|
2
2
|
import { Matrix4 } from './../math/Matrix4';
|
|
3
3
|
import { Object3D } from './../core/Object3D';
|
|
4
|
-
import { ColorRepresentation } from '../
|
|
4
|
+
import { ColorRepresentation } from '../math/Color';
|
|
5
5
|
|
|
6
6
|
export class PointLightHelper extends Object3D {
|
|
7
7
|
constructor(light: PointLight, sphereSize?: number, color?: ColorRepresentation);
|
|
@@ -2,7 +2,7 @@ import { Light } from './../lights/Light';
|
|
|
2
2
|
import { Matrix4 } from './../math/Matrix4';
|
|
3
3
|
import { Object3D } from './../core/Object3D';
|
|
4
4
|
import { LineSegments } from '../objects/LineSegments';
|
|
5
|
-
import { ColorRepresentation } from '../
|
|
5
|
+
import { ColorRepresentation } from '../math/Color';
|
|
6
6
|
|
|
7
7
|
export class SpotLightHelper extends Object3D {
|
|
8
8
|
constructor(light: Light, color?: ColorRepresentation);
|
|
@@ -2,7 +2,7 @@ import { Object3D } from './../core/Object3D';
|
|
|
2
2
|
import { DirectionalLightShadow } from './DirectionalLightShadow';
|
|
3
3
|
import { Light } from './Light';
|
|
4
4
|
import { Vector3 } from '../math/Vector3';
|
|
5
|
-
import { ColorRepresentation } from '../
|
|
5
|
+
import { ColorRepresentation } from '../math/Color';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* see {@link https://github.com/mrdoob/three.js/blob/master/src/lights/DirectionalLight.js|src/lights/DirectionalLight.js}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
2
2
|
import { Vector3 } from '../math/Vector3';
|
|
3
3
|
import { Light } from './Light';
|
|
4
|
-
import { ColorRepresentation } from '../utils';
|
|
5
4
|
|
|
6
5
|
export class HemisphereLight extends Light {
|
|
7
6
|
/**
|
three/src/lights/PointLight.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Light } from './Light';
|
|
2
|
-
import { ColorRepresentation } from '../
|
|
2
|
+
import { ColorRepresentation } from '../math/Color';
|
|
3
3
|
|
|
4
4
|
export class RectAreaLight extends Light {
|
|
5
5
|
constructor(color?: ColorRepresentation, intensity?: number, width?: number, height?: number);
|
three/src/lights/SpotLight.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Color } from './../math/Color';
|
|
2
1
|
import { Vector3 } from '../math/Vector3';
|
|
3
2
|
import { Object3D } from './../core/Object3D';
|
|
4
3
|
import { SpotLightShadow } from './SpotLightShadow';
|
|
5
4
|
import { Light } from './Light';
|
|
6
|
-
import { ColorRepresentation } from '../
|
|
5
|
+
import { ColorRepresentation } from '../math/Color';
|
|
7
6
|
import { Texture } from '../textures/Texture';
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ColorRepresentation } from '
|
|
2
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
3
2
|
import { MaterialParameters, Material } from './Material';
|
|
4
3
|
|
|
5
4
|
export interface LineBasicMaterialParameters extends MaterialParameters {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
2
2
|
import { Texture } from './../textures/Texture';
|
|
3
3
|
import { MaterialParameters, Material } from './Material';
|
|
4
4
|
import { Combine } from '../constants';
|
|
5
|
-
import { ColorRepresentation } from '../utils';
|
|
6
5
|
/**
|
|
7
6
|
* parameters is an object with one or more properties defining the material's appearance.
|
|
8
7
|
*/
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
2
2
|
import { Texture } from './../textures/Texture';
|
|
3
3
|
import { MaterialParameters, Material } from './Material';
|
|
4
4
|
import { Combine, NormalMapTypes } from '../constants';
|
|
5
|
-
import { ColorRepresentation } from '../utils';
|
|
6
5
|
import { Vector2 } from '../Three';
|
|
7
6
|
|
|
8
7
|
export interface MeshLambertMaterialParameters extends MaterialParameters {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
2
2
|
import { Texture } from './../textures/Texture';
|
|
3
3
|
import { Vector2 } from './../math/Vector2';
|
|
4
4
|
import { MaterialParameters, Material } from './Material';
|
|
5
5
|
import { NormalMapTypes } from '../constants';
|
|
6
|
-
import { ColorRepresentation } from '../utils';
|
|
7
6
|
|
|
8
7
|
export interface MeshMatcapMaterialParameters extends MaterialParameters {
|
|
9
8
|
color?: ColorRepresentation | undefined;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
2
2
|
import { Texture } from './../textures/Texture';
|
|
3
3
|
import { Vector2 } from './../math/Vector2';
|
|
4
4
|
import { MaterialParameters, Material } from './Material';
|
|
5
5
|
import { Combine, NormalMapTypes } from '../constants';
|
|
6
|
-
import { ColorRepresentation } from '../utils';
|
|
7
6
|
|
|
8
7
|
export interface MeshPhongMaterialParameters extends MaterialParameters {
|
|
9
8
|
/** geometry color in hexadecimal. Default is 0xffffff. */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
2
2
|
import { Texture } from './../textures/Texture';
|
|
3
3
|
import { Vector2 } from './../math/Vector2';
|
|
4
4
|
import { MaterialParameters, Material } from './Material';
|
|
5
5
|
import { NormalMapTypes } from '../constants';
|
|
6
|
-
import { ColorRepresentation } from '../utils';
|
|
7
6
|
|
|
8
7
|
export interface MeshStandardMaterialParameters extends MaterialParameters {
|
|
9
8
|
color?: ColorRepresentation | undefined;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
2
2
|
import { Texture } from './../textures/Texture';
|
|
3
3
|
import { Vector2 } from './../math/Vector2';
|
|
4
4
|
import { MaterialParameters, Material } from './Material';
|
|
5
5
|
import { NormalMapTypes } from '../constants';
|
|
6
|
-
import { ColorRepresentation } from '../utils';
|
|
7
6
|
|
|
8
7
|
export interface MeshToonMaterialParameters extends MaterialParameters {
|
|
9
8
|
/** geometry color in hexadecimal. Default is 0xffffff. */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Material, MaterialParameters } from './Material';
|
|
2
|
-
import { Color } from './../math/Color';
|
|
2
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
3
3
|
import { Texture } from './../textures/Texture';
|
|
4
|
-
import { ColorRepresentation } from '../utils';
|
|
5
4
|
|
|
6
5
|
export interface PointsMaterialParameters extends MaterialParameters {
|
|
7
6
|
color?: ColorRepresentation | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ColorRepresentation } from '
|
|
2
|
-
import { Color } from './../math/Color';
|
|
1
|
+
import { Color, ColorRepresentation } from './../math/Color';
|
|
3
2
|
import { MaterialParameters, Material } from './Material';
|
|
4
3
|
|
|
5
4
|
export interface ShadowMaterialParameters extends MaterialParameters {
|
three/src/math/Color.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ColorSpace } from '../constants';
|
|
2
|
-
import { ColorRepresentation } from '../utils';
|
|
3
2
|
|
|
4
3
|
import { BufferAttribute } from './../core/BufferAttribute';
|
|
5
4
|
import { InterleavedBufferAttribute } from './../core/InterleavedBufferAttribute';
|
|
@@ -157,7 +156,7 @@ declare const _colorKeywords: {
|
|
|
157
156
|
yellowgreen: 0x9acd32;
|
|
158
157
|
};
|
|
159
158
|
|
|
160
|
-
export type
|
|
159
|
+
export type ColorRepresentation = Color | string | number;
|
|
161
160
|
|
|
162
161
|
export interface HSL {
|
|
163
162
|
h: number;
|
|
@@ -236,7 +235,7 @@ export class Color {
|
|
|
236
235
|
* Faster than {@link Color#setStyle .setStyle()} method if you don't need the other CSS-style formats.
|
|
237
236
|
* @param style Color name in X11 format.
|
|
238
237
|
*/
|
|
239
|
-
setColorName(style:
|
|
238
|
+
setColorName(style: string, colorSpace?: ColorSpace): Color;
|
|
240
239
|
|
|
241
240
|
/**
|
|
242
241
|
* Clones this color.
|
|
@@ -24,11 +24,11 @@ export namespace ColorManagement {
|
|
|
24
24
|
|
|
25
25
|
function fromWorkingColorSpace(
|
|
26
26
|
color: Color,
|
|
27
|
-
targetColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace,
|
|
27
|
+
targetColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace | typeof DisplayP3ColorSpace,
|
|
28
28
|
): Color;
|
|
29
29
|
|
|
30
30
|
function toWorkingColorSpace(
|
|
31
31
|
color: Color,
|
|
32
|
-
sourceColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace,
|
|
32
|
+
sourceColorSpace: typeof SRGBColorSpace | typeof LinearSRGBColorSpace | typeof DisplayP3ColorSpace,
|
|
33
33
|
): Color;
|
|
34
34
|
}
|
three/src/objects/Bone.d.ts
CHANGED
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import { Object3D } from './../core/Object3D';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* A {@link Bone} which is part of a {@link THREE.Skeleton | Skeleton}
|
|
5
|
+
* @remarks
|
|
6
|
+
* The skeleton in turn is used by the {@link THREE.SkinnedMesh | SkinnedMesh}
|
|
7
|
+
* Bones are almost identical to a blank {@link THREE.Object3D | Object3D}.
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const root = new THREE.Bone();
|
|
11
|
+
* const child = new THREE.Bone();
|
|
12
|
+
* root.add(child);
|
|
13
|
+
* child.position.y = 5;
|
|
14
|
+
* ```
|
|
15
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/objects/Bone | Official Documentation}
|
|
16
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/objects/Bone.js | Source}
|
|
17
|
+
*/
|
|
5
18
|
export class Bone extends Object3D {
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new {@link Bone}.
|
|
21
|
+
*/
|
|
6
22
|
constructor();
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Read-only flag to check if a given object is of type {@link Bone}.
|
|
26
|
+
* @remarks This is a _constant_ value
|
|
27
|
+
* @defaultValue `true`
|
|
28
|
+
*/
|
|
7
29
|
readonly isBone: true;
|
|
8
|
-
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @override
|
|
33
|
+
* @defaultValue `Bone`
|
|
34
|
+
*/
|
|
35
|
+
override readonly type: string | 'Bone';
|
|
9
36
|
}
|
three/src/objects/Group.d.ts
CHANGED
|
@@ -1,7 +1,43 @@
|
|
|
1
1
|
import { Object3D } from './../core/Object3D';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Its purpose is to make working with groups of objects syntactically clearer.
|
|
5
|
+
* @remarks This is almost identical to an {@link Object3D | Object3D}
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const geometry = new THREE.BoxGeometry(1, 1, 1);
|
|
9
|
+
* const material = new THREE.MeshBasicMaterial({
|
|
10
|
+
* color: 0x00ff00
|
|
11
|
+
* });
|
|
12
|
+
* const cubeA = new THREE.Mesh(geometry, material);
|
|
13
|
+
* cubeA.position.set(100, 100, 0);
|
|
14
|
+
* const cubeB = new THREE.Mesh(geometry, material);
|
|
15
|
+
* cubeB.position.set(-100, -100, 0);
|
|
16
|
+
* //create a {@link Group} and add the two cubes
|
|
17
|
+
* //These cubes can now be rotated / scaled etc as a {@link Group} * const {@link Group} = new THREE.Group();
|
|
18
|
+
* group.add(cubeA);
|
|
19
|
+
* group.add(cubeB);
|
|
20
|
+
* scene.add(group);
|
|
21
|
+
* ```
|
|
22
|
+
* @see {@link https://threejs.org/docs/index.html#api/en/objects/Group | Official Documentation}
|
|
23
|
+
* @see {@link https://github.com/mrdoob/three.js/blob/master/src/objects/Group.js | Source}
|
|
24
|
+
*/
|
|
3
25
|
export class Group extends Object3D {
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new {@link Bone}.
|
|
28
|
+
*/
|
|
4
29
|
constructor();
|
|
5
|
-
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Read-only flag to check if a given object is of type {@link Group}.
|
|
33
|
+
* @remarks This is a _constant_ value
|
|
34
|
+
* @defaultValue `true`
|
|
35
|
+
*/
|
|
6
36
|
readonly isGroup: true;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @override
|
|
40
|
+
* @defaultValue `Group`
|
|
41
|
+
*/
|
|
42
|
+
override readonly type: string | 'Group';
|
|
7
43
|
}
|