@types/three 0.150.1 → 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 CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sun, 02 Apr 2023 10:33:00 GMT
11
+ * Last updated: Tue, 18 Apr 2023 23:32:45 GMT
12
12
  * Dependencies: [@types/fflate](https://npmjs.com/package/@types/fflate), [@types/lil-gui](https://npmjs.com/package/@types/lil-gui), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr)
13
13
  * Global values: `THREE`
14
14
 
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.150.1",
3
+ "version": "0.150.2",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "fflate": "~0.6.9",
31
31
  "lil-gui": "~0.17.0"
32
32
  },
33
- "typesPublisherContentHash": "c7ff42de666a86340964d8f399b86ddfa5b1abfa546b40ede1e3385f993d5903",
33
+ "typesPublisherContentHash": "c2191d62aed43403a160d31f1eda315dcee3ba0c3154b0cd4cd4fed4226f8434",
34
34
  "typeScriptVersion": "4.4",
35
35
  "exports": {
36
36
  ".": {
three/src/Three.d.ts CHANGED
@@ -3,7 +3,6 @@
3
3
  */
4
4
  export * from './constants';
5
5
  export * from './Three.Legacy';
6
- export * from './utils';
7
6
  /**
8
7
  * Animation
9
8
  */
@@ -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.
@@ -9,7 +9,7 @@ import { WebGLRenderLists } from './webgl/WebGLRenderLists';
9
9
  import { WebGLState } from './webgl/WebGLState';
10
10
  import { Vector2 } from './../math/Vector2';
11
11
  import { Vector4 } from './../math/Vector4';
12
- import { Color } from './../math/Color';
12
+ import { Color, ColorRepresentation } from './../math/Color';
13
13
  import { WebGLRenderTarget } from './WebGLRenderTarget';
14
14
  import { WebGLMultipleRenderTargets } from './WebGLMultipleRenderTargets';
15
15
  import { Object3D } from './../core/Object3D';
@@ -22,7 +22,6 @@ import { Data3DTexture } from '../textures/Data3DTexture';
22
22
  import { Vector3 } from '../math/Vector3';
23
23
  import { Box3 } from '../math/Box3';
24
24
  import { DataArrayTexture } from '../textures/DataArrayTexture';
25
- import { ColorRepresentation } from '../utils';
26
25
 
27
26
  export interface Renderer {
28
27
  domElement: HTMLCanvasElement;
three/src/scenes/Fog.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { ColorRepresentation } from '../utils';
2
- import { Color } from './../math/Color';
1
+ import { Color, ColorRepresentation } from './../math/Color';
3
2
 
4
3
  export interface FogBase {
5
4
  /**
@@ -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 { FogBase } from './Fog';
4
3
 
5
4
  /**
three/src/utils.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { Color, ColorKeyword } from './math/Color';
2
-
3
- export type ColorModelString = `${'rgb' | 'hsl'}(${string})`;
4
- export type HexColorString = `#${string}`;
5
-
6
- export type ColorRepresentation = Color | ColorKeyword | ColorModelString | HexColorString | number;