@types/three 0.142.0 → 0.143.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 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: Tue, 19 Jul 2022 15:32:21 GMT
11
+ * Last updated: Thu, 28 Jul 2022 16:32:18 GMT
12
12
  * Dependencies: [@types/webxr](https://npmjs.com/package/@types/webxr)
13
13
  * Global values: `THREE`
14
14
 
@@ -0,0 +1,13 @@
1
+ import { Mesh, IcosahedronGeometry, ShaderMaterial, Texture } from '../../../src/Three';
2
+
3
+ export class GroundProjectedEnv extends Mesh<IcosahedronGeometry, ShaderMaterial> {
4
+ constructor(texture: Texture, options?: { height?: number; radius?: number });
5
+
6
+ set radius(radius: number);
7
+
8
+ get radius(): number;
9
+
10
+ set height(height: number);
11
+
12
+ get height(): number;
13
+ }
@@ -0,0 +1,3 @@
1
+ export class FlakesTexture extends HTMLCanvasElement {
2
+ constructor(width?: number, height?: number);
3
+ }
three/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for three 0.142
1
+ // Type definitions for three 0.143
2
2
  // Project: https://threejs.org/
3
3
  // Definitions by: Josh Ellis <https://github.com/joshuaellis>
4
4
  // Nathan Bierema <https://github.com/Methuselah96>
three/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/three",
3
- "version": "0.142.0",
3
+ "version": "0.143.0",
4
4
  "description": "TypeScript definitions for three",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
6
6
  "license": "MIT",
@@ -27,6 +27,6 @@
27
27
  "dependencies": {
28
28
  "@types/webxr": "*"
29
29
  },
30
- "typesPublisherContentHash": "d187945f6b769add03311f684cc4c99011ebd1d56bd6d32f2636d9dac50f5052",
30
+ "typesPublisherContentHash": "2bd0a51b5f45c12a91bfe51f4e168b8c1ee7815e8f870ba4861a9e839d92d8f2",
31
31
  "typeScriptVersion": "4.0"
32
32
  }
three/src/Three.d.ts CHANGED
@@ -16,7 +16,8 @@ export * from './animation/tracks/BooleanKeyframeTrack';
16
16
  export * from './animation/PropertyMixer';
17
17
  export * from './animation/PropertyBinding';
18
18
  export * from './animation/KeyframeTrack';
19
- export * from './animation/AnimationUtils';
19
+ import * as AnimationUtils from './animation/AnimationUtils';
20
+ export { AnimationUtils };
20
21
  export * from './animation/AnimationObjectGroup';
21
22
  export * from './animation/AnimationMixer';
22
23
  export * from './animation/AnimationClip';
@@ -42,6 +43,7 @@ export * from './cameras/Camera';
42
43
  * Core
43
44
  */
44
45
  export * from './core/Uniform';
46
+ export * from './core/UniformsGroup';
45
47
  export * from './core/InstancedBufferGeometry';
46
48
  export * from './core/BufferGeometry';
47
49
  export * from './core/InterleavedBufferAttribute';
@@ -207,6 +209,7 @@ export * from './renderers/webgl/WebGLShadowMap';
207
209
  export * from './renderers/webgl/WebGLState';
208
210
  export * from './renderers/webgl/WebGLTextures';
209
211
  export * from './renderers/webgl/WebGLUniforms';
212
+ export * from './renderers/webgl/WebGLUniformsGroups';
210
213
  export * from './renderers/webxr/WebXRController';
211
214
  export * from './renderers/webxr/WebXRManager';
212
215
  export { WebGLUtils } from './renderers/webgl/WebGLUtils.js';
@@ -1,38 +1,36 @@
1
1
  import { AnimationClip } from './AnimationClip';
2
2
 
