@thi.ng/shader-ast-js 0.7.25 → 0.7.26

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**: 2022-09-21T21:37:59Z
3
+ - **Last updated**: 2022-09-27T16:23:13Z
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
+ ### [0.7.26](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-js@0.7.26) (2022-09-27)
13
+
14
+ #### ⏱ Performance improvements
15
+
16
+ - pre-cache ImageData in canvasRenderer() ([ff0018f](https://github.com/thi-ng/umbrella/commit/ff0018f))
17
+
12
18
  ### [0.7.20](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-js@0.7.20) (2022-08-06)
13
19
 
14
20
  #### ⏱ Performance improvements
package/README.md CHANGED
@@ -78,7 +78,7 @@ node --experimental-repl-await
78
78
  > const shaderAstJs = await import("@thi.ng/shader-ast-js");
79
79
  ```
80
80
 
81
- Package sizes (gzipped, pre-treeshake): ESM: 7.21 KB
81
+ Package sizes (gzipped, pre-treeshake): ESM: 7.24 KB
82
82
 
83
83
  ## Dependencies
84
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/shader-ast-js",
3
- "version": "0.7.25",
3
+ "version": "0.7.26",
4
4
  "description": "Customizable JS codegen, compiler & runtime for @thi.ng/shader-ast",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,11 +37,11 @@
37
37
  "@thi.ng/api": "^8.4.2",
38
38
  "@thi.ng/checks": "^3.2.5",
39
39
  "@thi.ng/errors": "^2.2.0",
40
- "@thi.ng/math": "^5.3.8",
41
- "@thi.ng/matrices": "^2.1.24",
42
- "@thi.ng/pixel": "^3.4.14",
43
- "@thi.ng/shader-ast": "^0.12.20",
44
- "@thi.ng/vectors": "^7.5.15"
40
+ "@thi.ng/math": "^5.3.9",
41
+ "@thi.ng/matrices": "^2.1.25",
42
+ "@thi.ng/pixel": "^4.0.0",
43
+ "@thi.ng/shader-ast": "^0.12.21",
44
+ "@thi.ng/vectors": "^7.5.16"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@microsoft/api-extractor": "^7.31.1",
@@ -147,5 +147,5 @@
147
147
  ],
148
148
  "year": 2019
149
149
  },
150
- "gitHead": "973139c5aa3b50081020f4cc726a7cc330f77fc7\n"
150
+ "gitHead": "f4c59114f2d2dfafa9014626038a9ec5242b0606\n"
151
151
  }
package/runtime.js CHANGED
@@ -85,8 +85,9 @@ export const renderBuffer = (fn, buf, x = 0, y = 0, w, h, bufOffsetX = 0, bufOff
85
85
  */
86
86
  export const canvasRenderer = (canvas) => {
87
87
  const buf = intBufferFromCanvas(canvas);
88
+ const data = new ImageData(canvas.width, canvas.height);
88
89
  return (fn, x = 0, y = 0, w = canvas.width, h = canvas.height) => {
89
90
  renderBuffer(fn, buf, x, y, w, h);
90
- buf.blitCanvas(canvas);
91
+ buf.blitCanvas(canvas, { data });
91
92
  };
92
93
  };