@thi.ng/webgl 6.6.5 → 6.6.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2023-10-30T14:31:56Z
3
+ - **Last updated**: 2023-11-09T10:28:19Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [6.6.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/webgl@6.6.6) (2023-11-09)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
17
+
12
18
  ## [6.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/webgl@6.6.0) (2023-10-25)
13
19
 
14
20
  #### 🚀 Features
package/README.md CHANGED
@@ -96,7 +96,7 @@ For Node.js REPL:
96
96
  const webgl = await import("@thi.ng/webgl");
97
97
  ```
98
98
 
99
- Package sizes (brotli'd, pre-treeshake): ESM: 11.41 KB
99
+ Package sizes (brotli'd, pre-treeshake): ESM: 11.60 KB
100
100
 
101
101
  ## Dependencies
102
102
 
package/buffer.js CHANGED
@@ -3,6 +3,11 @@ import { DrawMode, } from "./api/model.js";
3
3
  import { isGL2Context } from "./checks.js";
4
4
  import { error } from "./error.js";
5
5
  export class WebGLArrayBuffer {
6
+ gl;
7
+ buffer;
8
+ target;
9
+ mode;
10
+ data;
6
11
  constructor(gl, data, target = gl.ARRAY_BUFFER, mode = gl.STATIC_DRAW, retain = false) {
7
12
  this.gl = gl;
8
13
  this.buffer = gl.createBuffer() || error("error creating WebGL buffer");
package/error.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare const WebGLError: {
4
4
  name: string;
5
5
  message: string;
6
6
  stack?: string | undefined;
7
+ cause?: unknown;
7
8
  };
8
9
  captureStackTrace(targetObject: object, constructorOpt?: Function | undefined): void;
9
10
  prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
package/fbo.js CHANGED
@@ -20,6 +20,10 @@ const GL_MAX_COLOR_ATTACHMENTS_WEBGL = 0x8cdf;
20
20
  * https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_draw_buffers
21
21
  */
22
22
  export class FBO {
23
+ gl;
24
+ fbo;
25
+ ext;
26
+ maxAttachments;
23
27
  constructor(gl, opts) {
24
28
  this.gl = gl;
25
29
  this.fbo = gl.createFramebuffer() || error("error creating FBO");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/webgl",
3
- "version": "6.6.5",
3
+ "version": "6.6.8",
4
4
  "description": "WebGL & GLSL abstraction layer",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -32,35 +32,34 @@
32
32
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc api geo shaders textures",
33
33
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
34
34
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
35
- "doc:readme": "yarn doc:stats && tools:readme",
36
- "doc:stats": "tools:module-stats",
35
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
37
36
  "pub": "yarn npm publish --access public",
38
- "test": "testament test"
37
+ "test": "bun test"
39
38
  },
40
39
  "dependencies": {
41
- "@thi.ng/adapt-dpi": "^2.2.22",
42
- "@thi.ng/api": "^8.9.6",
43
- "@thi.ng/associative": "^6.3.17",
44
- "@thi.ng/checks": "^3.4.6",
45
- "@thi.ng/equiv": "^2.1.31",
46
- "@thi.ng/errors": "^2.4.0",
47
- "@thi.ng/logger": "^1.4.22",
48
- "@thi.ng/matrices": "^2.2.6",
49
- "@thi.ng/memoize": "^3.1.40",
50
- "@thi.ng/pixel": "^4.3.2",
51
- "@thi.ng/shader-ast": "^0.12.78",
52
- "@thi.ng/shader-ast-glsl": "^0.4.78",
53
- "@thi.ng/shader-ast-stdlib": "^0.16.3",
54
- "@thi.ng/transducers": "^8.8.8",
55
- "@thi.ng/vector-pools": "^3.1.83",
56
- "@thi.ng/vectors": "^7.8.2"
40
+ "@thi.ng/adapt-dpi": "^2.2.24",
41
+ "@thi.ng/api": "^8.9.8",
42
+ "@thi.ng/associative": "^6.3.20",
43
+ "@thi.ng/checks": "^3.4.8",
44
+ "@thi.ng/equiv": "^2.1.33",
45
+ "@thi.ng/errors": "^2.4.2",
46
+ "@thi.ng/logger": "^1.4.24",
47
+ "@thi.ng/matrices": "^2.2.9",
48
+ "@thi.ng/memoize": "^3.1.42",
49
+ "@thi.ng/pixel": "^5.0.0",
50
+ "@thi.ng/shader-ast": "^0.12.81",
51
+ "@thi.ng/shader-ast-glsl": "^0.4.81",
52
+ "@thi.ng/shader-ast-stdlib": "^0.16.6",
53
+ "@thi.ng/transducers": "^8.8.11",
54
+ "@thi.ng/vector-pools": "^3.1.86",
55
+ "@thi.ng/vectors": "^7.8.5"
57
56
  },
58
57
  "devDependencies": {
59
- "@microsoft/api-extractor": "^7.38.0",
60
- "@thi.ng/testament": "^0.3.24",
58
+ "@microsoft/api-extractor": "^7.38.2",
59
+ "@thi.ng/testament": "^0.4.1",
61
60
  "rimraf": "^5.0.5",
62
61
  "tools": "^0.0.1",
63
- "typedoc": "^0.25.2",
62
+ "typedoc": "^0.25.3",
64
63
  "typescript": "^5.2.2"
65
64
  },
66
65
  "keywords": [
@@ -219,5 +218,5 @@
219
218
  ],
220
219
  "year": 2014
221
220
  },
222
- "gitHead": "336bd1bf95825b3c318a3ab49c54451c94aaa883\n"
221
+ "gitHead": "2be4c38c9680da929339bd164acfb69ebb1fd3d0\n"
223
222
  }
package/rbo.js CHANGED
@@ -1,5 +1,10 @@
1
1
  import { error } from "./error.js";
2
2
  export class RBO {
3
+ gl;
4
+ buffer;
5
+ format;
6
+ width;
7
+ height;
3
8
  constructor(gl, opts) {
4
9
  this.gl = gl;
5
10
  this.buffer = gl.createRenderbuffer() || error("error creating RBO");
package/shader.js CHANGED
@@ -21,9 +21,14 @@ import { GLSL_HEADER, NO_PREFIXES, SYNTAX } from "./syntax.js";
21
21
  import { UNIFORM_SETTERS } from "./uniforms.js";
22
22
  const ERROR_REGEXP = /ERROR: \d+:(\d+): (.*)/;
23
23
  export class Shader {
24
+ gl;
25
+ program;
26
+ attribs;
27
+ uniforms;
28
+ state;
29
+ warnAttrib = doOnce((id) => LOGGER.warn(`unknown attrib: ${id} (no further warnings will be shown...)`));
30
+ warnUni = doOnce((id) => LOGGER.warn(`unknown uniform: ${id} (no further warnings will be shown...)`));
24
31
  constructor(gl, program, attribs, uniforms, state) {
25
- this.warnAttrib = doOnce((id) => LOGGER.warn(`unknown attrib: ${id} (no further warnings will be shown...)`));
26
- this.warnUni = doOnce((id) => LOGGER.warn(`unknown uniform: ${id} (no further warnings will be shown...)`));
27
32
  this.gl = gl;
28
33
  this.program = program;
29
34
  this.attribs = attribs;
package/texture.js CHANGED
@@ -13,6 +13,14 @@ const $bind = (op) => (textures) => {
13
13
  export const bindTextures = $bind("bind");
14
14
  export const unbindTextures = $bind("unbind");
15
15
  export class Texture {
16
+ gl;
17
+ tex;
18
+ target;
19
+ format;
20
+ filter;
21
+ wrap;
22
+ type;
23
+ size;
16
24
  constructor(gl, opts = {}) {
17
25
  this.gl = gl;
18
26
  this.tex = gl.createTexture() || error("error creating WebGL texture");