3
- export namespace AnimationUtils {
4
- function arraySlice(array: any, from: number, to: number): any;
5
- function convertArray(array: any, type: any, forceClone: boolean): any;
6
- function isTypedArray(object: any): boolean;
7
- function getKeyframeOrder(times: number[]): number[];
8
- function sortedArray(values: any[], stride: number, order: number[]): any[];
9
- function flattenJSON(jsonKeys: string[], times: any[], values: any[], valuePropertyName: string): void;
3
+ export function arraySlice(array: any, from: number, to: number): any;
4
+ export function convertArray(array: any, type: any, forceClone: boolean): any;
5
+ export function isTypedArray(object: any): boolean;
6
+ export function getKeyframeOrder(times: number[]): number[];
7
+ export function sortedArray(values: any[], stride: number, order: number[]): any[];
8
+ export function flattenJSON(jsonKeys: string[], times: any[], values: any[], valuePropertyName: string): void;
10
9
 
11
- /**
12
- * @param sourceClip
13
- * @param name
14
- * @param startFrame
15
- * @param endFrame
16
- * @param [fps=30]
17
- */
18
- function subclip(
19
- sourceClip: AnimationClip,
20
- name: string,
21
- startFrame: number,
22
- endFrame: number,
23
- fps?: number,
24
- ): AnimationClip;
10
+ /**
11
+ * @param sourceClip
12
+ * @param name
13
+ * @param startFrame
14
+ * @param endFrame
15
+ * @param [fps=30]
16
+ */
17
+ export function subclip(
18
+ sourceClip: AnimationClip,
19
+ name: string,
20
+ startFrame: number,
21
+ endFrame: number,
22
+ fps?: number,
23
+ ): AnimationClip;
25
24
 
26
- /**
27
- * @param targetClip
28
- * @param [referenceFrame=0]
29
- * @param [referenceClip=targetClip]
30
- * @param [fps=30]
31
- */
32
- function makeClipAdditive(
33
- targetClip: AnimationClip,
34
- referenceFrame?: number,
35
- referenceClip?: AnimationClip,
36
- fps?: number,
37
- ): AnimationClip;
38
- }
25
+ /**
26
+ * @param targetClip
27
+ * @param [referenceFrame=0]
28
+ * @param [referenceClip=targetClip]
29
+ * @param [fps=30]
30
+ */
31
+ export function makeClipAdditive(
32
+ targetClip: AnimationClip,
33
+ referenceFrame?: number,
34
+ referenceClip?: AnimationClip,
35
+ fps?: number,
36
+ ): AnimationClip;
@@ -0,0 +1,27 @@
1
+ import { EventDispatcher } from './EventDispatcher';
2
+ import { Uniform } from './Uniform';
3
+
4
+ import { Usage } from '../constants';
5
+
6
+ export class UniformsGroup extends EventDispatcher {
7
+ isUniformsGroup: true;
8
+ id: number;
9
+ usage: Usage;
10
+ uniforms: Uniform[];
11
+
12
+ constructor();
13
+
14
+ add(uniform: Uniform): this;
15
+
16
+ remove(uniform: Uniform): this;
17
+
18
+ setName(name: string): this;
19
+
20
+ setUsage(value: Usage): this;
21
+
22
+ dispose(): this;
23
+
24
+ copy(source: UniformsGroup): this;
25
+
26
+ clone(): UniformsGroup;
27
+ }
@@ -1,5 +1,10 @@
1
+ import { Uniform } from '../../core/Uniform';
2
+ import { UniformsGroup } from '../../core/UniformsGroup';
3
+
1
4
  export function cloneUniforms(uniforms_src: any): any;
2
- export function mergeUniforms(uniforms: any[]): any;
5
+ export function mergeUniforms(uniforms: any): any;
6
+
7
+ export function cloneUniformsGroups(src: UniformsGroup[]): UniformsGroup[];
3
8
 
4
9
  export namespace UniformsUtils {
5
10
  export { mergeUniforms as merge, cloneUniforms as clone };
@@ -0,0 +1,17 @@
1
+ import { UniformsGroup } from '../../core/UniformsGroup';
2
+
3
+ import { WebGLCapabilities } from './WebGLCapabilities';
4
+ import { WebGLInfo } from './WebGLInfo';
5
+ import { WebGLProgram } from './WebGLProgram';
6
+ import { WebGLState } from './WebGLState';
7
+
8
+ export function WebGLUniformsGroups(
9
+ gl: WebGLRenderingContext,
10
+ info: WebGLInfo,
11
+ capabilities: WebGLCapabilities,
12
+ state: WebGLState,
13
+ ): {
14
+ dispose: () => void;
15
+ update: (uniformsGroup: UniformsGroup, program: WebGLProgram) => void;
16
+ bind: (uniformsGroup: UniformsGroup, program: WebGLProgram) => void;
17
+ };