@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.
Files changed (104) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/controls/OrbitControls.d.ts +3 -3
  3. three/examples/jsm/controls/TrackballControls.d.ts +2 -2
  4. three/examples/jsm/controls/TransformControls.d.ts +2 -6
  5. three/examples/jsm/geometries/TextGeometry.d.ts +92 -15
  6. three/examples/jsm/loaders/EXRLoader.d.ts +3 -2
  7. three/examples/jsm/misc/GPUComputationRenderer.d.ts +4 -2
  8. three/package.json +2 -2
  9. three/src/Three.d.ts +0 -1
  10. three/src/audio/Audio.d.ts +184 -20
  11. three/src/audio/AudioAnalyser.d.ts +42 -4
  12. three/src/audio/AudioContext.d.ts +12 -1
  13. three/src/audio/AudioListener.d.ts +76 -8
  14. three/src/audio/PositionalAudio.d.ts +86 -5
  15. three/src/cameras/ArrayCamera.d.ts +23 -2
  16. three/src/cameras/Camera.d.ts +42 -13
  17. three/src/cameras/CubeCamera.d.ts +49 -1
  18. three/src/cameras/OrthographicCamera.d.ts +77 -25
  19. three/src/cameras/PerspectiveCamera.d.ts +132 -56
  20. three/src/cameras/StereoCamera.d.ts +29 -2
  21. three/src/constants.d.ts +431 -26
  22. three/src/core/BufferGeometry.d.ts +5 -3
  23. three/src/core/Object3D.d.ts +17 -13
  24. three/src/core/Raycaster.d.ts +1 -0
  25. three/src/geometries/BoxGeometry.d.ts +39 -16
  26. three/src/geometries/CapsuleGeometry.d.ts +35 -12
  27. three/src/geometries/CircleGeometry.d.ts +38 -12
  28. three/src/geometries/ConeGeometry.d.ts +45 -10
  29. three/src/geometries/CylinderGeometry.d.ts +41 -19
  30. three/src/geometries/DodecahedronGeometry.d.ts +14 -5
  31. three/src/geometries/EdgesGeometry.d.ts +30 -8
  32. three/src/geometries/ExtrudeGeometry.d.ts +93 -12
  33. three/src/geometries/IcosahedronGeometry.d.ts +15 -5
  34. three/src/geometries/LatheGeometry.d.ts +41 -12
  35. three/src/geometries/OctahedronGeometry.d.ts +14 -5
  36. three/src/geometries/PlaneGeometry.d.ts +35 -12
  37. three/src/geometries/PolyhedronGeometry.d.ts +41 -12
  38. three/src/geometries/RingGeometry.d.ts +39 -16
  39. three/src/geometries/ShapeGeometry.d.ts +44 -4
  40. three/src/geometries/SphereGeometry.d.ts +43 -21
  41. three/src/geometries/TetrahedronGeometry.d.ts +14 -5
  42. three/src/geometries/TorusGeometry.d.ts +35 -13
  43. three/src/geometries/TorusKnotGeometry.d.ts +39 -16
  44. three/src/geometries/TubeGeometry.d.ts +63 -15
  45. three/src/geometries/WireframeGeometry.d.ts +30 -4
  46. three/src/helpers/ArrowHelper.d.ts +1 -1
  47. three/src/helpers/BoxHelper.d.ts +1 -1
  48. three/src/helpers/DirectionalLightHelper.d.ts +1 -1
  49. three/src/helpers/GridHelper.d.ts +1 -1
  50. three/src/helpers/HemisphereLightHelper.d.ts +1 -2
  51. three/src/helpers/PointLightHelper.d.ts +1 -1
  52. three/src/helpers/PolarGridHelper.d.ts +1 -1
  53. three/src/helpers/SpotLightHelper.d.ts +1 -1
  54. three/src/lights/AmbientLight.d.ts +1 -1
  55. three/src/lights/AmbientLightProbe.d.ts +1 -1
  56. three/src/lights/DirectionalLight.d.ts +1 -1
  57. three/src/lights/HemisphereLight.d.ts +1 -2
  58. three/src/lights/HemisphereLightProbe.d.ts +1 -1
  59. three/src/lights/PointLight.d.ts +1 -1
  60. three/src/lights/RectAreaLight.d.ts +1 -1
  61. three/src/lights/SpotLight.d.ts +1 -2
  62. three/src/materials/LineBasicMaterial.d.ts +1 -2
  63. three/src/materials/MeshBasicMaterial.d.ts +1 -2
  64. three/src/materials/MeshLambertMaterial.d.ts +1 -2
  65. three/src/materials/MeshMatcapMaterial.d.ts +1 -2
  66. three/src/materials/MeshPhongMaterial.d.ts +1 -2
  67. three/src/materials/MeshStandardMaterial.d.ts +1 -2
  68. three/src/materials/MeshToonMaterial.d.ts +1 -2
  69. three/src/materials/PointsMaterial.d.ts +1 -2
  70. three/src/materials/ShadowMaterial.d.ts +1 -2
  71. three/src/materials/SpriteMaterial.d.ts +1 -2
  72. three/src/math/Color.d.ts +2 -3
  73. three/src/math/ColorManagement.d.ts +2 -2
  74. three/src/objects/Bone.d.ts +30 -3
  75. three/src/objects/Group.d.ts +37 -1
  76. three/src/objects/InstancedMesh.d.ts +122 -3
  77. three/src/objects/LOD.d.ts +62 -18
  78. three/src/objects/Line.d.ts +67 -4
  79. three/src/objects/LineLoop.d.ts +26 -1
  80. three/src/objects/LineSegments.d.ts +21 -9
  81. three/src/objects/Mesh.d.ts +60 -4
  82. three/src/objects/Points.d.ts +39 -8
  83. three/src/objects/Skeleton.d.ts +89 -3
  84. three/src/objects/SkinnedMesh.d.ts +122 -3
  85. three/src/objects/Sprite.d.ts +51 -4
  86. three/src/renderers/WebGLRenderTarget.d.ts +9 -3
  87. three/src/renderers/WebGLRenderer.d.ts +1 -2
  88. three/src/scenes/Fog.d.ts +60 -9
  89. three/src/scenes/FogExp2.d.ts +41 -7
  90. three/src/scenes/Scene.d.ts +45 -22
  91. three/src/textures/CanvasTexture.d.ts +35 -13
  92. three/src/textures/CompressedArrayTexture.d.ts +39 -5
  93. three/src/textures/CompressedTexture.d.ts +49 -20
  94. three/src/textures/CubeTexture.d.ts +71 -18
  95. three/src/textures/Data3DTexture.d.ts +74 -10
  96. three/src/textures/DataArrayTexture.d.ts +83 -9
  97. three/src/textures/DataTexture.d.ts +81 -26
  98. three/src/textures/DepthTexture.d.ts +71 -15
  99. three/src/textures/FramebufferTexture.d.ts +57 -2
  100. three/src/textures/Source.d.ts +23 -13
  101. three/src/textures/Texture.d.ts +289 -73
  102. three/src/textures/VideoTexture.d.ts +69 -13
  103. three/src/textures/types.d.ts +9 -0
  104. 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
