@thi.ng/webgl 6.9.29 → 6.9.30

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**: 2025-01-04T21:07:38Z
3
+ - **Last updated**: 2025-01-14T12:23:33Z
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.9.30](https://github.com/thi-ng/umbrella/tree/@thi.ng/webgl@6.9.30) (2025-01-14)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - use optional chaining & nullish coalescing ([c5a0a13](https://github.com/thi-ng/umbrella/commit/c5a0a13))
17
+
12
18
  ## [6.9.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/webgl@6.9.0) (2024-06-21)
13
19
 
14
20
  #### 🚀 Features
package/README.md CHANGED
@@ -101,7 +101,7 @@ Browser ESM import:
101
101
 
102
102
  [JSDelivr documentation](https://www.jsdelivr.com/)
103
103
 
104
- Package sizes (brotli'd, pre-treeshake): ESM: 11.64 KB
104
+ Package sizes (brotli'd, pre-treeshake): ESM: 11.66 KB
105
105
 
106
106
  ## Dependencies
107
107
 
package/canvas.js CHANGED
@@ -14,7 +14,7 @@ const glCanvas = (opts = {}) => {
14
14
  opts.width && (canvas.width = opts.width);
15
15
  opts.height && (canvas.height = opts.height);
16
16
  opts.autoScale !== false && adaptDPI(canvas, canvas.width, canvas.height);
17
- opts.parent && opts.parent.appendChild(canvas);
17
+ opts.parent?.appendChild(canvas);
18
18
  const gl = canvas.getContext(
19
19
  opts.version !== 1 ? "webgl2" : "webgl",
20
20
  {
package/draw.js CHANGED
@@ -11,7 +11,7 @@ const draw = (specs, opts = {}) => {
11
11
  opts.bindTex !== false && bindTextures(spec.textures);
12
12
  opts.shaderState !== false && spec.shader.prepareState();
13
13
  opts.bindShader !== false && spec.shader.bind(spec);
14
- if (indices && indices.buffer) {
14
+ if (indices?.buffer) {
15
15
  indices.buffer.bind();
16
16
  if (spec.instances) {
17
17
  __drawInstanced(gl, spec);
package/fbo.js CHANGED
@@ -13,7 +13,7 @@ class FBO {
13
13
  constructor(gl, opts) {
14
14
  this.gl = gl;
15
15
  this.fbo = gl.createFramebuffer() || error("error creating FBO");
16
- this.ext = !isGL2Context(gl) && opts && opts.tex && opts.tex.length > 1 ? gl.getExtension("WEBGL_draw_buffers") || error("missing WEBGL_draw_buffers ext") : void 0;
16
+ this.ext = !isGL2Context(gl) && opts?.tex && opts.tex.length > 1 ? gl.getExtension("WEBGL_draw_buffers") || error("missing WEBGL_draw_buffers ext") : void 0;
17
17
  this.maxAttachments = gl.getParameter(GL_MAX_COLOR_ATTACHMENTS_WEBGL);
18
18
  opts && this.configure(opts);
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/webgl",
3
- "version": "6.9.29",
3
+ "version": "6.9.30",
4
4
  "description": "WebGL & GLSL abstraction layer",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -45,21 +45,21 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@thi.ng/api": "^8.11.16",
48
- "@thi.ng/canvas": "^1.0.1",
49
- "@thi.ng/checks": "^3.6.18",
48
+ "@thi.ng/canvas": "^1.0.2",
49
+ "@thi.ng/checks": "^3.6.19",
50
50
  "@thi.ng/equiv": "^2.1.72",
51
51
  "@thi.ng/errors": "^2.5.22",
52
- "@thi.ng/logger": "^3.0.26",
53
- "@thi.ng/matrices": "^2.4.25",
52
+ "@thi.ng/logger": "^3.0.27",
53
+ "@thi.ng/matrices": "^2.4.26",
54
54
  "@thi.ng/memoize": "^4.0.6",
55
- "@thi.ng/object-utils": "^1.1.9",
56
- "@thi.ng/pixel": "^7.3.11",
57
- "@thi.ng/shader-ast": "^1.0.1",
58
- "@thi.ng/shader-ast-glsl": "^1.0.1",
59
- "@thi.ng/shader-ast-stdlib": "^1.0.1",
60
- "@thi.ng/transducers": "^9.2.12",
61
- "@thi.ng/vector-pools": "^3.2.25",
62
- "@thi.ng/vectors": "^7.12.13"
55
+ "@thi.ng/object-utils": "^1.1.10",
56
+ "@thi.ng/pixel": "^7.3.12",
57
+ "@thi.ng/shader-ast": "^1.0.2",
58
+ "@thi.ng/shader-ast-glsl": "^1.0.2",
59
+ "@thi.ng/shader-ast-stdlib": "^1.0.2",
60
+ "@thi.ng/transducers": "^9.2.13",
61
+ "@thi.ng/vector-pools": "^3.2.26",
62
+ "@thi.ng/vectors": "^7.12.14"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@microsoft/api-extractor": "^7.48.1",
@@ -229,5 +229,5 @@
229
229
  ],
230
230
  "year": 2014
231
231
  },
232
- "gitHead": "56c1d57a96565bbcc8c06c73779a619bba0db368\n"
232
+ "gitHead": "6542b842120bef47cc18d45a1b1db68307a7f04b\n"
233
233
  }