@types/three 0.158.1 → 0.158.3
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/animation/CCDIKSolver.d.ts +1 -1
- three/examples/jsm/capabilities/WebGPU.d.ts +5 -0
- three/examples/jsm/geometries/SDFGeometryGenerator.d.ts +16 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +1 -1
- three/examples/jsm/renderers/common/Animation.d.ts +16 -0
- three/examples/jsm/renderers/webgl/WebGLBackend.d.ts +8 -0
- three/examples/jsm/renderers/webgpu/WebGPUBackend.d.ts +12 -0
- three/examples/jsm/transpiler/AST.d.ts +7 -0
- three/examples/jsm/transpiler/GLSLDecoder.d.ts +7 -0
- three/examples/jsm/transpiler/ShaderToyDecoder.d.ts +3 -0
- three/examples/jsm/transpiler/TSLEncoder.d.ts +7 -0
- three/examples/jsm/transpiler/Transpiler.d.ts +5 -0
- three/package.json +2 -2
- three/src/renderers/WebGLRenderTarget.d.ts +1 -1
- three/src/renderers/shaders/UniformsLib.d.ts +1 -1
- three/src/textures/Texture.d.ts +1 -1
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: Mon,
|
|
11
|
+
* Last updated: Mon, 20 Nov 2023 23:36:24 GMT
|
|
12
12
|
* Dependencies: [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BufferGeometry, WebGLRenderer, WebGLRenderTarget } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export class SDFGeometryGenerator {
|
|
4
|
+
constructor(renderer: WebGLRenderer);
|
|
5
|
+
|
|
6
|
+
generate(res?: number, distFunc?: string, bounds?: number): BufferGeometry;
|
|
7
|
+
|
|
8
|
+
computeSDF(
|
|
9
|
+
width: number,
|
|
10
|
+
height: number,
|
|
11
|
+
tilesX: number,
|
|
12
|
+
tilesY: number,
|
|
13
|
+
bounds: number,
|
|
14
|
+
shader: string,
|
|
15
|
+
): WebGLRenderTarget;
|
|
16
|
+
}
|
|
@@ -72,7 +72,7 @@ type AnyConstructors = Construtors<any, any, any, any>;
|
|
|
72
72
|
/**
|
|
73
73
|
* Returns all constructors where the first paramter is assignable to given "scope"
|
|
74
74
|
*/
|
|
75
|
-
//
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
76
76
|
type FilterConstructorsByScope<T extends AnyConstructors, S> = {
|
|
77
77
|
a: S extends T['a'][0] ? T['a'] : undefined;
|
|
78
78
|
b: S extends T['b'][0] ? T['b'] : undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default class Animation {
|
|
2
|
+
animationLoop: ((time: DOMHighResTimeStamp) => void) | null;
|
|
3
|
+
requestId: number | null;
|
|
4
|
+
|
|
5
|
+
isAnimating: boolean;
|
|
6
|
+
|
|
7
|
+
context: Window;
|
|
8
|
+
|
|
9
|
+
constructor();
|
|
10
|
+
|
|
11
|
+
start(): void;
|
|
12
|
+
|
|
13
|
+
stop(): void;
|
|
14
|
+
|
|
15
|
+
setAnimationLoop(callback: ((time: DOMHighResTimeStamp) => void) | null): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CoordinateSystem } from '../../../../src/Three.js';
|
|
2
|
+
import Backend from '../common/Backend.js';
|
|
3
|
+
|
|
4
|
+
export default class WebGLBackend extends Backend {
|
|
5
|
+
constructor(parameters?: { canvas?: HTMLCanvasElement | undefined });
|
|
6
|
+
|
|
7
|
+
get coordinateSystem(): CoordinateSystem;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CoordinateSystem } from '../../../../src/Three.js';
|
|
2
|
+
import Backend from '../common/Backend.js';
|
|
3
|
+
|
|
4
|
+
export default class WebGPUBackend extends Backend {
|
|
5
|
+
constructor(parameters?: {
|
|
6
|
+
canvas?: HTMLCanvasElement | undefined;
|
|
7
|
+
antialias?: boolean | undefined;
|
|
8
|
+
sampleCount?: number | undefined;
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
get coordinateSystem(): CoordinateSystem;
|
|
12
|
+
}
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.158.
|
|
3
|
+
"version": "0.158.3",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,6 +44,6 @@
|
|
|
44
44
|
"fflate": "~0.6.10",
|
|
45
45
|
"meshoptimizer": "~0.18.1"
|
|
46
46
|
},
|
|
47
|
-
"typesPublisherContentHash": "
|
|
47
|
+
"typesPublisherContentHash": "63e0c6a37dc1c160eecdbe61741d097ff25ba5c1e0bd8a134ae21d23bc71b38f",
|
|
48
48
|
"typeScriptVersion": "4.5"
|
|
49
49
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Texture } from '../textures/Texture.js';
|
|
2
2
|
import { RenderTarget, RenderTargetOptions } from '../core/RenderTarget.js';
|
|
3
3
|
|
|
4
|
-
//
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
5
5
|
export interface WebGLRenderTargetOptions extends RenderTargetOptions {}
|
|
6
6
|
|
|
7
7
|
export class WebGLRenderTarget<TTexture extends Texture | Texture[] = Texture> extends RenderTarget<TTexture> {
|
|
@@ -2,7 +2,7 @@ import { Color } from '../../math/Color.js';
|
|
|
2
2
|
import { Vector2 } from '../../math/Vector2.js';
|
|
3
3
|
import { Matrix3 } from '../../math/Matrix3.js';
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
6
6
|
export interface IUniform<TValue = any> {
|
|
7
7
|
value: TValue;
|
|
8
8
|
}
|
three/src/textures/Texture.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from '../constants.js';
|
|
18
18
|
|
|
19
19
|
/** Shim for OffscreenCanvas. */
|
|
20
|
-
//
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
21
21
|
export interface OffscreenCanvas extends EventTarget {}
|
|
22
22
|
|
|
23
23
|
/**
|