@thi.ng/webgl 6.3.9 → 6.3.10
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.
- package/CHANGELOG.md +1 -1
- package/README.md +2 -2
- package/buffer.d.ts +7 -7
- package/buffer.js +1 -1
- package/checks.d.ts +1 -1
- package/geo/cube.d.ts +1 -1
- package/geo/quad.d.ts +1 -1
- package/package.json +22 -22
- package/shader.d.ts +1 -1
- package/texture.d.ts +1 -1
- package/texture.js +1 -1
- package/uniforms.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ Largely declarative WebGL 1.0 / 2.0 abstraction layer, partially ported
|
|
|
72
72
|
- [@thi.ng/matrices](https://github.com/thi-ng/umbrella/tree/develop/packages/matrices) - Matrix & quaternion operations for 2D/3D geometry processing
|
|
73
73
|
- [@thi.ng/shader-ast](https://github.com/thi-ng/umbrella/tree/develop/packages/shader-ast) - DSL to define shader code in TypeScript and cross-compile to GLSL, JS and other targets
|
|
74
74
|
- [@thi.ng/soa](https://github.com/thi-ng/umbrella/tree/develop/packages/soa) - SOA & AOS memory mapped structured views with optional & extensible serialization
|
|
75
|
-
- [@thi.ng/vectors](https://github.com/thi-ng/umbrella/tree/develop/packages/vectors) - Optimized 2d/3d/4d and arbitrary length vector operations
|
|
75
|
+
- [@thi.ng/vectors](https://github.com/thi-ng/umbrella/tree/develop/packages/vectors) - Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts
|
|
76
76
|
- [@thi.ng/vector-pools](https://github.com/thi-ng/umbrella/tree/develop/packages/vector-pools) - Data structures for managing & working with strided, memory mapped vectors
|
|
77
77
|
|
|
78
78
|
## Installation
|
|
@@ -95,7 +95,7 @@ For Node.js REPL:
|
|
|
95
95
|
const webgl = await import("@thi.ng/webgl");
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 11.
|
|
98
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 11.31 KB
|
|
99
99
|
|
|
100
100
|
## Dependencies
|
|
101
101
|
|
package/buffer.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { TypedArray } from "@thi.ng/api/typedarray";
|
|
1
|
+
import { type TypedArray } from "@thi.ng/api/typedarray";
|
|
2
2
|
import type { AttribPool } from "@thi.ng/vector-pools";
|
|
3
|
-
import type {
|
|
4
|
-
import { ModelAttributeSpecs, ModelSpec } from "./api/model.js";
|
|
3
|
+
import type { IWebGLBuffer, IndexBufferSpec } from "./api/buffers.js";
|
|
4
|
+
import { type ModelAttributeSpecs, type ModelSpec } from "./api/model.js";
|
|
5
5
|
export declare class WebGLArrayBuffer<T extends TypedArray> implements IWebGLBuffer<T> {
|
|
6
6
|
gl: WebGLRenderingContext;
|
|
7
7
|
buffer: WebGLBuffer;
|
|
8
8
|
target: number;
|
|
9
9
|
mode: number;
|
|
10
10
|
data?: T;
|
|
11
|
-
constructor(gl: WebGLRenderingContext, data?: T, target?:
|
|
11
|
+
constructor(gl: WebGLRenderingContext, data?: T, target?: GLenum, mode?: GLenum, retain?: boolean);
|
|
12
12
|
bind(): boolean;
|
|
13
13
|
unbind(): boolean;
|
|
14
14
|
release(): boolean;
|
|
@@ -24,9 +24,9 @@ export declare class WebGLArrayBuffer<T extends TypedArray> implements IWebGLBuf
|
|
|
24
24
|
set(data: T, mode?: number): void;
|
|
25
25
|
setChunk(data: T, byteOffset?: number): void;
|
|
26
26
|
}
|
|
27
|
-
export declare const defBuffer: (gl: WebGLRenderingContext, data?: TypedArray, target?:
|
|
28
|
-
export declare const compileModel: (gl: WebGLRenderingContext, spec: ModelSpec, mode?:
|
|
27
|
+
export declare const defBuffer: (gl: WebGLRenderingContext, data?: TypedArray, target?: 34962, mode?: 35044) => WebGLArrayBuffer<Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array>;
|
|
28
|
+
export declare const compileModel: (gl: WebGLRenderingContext, spec: ModelSpec, mode?: 35044) => ModelSpec;
|
|
29
29
|
export declare const compileIndices: (gl: WebGLRenderingContext, index: IndexBufferSpec | undefined, mode?: GLenum) => IndexBufferSpec | undefined;
|
|
30
30
|
export declare const compileVAO: (gl: WebGLRenderingContext, spec: ModelSpec) => WebGLVertexArrayObject | undefined;
|
|
31
|
-
export declare const compileAttribPool: (gl: WebGLRenderingContext, pool: AttribPool, ids?: string[], target?:
|
|
31
|
+
export declare const compileAttribPool: (gl: WebGLRenderingContext, pool: AttribPool, ids?: string[], target?: 34962, mode?: 35044) => ModelAttributeSpecs;
|
|
32
32
|
//# sourceMappingURL=buffer.d.ts.map
|
package/buffer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BIT_SHIFTS, asGLType, typedArrayType, } from "@thi.ng/api/typedarray";
|
|
2
2
|
import { DrawMode, } from "./api/model.js";
|
|
3
3
|
import { isGL2Context } from "./checks.js";
|
|
4
4
|
import { error } from "./error.js";
|
package/checks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ITexture } from "./api/texture.js";
|
|
1
|
+
import { type ITexture } from "./api/texture.js";
|
|
2
2
|
export declare const isGL2Context: (gl: WebGLRenderingContext | WebGL2RenderingContext) => gl is WebGL2RenderingContext;
|
|
3
3
|
export declare const isFloatTexture: (tex: ITexture) => boolean;
|
|
4
4
|
//# sourceMappingURL=checks.d.ts.map
|
package/geo/cube.d.ts
CHANGED
package/geo/quad.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/webgl",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.10",
|
|
4
4
|
"description": "WebGL & GLSL abstraction layer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -38,30 +38,30 @@
|
|
|
38
38
|
"test": "testament test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@thi.ng/adapt-dpi": "^2.2.
|
|
42
|
-
"@thi.ng/api": "^8.7.
|
|
43
|
-
"@thi.ng/associative": "^6.2.
|
|
44
|
-
"@thi.ng/checks": "^3.3.
|
|
45
|
-
"@thi.ng/equiv": "^2.1.
|
|
46
|
-
"@thi.ng/errors": "^2.2.
|
|
47
|
-
"@thi.ng/logger": "^1.4.
|
|
48
|
-
"@thi.ng/matrices": "^2.1.
|
|
49
|
-
"@thi.ng/memoize": "^3.1.
|
|
50
|
-
"@thi.ng/pixel": "^4.1.
|
|
51
|
-
"@thi.ng/shader-ast": "^0.12.
|
|
52
|
-
"@thi.ng/shader-ast-glsl": "^0.4.
|
|
53
|
-
"@thi.ng/shader-ast-stdlib": "^0.13.
|
|
54
|
-
"@thi.ng/transducers": "^8.4.
|
|
55
|
-
"@thi.ng/vector-pools": "^3.1.
|
|
56
|
-
"@thi.ng/vectors": "^7.6.
|
|
41
|
+
"@thi.ng/adapt-dpi": "^2.2.10",
|
|
42
|
+
"@thi.ng/api": "^8.7.5",
|
|
43
|
+
"@thi.ng/associative": "^6.2.33",
|
|
44
|
+
"@thi.ng/checks": "^3.3.11",
|
|
45
|
+
"@thi.ng/equiv": "^2.1.21",
|
|
46
|
+
"@thi.ng/errors": "^2.2.14",
|
|
47
|
+
"@thi.ng/logger": "^1.4.12",
|
|
48
|
+
"@thi.ng/matrices": "^2.1.51",
|
|
49
|
+
"@thi.ng/memoize": "^3.1.28",
|
|
50
|
+
"@thi.ng/pixel": "^4.1.11",
|
|
51
|
+
"@thi.ng/shader-ast": "^0.12.47",
|
|
52
|
+
"@thi.ng/shader-ast-glsl": "^0.4.47",
|
|
53
|
+
"@thi.ng/shader-ast-stdlib": "^0.13.10",
|
|
54
|
+
"@thi.ng/transducers": "^8.4.1",
|
|
55
|
+
"@thi.ng/vector-pools": "^3.1.52",
|
|
56
|
+
"@thi.ng/vectors": "^7.6.10"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@microsoft/api-extractor": "^7.34.4",
|
|
60
|
-
"@thi.ng/testament": "^0.3.
|
|
61
|
-
"rimraf": "^4.4.
|
|
60
|
+
"@thi.ng/testament": "^0.3.14",
|
|
61
|
+
"rimraf": "^4.4.1",
|
|
62
62
|
"tools": "^0.0.1",
|
|
63
|
-
"typedoc": "^0.23.
|
|
64
|
-
"typescript": "^
|
|
63
|
+
"typedoc": "^0.23.28",
|
|
64
|
+
"typescript": "^5.0.2"
|
|
65
65
|
},
|
|
66
66
|
"keywords": [
|
|
67
67
|
"2d",
|
|
@@ -219,5 +219,5 @@
|
|
|
219
219
|
],
|
|
220
220
|
"year": 2014
|
|
221
221
|
},
|
|
222
|
-
"gitHead": "
|
|
222
|
+
"gitHead": "83b15b34326d480cbca0472b20390d4d3bbb792a\n"
|
|
223
223
|
}
|
package/shader.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IObjectOf } from "@thi.ng/api";
|
|
2
2
|
import { GLSLVersion } from "@thi.ng/shader-ast-glsl/api";
|
|
3
3
|
import type { ModelAttributeSpecs, ModelSpec } from "./api/model.js";
|
|
4
|
-
import { DefShaderOpts, IShader, ShaderAttrib, ShaderSpec, ShaderState, ShaderType, ShaderUniforms, UniformValues } from "./api/shader.js";
|
|
4
|
+
import { type DefShaderOpts, type IShader, type ShaderAttrib, type ShaderSpec, type ShaderState, type ShaderType, type ShaderUniforms, type UniformValues } from "./api/shader.js";
|
|
5
5
|
export declare class Shader implements IShader {
|
|
6
6
|
gl: WebGLRenderingContext;
|
|
7
7
|
program: WebGLProgram;
|
package/texture.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextureFilter, TextureFormat, TextureRepeat, TextureTarget, TextureType, type ITexture, type TextureOpts } from "./api/texture.js";
|
|
2
2
|
export declare const bindTextures: (textures?: ITexture[]) => void;
|
|
3
3
|
export declare const unbindTextures: (textures?: ITexture[]) => void;
|
|
4
4
|
export declare class Texture implements ITexture {
|
package/texture.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withoutKeysObj } from "@thi.ng/associative/without-keys";
|
|
2
2
|
import { isArray } from "@thi.ng/checks/is-array";
|
|
3
|
-
import { TextureFilter, TextureFormat, TextureRepeat, TextureTarget,
|
|
3
|
+
import { TEX_FORMATS, TextureFilter, TextureFormat, TextureRepeat, TextureTarget, TextureType, } from "./api/texture.js";
|
|
4
4
|
import { isGL2Context } from "./checks.js";
|
|
5
5
|
import { error } from "./error.js";
|
|
6
6
|
const $bind = (op) => (textures) => {
|
package/uniforms.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Fn, Fn3, IObjectOf } from "@thi.ng/api";
|
|
2
|
-
import { ReadonlyVec } from "@thi.ng/vectors/api";
|
|
2
|
+
import { type ReadonlyVec } from "@thi.ng/vectors/api";
|
|
3
3
|
import type { UniformValue } from "./api/shader.js";
|
|
4
4
|
export declare const UNIFORM_SETTERS: IObjectOf<Fn3<WebGLRenderingContext, WebGLUniformLocation, number | ReadonlyVec | undefined, Fn<UniformValue | undefined | null, void>>>;
|
|
5
5
|
//# sourceMappingURL=uniforms.d.ts.map
|