@thi.ng/webgl 6.7.1 → 6.8.0

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**: 2024-03-07T20:40:47Z
3
+ - **Last updated**: 2024-03-09T09:18:17Z
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,16 @@ 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.8.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/webgl@6.8.0) (2024-03-09)
13
+
14
+ #### 🚀 Features
15
+
16
+ - add passCopyMain() multipass spec utility ([ba22536](https://github.com/thi-ng/umbrella/commit/ba22536))
17
+
18
+ #### 🩹 Bug fixes
19
+
20
+ - update readPixels() args ([458e7ff](https://github.com/thi-ng/umbrella/commit/458e7ff))
21
+
12
22
  ## [6.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/webgl@6.7.0) (2024-03-06)
13
23
 
14
24
  #### 🚀 Features
package/README.md CHANGED
@@ -100,7 +100,7 @@ For Node.js REPL:
100
100
  const webgl = await import("@thi.ng/webgl");
101
101
  ```
102
102
 
103
- Package sizes (brotli'd, pre-treeshake): ESM: 11.63 KB
103
+ Package sizes (brotli'd, pre-treeshake): ESM: 11.65 KB
104
104
 
105
105
  ## Dependencies
106
106
 
@@ -147,6 +147,7 @@ directory are using this package:
147
147
  | | Minimal multi-pass / GPGPU example | [Demo](https://demo.thi.ng/umbrella/webgl-multipass/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-multipass) |
148
148
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-shadertoy.jpg" width="240"/> | Shadertoy-like WebGL setup | [Demo](https://demo.thi.ng/umbrella/webgl-shadertoy/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-shadertoy) |
149
149
  | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-ssao.jpg" width="240"/> | WebGL screenspace ambient occlusion | [Demo](https://demo.thi.ng/umbrella/webgl-ssao/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-ssao) |
150
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-texture-paint.jpg" width="240"/> | TODO | [Demo](https://demo.thi.ng/umbrella/webgl-texture-paint/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-texture-paint) |
150
151
 
151
152
  ## API
152
153
 
package/multipass.d.ts CHANGED
@@ -15,4 +15,5 @@ export declare const defMultiPass: (opts: MultipassOpts) => Multipass;
15
15
  * @param dest -
16
16
  */
17
17
  export declare const passCopy: (src: string[], dest: string[]) => PassOpts;
18
+ export declare const passCopyMain: (src: string) => PassOpts;
18
19
  //# sourceMappingURL=multipass.d.ts.map
package/multipass.js CHANGED
@@ -186,7 +186,20 @@ const passCopy = (src, dest) => {
186
186
  outputs: dest
187
187
  };
188
188
  };
189
+ const passCopyMain = (src) => ({
190
+ fs: (gl, unis, _, outs) => [
191
+ defMain(() => [
192
+ assign(
193
+ outs.fragColor,
194
+ texelFetch(unis.input0, ivec2($xy(gl.gl_FragCoord)), INT0)
195
+ )
196
+ ])
197
+ ],
198
+ inputs: [src],
199
+ outputs: []
200
+ });
189
201
  export {
190
202
  defMultiPass,
191
- passCopy
203
+ passCopy,
204
+ passCopyMain
192
205
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/webgl",
3
- "version": "6.7.1",
3
+ "version": "6.8.0",
4
4
  "description": "WebGL & GLSL abstraction layer",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,22 +40,22 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.9.28",
44
- "@thi.ng/associative": "^6.3.46",
45
- "@thi.ng/canvas": "^0.2.9",
43
+ "@thi.ng/api": "^8.9.29",
44
+ "@thi.ng/associative": "^6.3.47",
45
+ "@thi.ng/canvas": "^0.2.10",
46
46
  "@thi.ng/checks": "^3.5.2",
47
47
  "@thi.ng/equiv": "^2.1.51",
48
48
  "@thi.ng/errors": "^2.4.20",
49
49
  "@thi.ng/logger": "^3.0.5",
50
- "@thi.ng/matrices": "^2.3.22",
51
- "@thi.ng/memoize": "^3.1.63",
52
- "@thi.ng/pixel": "^6.1.16",
53
- "@thi.ng/shader-ast": "^0.15.0",
54
- "@thi.ng/shader-ast-glsl": "^0.4.108",
55
- "@thi.ng/shader-ast-stdlib": "^0.18.0",
56
- "@thi.ng/transducers": "^8.9.10",
57
- "@thi.ng/vector-pools": "^3.1.114",
58
- "@thi.ng/vectors": "^7.10.16"
50
+ "@thi.ng/matrices": "^2.3.23",
51
+ "@thi.ng/memoize": "^3.1.64",
52
+ "@thi.ng/pixel": "^6.1.17",
53
+ "@thi.ng/shader-ast": "^0.15.1",
54
+ "@thi.ng/shader-ast-glsl": "^0.4.109",
55
+ "@thi.ng/shader-ast-stdlib": "^0.18.1",
56
+ "@thi.ng/transducers": "^8.9.11",
57
+ "@thi.ng/vector-pools": "^3.1.115",
58
+ "@thi.ng/vectors": "^7.10.17"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@microsoft/api-extractor": "^7.40.1",
@@ -220,5 +220,5 @@
220
220
  ],
221
221
  "year": 2014
222
222
  },
223
- "gitHead": "a421058a65ba76608d94129ac29451bfedaf201c\n"
223
+ "gitHead": "69100942474942f7446ac645d59d91e7dfc352f9\n"
224
224
  }
package/readpixels.d.ts CHANGED
@@ -1,4 +1,5 @@
1
+ import type { UIntArray } from "@thi.ng/api";
1
2
  import type { ITexture, ReadableTextureFormat, TextureType } from "./api/texture.js";
2
- export declare const readPixels: <T extends Uint8Array | Uint16Array | Uint32Array | Float32Array>(gl: WebGLRenderingContext, x: number, y: number, w: number, h: number, format: ReadableTextureFormat, type: TextureType, out: T) => T;
3
+ export declare const readPixels: <T extends Float32Array | UIntArray>(gl: WebGLRenderingContext, x: number, y: number, w: number, h: number, format: ReadableTextureFormat, type: TextureType, out: T) => T;
3
4
  export declare const readTexture: <T extends Uint8Array | Uint16Array | Uint32Array | Float32Array>(gl: WebGLRenderingContext, tex: ITexture, format: ReadableTextureFormat, type: TextureType, out: T) => T;
4
5
  //# sourceMappingURL=readpixels.d.ts.map