@koiosdigital/matrx-render 0.1.8 → 0.1.10
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.
|
@@ -9,10 +9,13 @@ import '../widget-DABrpucj.js';
|
|
|
9
9
|
* Determinism (§8): we bypass @jsquash's `init()`, which auto-selects a
|
|
10
10
|
* SIMD or non-SIMD build at runtime — two different codec builds that can
|
|
11
11
|
* emit different (equally valid) bitstreams, which would fracture the
|
|
12
|
-
* sha256/ETag across environments. Instead the
|
|
13
|
-
* explicitly
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* sha256/ETag across environments. Instead the SIMD factory is wired
|
|
13
|
+
* explicitly (~2× faster encode; Workers and Node ≥16 both support WASM
|
|
14
|
+
* SIMD) and the caller must supply that exact wasm module
|
|
15
|
+
* (`codec/enc/webp_enc_simd.wasm`): a Workers wasm-module binding in prod,
|
|
16
|
+
* a compiled module from disk in Node/tests. The invariant is ONE exact
|
|
17
|
+
* build everywhere, not which build — changing it is fine but shifts every
|
|
18
|
+
* ETag fleet-wide at once.
|
|
16
19
|
*
|
|
17
20
|
* Frames are encoded LOSSLESS. Note (documented divergence): the Go
|
|
18
21
|
* renderer's libwebp path encodes lossy-by-default; for 64×32 pixel art
|
|
@@ -22,8 +25,8 @@ import '../widget-DABrpucj.js';
|
|
|
22
25
|
*/
|
|
23
26
|
|
|
24
27
|
/**
|
|
25
|
-
* Create a FrameEncoder backed by the
|
|
26
|
-
* `wasm` must be the compiled `@jsquash/webp/codec/enc/
|
|
28
|
+
* Create a FrameEncoder backed by the SIMD @jsquash/webp codec.
|
|
29
|
+
* `wasm` must be the compiled `@jsquash/webp/codec/enc/webp_enc_simd.wasm`
|
|
27
30
|
* module (Workers binding import or WebAssembly.compile of the file).
|
|
28
31
|
*/
|
|
29
32
|
declare function jsquashFrameEncoder(wasm: WebAssembly.Module): FrameEncoder;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/encode/webp-jsquash.ts
|
|
2
|
-
import webpEncFactory from "@jsquash/webp/codec/enc/
|
|
2
|
+
import webpEncFactory from "@jsquash/webp/codec/enc/webp_enc_simd.js";
|
|
3
3
|
import webpDecFactory from "@jsquash/webp/codec/dec/webp_dec.js";
|
|
4
4
|
var ENCODE_OPTIONS = {
|
|
5
|
-
quality:
|
|
5
|
+
quality: 30,
|
|
6
6
|
target_size: 0,
|
|
7
7
|
target_PSNR: 0,
|
|
8
8
|
method: 4,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koiosdigital/matrx-render",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@jsquash/webp": "^1.5.0",
|
|
13
13
|
"fflate": "^0.8.3",
|
|
14
14
|
"jpeg-js": "^0.4.4",
|
|
15
|
-
"@koiosdigital/matrx-sdk": "0.1.
|
|
15
|
+
"@koiosdigital/matrx-sdk": "0.1.10"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "^26.1.0",
|