@thi.ng/wasm-api-webgl 1.0.12 → 1.0.15
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/README.md +2 -2
- package/gl.js +5 -5
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 211 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -60,7 +60,7 @@ Browser ESM import:
|
|
|
60
60
|
|
|
61
61
|
[JSDelivr documentation](https://www.jsdelivr.com/)
|
|
62
62
|
|
|
63
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 2.
|
|
63
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 2.27 KB
|
|
64
64
|
|
|
65
65
|
## Dependencies
|
|
66
66
|
|
package/gl.js
CHANGED
|
@@ -74,21 +74,21 @@ class WasmWebGL {
|
|
|
74
74
|
createShader: (ctxID, addr) => {
|
|
75
75
|
const buildAttribs = (spec2) => {
|
|
76
76
|
const attribs = {};
|
|
77
|
-
for (
|
|
77
|
+
for (const att of spec2.attribs) {
|
|
78
78
|
attribs[att.name.deref()] = ShaderAttribType[att.type];
|
|
79
79
|
}
|
|
80
80
|
return attribs;
|
|
81
81
|
};
|
|
82
82
|
const buildVarying = (spec2) => {
|
|
83
83
|
const varyings = {};
|
|
84
|
-
for (
|
|
84
|
+
for (const v of spec2.varying) {
|
|
85
85
|
varyings[v.name.deref()] = ShaderAttribType[v.type];
|
|
86
86
|
}
|
|
87
87
|
return varyings;
|
|
88
88
|
};
|
|
89
89
|
const buildUniforms = (spec2) => {
|
|
90
90
|
const uniforms = {};
|
|
91
|
-
for (
|
|
91
|
+
for (const uni of spec2.uniforms) {
|
|
92
92
|
uniforms[uni.name.deref()] = [
|
|
93
93
|
UniformType[uni.type],
|
|
94
94
|
uni.default[UniformType[uni.type]]
|
|
@@ -113,7 +113,7 @@ class WasmWebGL {
|
|
|
113
113
|
createModel: (ctxID, addr) => {
|
|
114
114
|
const buildAttribs = (specs) => {
|
|
115
115
|
const attribs = {};
|
|
116
|
-
for (
|
|
116
|
+
for (const att of specs) {
|
|
117
117
|
attribs[att.name.deref()] = {
|
|
118
118
|
type: att.type,
|
|
119
119
|
size: att.size,
|
|
@@ -126,7 +126,7 @@ class WasmWebGL {
|
|
|
126
126
|
};
|
|
127
127
|
const buildUniforms = (specs) => {
|
|
128
128
|
const uniforms = {};
|
|
129
|
-
for (
|
|
129
|
+
for (const uni of specs) {
|
|
130
130
|
uniforms[uni.name.deref()] = uni.value[UniformType[uni.type]];
|
|
131
131
|
}
|
|
132
132
|
return uniforms;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/wasm-api-webgl",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "WebGL bridge API for hybrid TypeScript & WASM (Zig) applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.12.
|
|
44
|
-
"@thi.ng/errors": "^2.5.
|
|
45
|
-
"@thi.ng/wasm-api": "^2.4.
|
|
46
|
-
"@thi.ng/wasm-api-dom": "^2.0.
|
|
47
|
-
"@thi.ng/webgl": "^6.9.
|
|
43
|
+
"@thi.ng/api": "^8.12.10",
|
|
44
|
+
"@thi.ng/errors": "^2.5.50",
|
|
45
|
+
"@thi.ng/wasm-api": "^2.4.12",
|
|
46
|
+
"@thi.ng/wasm-api-dom": "^2.0.13",
|
|
47
|
+
"@thi.ng/webgl": "^6.9.90"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@thi.ng/wasm-api-bindgen": "^1.2.
|
|
50
|
+
"@thi.ng/wasm-api-bindgen": "^1.2.57",
|
|
51
51
|
"esbuild": "^0.27.0",
|
|
52
52
|
"typedoc": "^0.28.14",
|
|
53
53
|
"typescript": "^5.9.3"
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"tag": "wasm",
|
|
100
100
|
"year": 2024
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
|
|
103
103
|
}
|