- * @param path
8
- * @param [tubularSegments=64]
9
- * @param [radius=1]
10
- * @param [radiusSegments=8]
11
- * @param [closed=false]
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
- radiusSegments?: number,
46
+ radialSegments?: number,
18
47
  closed?: boolean,
19
48
  );
20
49
 
21
50
  /**
22
- * @default 'TubeGeometry'
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
- parameters: {
27
- path: Curve<Vector3>;
28
- tubularSegments: number;
29
- radius: number;
30
- radialSegments: number;
31
- closed: boolean;
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
- static fromJSON(data: any): TubeGeometry;
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
- * @default 'WireframeGeometry'
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
- parameters: {
12
- geometry: TBufferGeometry;
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 '../utils';
5
+ import { ColorRepresentation } from '../math/Color';
6
6
 
7
7
  // Extras / Helpers /////////////////////////////////////////////////////////////////////
8
8
 
@@ -1,4 +1,4 @@
1
- import { ColorRepresentation } from '../utils';
1
+ import { ColorRepresentation } from '../math/Color';
2
2
  import { Object3D } from './../core/Object3D';
3
3
  import { LineSegments } from './../objects/LineSegments';
4
4
 
@@ -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 '../utils';
5
+ import { ColorRepresentation } from '../math/Color';
6
6
 
7
7
  export class DirectionalLightHelper extends Object3D {
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { ColorRepresentation } from '../utils';
1
+ import { ColorRepresentation } from '../math/Color';
2
2
  import { LineSegments } from './../objects/LineSegments';
3
3
 
4
4
  export class GridHelper extends LineSegments {
@@ -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 '../utils';
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 '../utils';
4
+ import { ColorRepresentation } from '../math/Color';
5
5
 
6
6
  export class PointLightHelper extends Object3D {
7
7
  constructor(light: PointLight, sphereSize?: number, color?: ColorRepresentation);
@@ -1,5 +1,5 @@
1
1
  import { LineSegments } from '../objects/LineSegments';
2
- import { ColorRepresentation } from '../utils';
2
+ import { ColorRepresentation } from '../math/Color';
3
3
 
4
4
  export class PolarGridHelper extends LineSegments {
5
5
  /**
@@ -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 '../utils';
5
+ import { ColorRepresentation } from '../math/Color';
6
6
 
7
7
  export class SpotLightHelper extends Object3D {
8
8
  constructor(light: Light, color?: ColorRepresentation);
@@ -1,4 +1,4 @@
1
- import { ColorRepresentation } from '../utils';
1
+ import { ColorRepresentation } from '../math/Color';
2
2
  import { Light } from './Light';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { ColorRepresentation } from '../utils';
1
+ import { ColorRepresentation } from '../math/Color';
2
2
  import { LightProbe } from './LightProbe';
3
3
 
4
4
  export class AmbientLightProbe extends LightProbe {
@@ -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 '../utils';
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
  /**
@@ -1,4 +1,4 @@
1
- import { ColorRepresentation } from '../utils';
1
+ import { ColorRepresentation } from '../math/Color';
2
2
  import { LightProbe } from './LightProbe';
3
3
 
4
4
  export class HemisphereLightProbe extends LightProbe {
@@ -1,4 +1,4 @@
1
- import { ColorRepresentation } from '../utils';
1
+ import { ColorRepresentation } from '../math/Color';
2
2
  import { Light } from './Light';
3
3
  import { PointLightShadow } from './PointLightShadow';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { Light } from './Light';
2
- import { ColorRepresentation } from '../utils';
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);
@@ -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 '../utils';
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 '../utils';
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 '../utils';
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 {
@@ -1,5 +1,4 @@
1
- import { ColorRepresentation } from '../utils';
2
- import { Color } from './../math/Color';
1
+ import { Color, ColorRepresentation } from './../math/Color';
3
2
  import { Texture } from './../textures/Texture';
4
3
  import { MaterialParameters, Material } from './Material';
5
4
 
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 ColorKeyword = keyof typeof _colorKeywords;
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: ColorKeyword, colorSpace?: ColorSpace): Color;
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
  }
@@ -1,9 +1,36 @@
1
1
  import { Object3D } from './../core/Object3D';
2
2
 
3
- // Objects //////////////////////////////////////////////////////////////////////////////////
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
- type: 'Bone';
30
+
31
+ /**
32
+ * @override
33
+ * @defaultValue `Bone`
34
+ */
35
+ override readonly type: string | 'Bone';
9
36
  }
@@ -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
- type: 'Group';
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
  }