@thi.ng/webgl 6.9.28 → 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 +7 -1
- package/README.md +2 -2
- package/canvas.js +1 -1
- package/draw.js +1 -1
- package/fbo.js +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**:
|
|
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.
|
|
104
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 11.66 KB
|
|
105
105
|
|
|
106
106
|
## Dependencies
|
|
107
107
|
|
|
@@ -181,4 +181,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
181
181
|
|
|
182
182
|
## License
|
|
183
183
|
|
|
184
|
-
© 2014 -
|
|
184
|
+
© 2014 - 2025 Karsten Schmidt // Apache License 2.0
|
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
|
|
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
|
|
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
|
|
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.
|
|
3
|
+
"version": "6.9.30",
|
|
4
4
|
"description": "WebGL & GLSL abstraction layer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -44,22 +44,22 @@
|
|
|
44
44
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@thi.ng/api": "^8.11.
|
|
48
|
-
"@thi.ng/canvas": "^0.
|
|
49
|
-
"@thi.ng/checks": "^3.6.
|
|
50
|
-
"@thi.ng/equiv": "^2.1.
|
|
51
|
-
"@thi.ng/errors": "^2.5.
|
|
52
|
-
"@thi.ng/logger": "^3.0.
|
|
53
|
-
"@thi.ng/matrices": "^2.4.
|
|
54
|
-
"@thi.ng/memoize": "^4.0.
|
|
55
|
-
"@thi.ng/object-utils": "^1.1.
|
|
56
|
-
"@thi.ng/pixel": "^7.3.
|
|
57
|
-
"@thi.ng/shader-ast": "^0.
|
|
58
|
-
"@thi.ng/shader-ast-glsl": "^0.
|
|
59
|
-
"@thi.ng/shader-ast-stdlib": "^0.
|
|
60
|
-
"@thi.ng/transducers": "^9.2.
|
|
61
|
-
"@thi.ng/vector-pools": "^3.2.
|
|
62
|
-
"@thi.ng/vectors": "^7.12.
|
|
47
|
+
"@thi.ng/api": "^8.11.16",
|
|
48
|
+
"@thi.ng/canvas": "^1.0.2",
|
|
49
|
+
"@thi.ng/checks": "^3.6.19",
|
|
50
|
+
"@thi.ng/equiv": "^2.1.72",
|
|
51
|
+
"@thi.ng/errors": "^2.5.22",
|
|
52
|
+
"@thi.ng/logger": "^3.0.27",
|
|
53
|
+
"@thi.ng/matrices": "^2.4.26",
|
|
54
|
+
"@thi.ng/memoize": "^4.0.6",
|
|
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": "
|
|
232
|
+
"gitHead": "6542b842120bef47cc18d45a1b1db68307a7f04b\n"
|
|
233
233
|
}
|