@oh-just-another/renderer-canvas 0.58.0 → 0.59.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 +32 -0
- package/README.md +60 -15
- package/dist/.tsbuildinfo +1 -1
- package/dist/canvas-target.d.ts.map +1 -1
- package/dist/canvas-target.js +6 -3
- package/dist/canvas-target.js.map +1 -1
- package/dist/constants.d.ts +32 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +32 -0
- package/dist/constants.js.map +1 -1
- package/dist/hi-dpi.d.ts +12 -14
- package/dist/hi-dpi.d.ts.map +1 -1
- package/dist/hi-dpi.js +18 -34
- package/dist/hi-dpi.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -10
- package/dist/index.js.map +1 -1
- package/dist/layered-surface.js +6 -5
- package/dist/layered-surface.js.map +1 -1
- package/dist/recording-target.d.ts +49 -13
- package/dist/recording-target.d.ts.map +1 -1
- package/dist/recording-target.js +93 -19
- package/dist/recording-target.js.map +1 -1
- package/dist/render-worker.js +16 -3
- package/dist/render-worker.js.map +1 -1
- package/dist/webgl-helpers.d.ts +7 -0
- package/dist/webgl-helpers.d.ts.map +1 -0
- package/dist/webgl-helpers.js +32 -0
- package/dist/webgl-helpers.js.map +1 -0
- package/dist/webgl2-curve.d.ts.map +1 -1
- package/dist/webgl2-curve.js +4 -36
- package/dist/webgl2-curve.js.map +1 -1
- package/dist/webgl2-ellipse.d.ts.map +1 -1
- package/dist/webgl2-ellipse.js +4 -35
- package/dist/webgl2-ellipse.js.map +1 -1
- package/dist/webgl2-msdf-text.d.ts.map +1 -1
- package/dist/webgl2-msdf-text.js +4 -35
- package/dist/webgl2-msdf-text.js.map +1 -1
- package/dist/webgl2-stroke.d.ts +1 -1
- package/dist/webgl2-stroke.d.ts.map +1 -1
- package/dist/webgl2-stroke.js +1 -6
- package/dist/webgl2-stroke.js.map +1 -1
- package/dist/webgl2-target.d.ts +11 -1
- package/dist/webgl2-target.d.ts.map +1 -1
- package/dist/webgl2-target.js +51 -67
- package/dist/webgl2-target.js.map +1 -1
- package/package.json +9 -8
package/dist/constants.d.ts
CHANGED
|
@@ -34,6 +34,27 @@ export declare const LARGE_SCENE_WORKER_THRESHOLD = 50000;
|
|
|
34
34
|
* text renders through an atlas, without an OffscreenCanvas round-trip.
|
|
35
35
|
*/
|
|
36
36
|
export declare const WEBGL2_TEXT_BITMAP_CACHE_CAP = 256;
|
|
37
|
+
/**
|
|
38
|
+
* LRU cap on the offscreen image cache shared by `RecordingTarget`
|
|
39
|
+
* (main thread, identity → id) and the render worker (id → ImageBitmap).
|
|
40
|
+
*
|
|
41
|
+
* The offscreen backend re-renders every frame so animated GIF / video
|
|
42
|
+
* frames are picked up; without this cache each frame re-posts (clones)
|
|
43
|
+
* every drawn `ImageBitmap` across the worker boundary. With it, a bitmap
|
|
44
|
+
* is shipped once under a stable id and later referenced by id alone —
|
|
45
|
+
* the GIF adapter returns the same cached bitmap for a frame held across
|
|
46
|
+
* several rAF ticks, so the per-tick redraw costs one tiny command.
|
|
47
|
+
*
|
|
48
|
+
* Both sides keep an LRU of identical capacity, so they evict the same
|
|
49
|
+
* id in lockstep (the command stream drives both in the same order);
|
|
50
|
+
* the worker also closes the evicted bitmap clone to release memory.
|
|
51
|
+
*
|
|
52
|
+
* 64 — a scene rarely has more than 10-20 distinct images in flight at
|
|
53
|
+
* once; a 3-6x margin covers a short GIF loop's frames without thrashing.
|
|
54
|
+
* On overflow the coldest image is dropped; its next draw re-ships the
|
|
55
|
+
* bitmap (one extra clone) and re-inserts.
|
|
56
|
+
*/
|
|
57
|
+
export declare const OFFSCREEN_IMAGE_CACHE_CAP = 64;
|
|
37
58
|
/**
|
|
38
59
|
* LRU cap on `WebGL2Target.textures` — image-source to WebGLTexture
|
|
39
60
|
* cache used by `drawImage`. Each entry holds a GPU texture
|
|
@@ -49,4 +70,15 @@ export declare const WEBGL2_TEXT_BITMAP_CACHE_CAP = 256;
|
|
|
49
70
|
* cost).
|
|
50
71
|
*/
|
|
51
72
|
export declare const WEBGL2_IMAGE_TEXTURE_CACHE_CAP = 64;
|
|
73
|
+
/**
|
|
74
|
+
* Lower bound on the polygon approximation of an ellipse. Keeps small
|
|
75
|
+
* ellipses from collapsing to a coarse hexagon at far zoom. Range: 12–48.
|
|
76
|
+
*/
|
|
77
|
+
export declare const ELLIPSE_MIN_SEGMENTS = 24;
|
|
78
|
+
/**
|
|
79
|
+
* Upper bound on the polygon approximation of an ellipse. Caps GPU work
|
|
80
|
+
* for huge ellipses where extra segments yield invisible pixel-error
|
|
81
|
+
* improvement. Range: 256–1024.
|
|
82
|
+
*/
|
|
83
|
+
export declare const ELLIPSE_MAX_SEGMENTS = 512;
|
|
52
84
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -34,6 +34,27 @@ export const LARGE_SCENE_WORKER_THRESHOLD = 50_000;
|
|
|
34
34
|
* text renders through an atlas, without an OffscreenCanvas round-trip.
|
|
35
35
|
*/
|
|
36
36
|
export const WEBGL2_TEXT_BITMAP_CACHE_CAP = 256;
|
|
37
|
+
/**
|
|
38
|
+
* LRU cap on the offscreen image cache shared by `RecordingTarget`
|
|
39
|
+
* (main thread, identity → id) and the render worker (id → ImageBitmap).
|
|
40
|
+
*
|
|
41
|
+
* The offscreen backend re-renders every frame so animated GIF / video
|
|
42
|
+
* frames are picked up; without this cache each frame re-posts (clones)
|
|
43
|
+
* every drawn `ImageBitmap` across the worker boundary. With it, a bitmap
|
|
44
|
+
* is shipped once under a stable id and later referenced by id alone —
|
|
45
|
+
* the GIF adapter returns the same cached bitmap for a frame held across
|
|
46
|
+
* several rAF ticks, so the per-tick redraw costs one tiny command.
|
|
47
|
+
*
|
|
48
|
+
* Both sides keep an LRU of identical capacity, so they evict the same
|
|
49
|
+
* id in lockstep (the command stream drives both in the same order);
|
|
50
|
+
* the worker also closes the evicted bitmap clone to release memory.
|
|
51
|
+
*
|
|
52
|
+
* 64 — a scene rarely has more than 10-20 distinct images in flight at
|
|
53
|
+
* once; a 3-6x margin covers a short GIF loop's frames without thrashing.
|
|
54
|
+
* On overflow the coldest image is dropped; its next draw re-ships the
|
|
55
|
+
* bitmap (one extra clone) and re-inserts.
|
|
56
|
+
*/
|
|
57
|
+
export const OFFSCREEN_IMAGE_CACHE_CAP = 64;
|
|
37
58
|
/**
|
|
38
59
|
* LRU cap on `WebGL2Target.textures` — image-source to WebGLTexture
|
|
39
60
|
* cache used by `drawImage`. Each entry holds a GPU texture
|
|
@@ -49,4 +70,15 @@ export const WEBGL2_TEXT_BITMAP_CACHE_CAP = 256;
|
|
|
49
70
|
* cost).
|
|
50
71
|
*/
|
|
51
72
|
export const WEBGL2_IMAGE_TEXTURE_CACHE_CAP = 64;
|
|
73
|
+
/**
|
|
74
|
+
* Lower bound on the polygon approximation of an ellipse. Keeps small
|
|
75
|
+
* ellipses from collapsing to a coarse hexagon at far zoom. Range: 12–48.
|
|
76
|
+
*/
|
|
77
|
+
export const ELLIPSE_MIN_SEGMENTS = 24;
|
|
78
|
+
/**
|
|
79
|
+
* Upper bound on the polygon approximation of an ellipse. Caps GPU work
|
|
80
|
+
* for huge ellipses where extra segments yield invisible pixel-error
|
|
81
|
+
* improvement. Range: 256–1024.
|
|
82
|
+
*/
|
|
83
|
+
export const ELLIPSE_MAX_SEGMENTS = 512;
|
|
52
84
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC"}
|
package/dist/hi-dpi.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Configures a `<canvas>` for hi-DPI rendering. Sets the bitmap size to
|
|
3
|
-
* `width * dpr` × `height * dpr`, the CSS size to `width` × `height`, and
|
|
4
|
-
* context transform to `scale(dpr, dpr)`
|
|
5
|
-
* CSS pixels. Returns the DPR used so
|
|
3
|
+
* `width * dpr` × `height * dpr`, the CSS size to `width` × `height`, and
|
|
4
|
+
* (when `setupContext` is true) the 2D context transform to `scale(dpr, dpr)`
|
|
5
|
+
* so subsequent draw calls operate in CSS pixels. Returns the DPR used so
|
|
6
|
+
* callers can recompute on monitor changes.
|
|
6
7
|
*
|
|
7
8
|
* IDEMPOTENT: assigning `canvas.width` / `canvas.height` resets both
|
|
8
9
|
* the bitmap AND the context transform — even when the new value equals
|
|
@@ -10,17 +11,14 @@
|
|
|
10
11
|
* the same size on attach; without the guard each tick would wipe the
|
|
11
12
|
* existing canvas content. We early-return when bitmap + CSS size +
|
|
12
13
|
* DPR are already exactly right.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* `webgl2` poisons the slot and every subsequent `getContext("webgl2")`
|
|
21
|
-
* returns null. Use this for the WebGL2 main canvas in
|
|
22
|
-
* `WebGL2LayeredSurface`; the WebGL2 viewport is set inside
|
|
14
|
+
*
|
|
15
|
+
* `setupContext` (default `true`): when `false`, skips the `getContext("2d")`
|
|
16
|
+
* + `setTransform` step for canvases destined for a non-2D context (WebGL2,
|
|
17
|
+
* WebGPU). `HTMLCanvasElement` only ever yields one *kind* of context, so
|
|
18
|
+
* touching `2d` on a canvas headed for `webgl2` poisons the slot and every
|
|
19
|
+
* subsequent `getContext("webgl2")` returns null. Use `false` for the WebGL2
|
|
20
|
+
* main canvas in `WebGL2LayeredSurface`; its viewport is set inside
|
|
23
21
|
* `WebGL2Target` after the GL context is obtained.
|
|
24
22
|
*/
|
|
25
|
-
export declare const
|
|
23
|
+
export declare const setupHiDpi: (canvas: HTMLCanvasElement, width: number, height: number, dpr?: number, setupContext?: boolean) => number;
|
|
26
24
|
//# sourceMappingURL=hi-dpi.d.ts.map
|
package/dist/hi-dpi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hi-dpi.d.ts","sourceRoot":"","sources":["../src/hi-dpi.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hi-dpi.d.ts","sourceRoot":"","sources":["../src/hi-dpi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,iBAAiB,EACzB,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,MAAK,MAAqC,EAC1C,sBAAmB,KAClB,MAuBF,CAAC"}
|
package/dist/hi-dpi.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Configures a `<canvas>` for hi-DPI rendering. Sets the bitmap size to
|
|
3
|
-
* `width * dpr` × `height * dpr`, the CSS size to `width` × `height`, and
|
|
4
|
-
* context transform to `scale(dpr, dpr)`
|
|
5
|
-
* CSS pixels. Returns the DPR used so
|
|
3
|
+
* `width * dpr` × `height * dpr`, the CSS size to `width` × `height`, and
|
|
4
|
+
* (when `setupContext` is true) the 2D context transform to `scale(dpr, dpr)`
|
|
5
|
+
* so subsequent draw calls operate in CSS pixels. Returns the DPR used so
|
|
6
|
+
* callers can recompute on monitor changes.
|
|
6
7
|
*
|
|
7
8
|
* IDEMPOTENT: assigning `canvas.width` / `canvas.height` resets both
|
|
8
9
|
* the bitmap AND the context transform — even when the new value equals
|
|
@@ -10,39 +11,16 @@
|
|
|
10
11
|
* the same size on attach; without the guard each tick would wipe the
|
|
11
12
|
* existing canvas content. We early-return when bitmap + CSS size +
|
|
12
13
|
* DPR are already exactly right.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
canvas.height === targetH &&
|
|
21
|
-
canvas.style.width === cssW &&
|
|
22
|
-
canvas.style.height === cssH) {
|
|
23
|
-
return dpr;
|
|
24
|
-
}
|
|
25
|
-
canvas.width = targetW;
|
|
26
|
-
canvas.height = targetH;
|
|
27
|
-
canvas.style.width = cssW;
|
|
28
|
-
canvas.style.height = cssH;
|
|
29
|
-
const ctx = canvas.getContext("2d");
|
|
30
|
-
if (!ctx)
|
|
31
|
-
throw new Error("Failed to obtain 2D context");
|
|
32
|
-
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
33
|
-
return dpr;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Hi-DPI sizing for canvases that will host a non-2D context (WebGL2,
|
|
37
|
-
* WebGPU). Same bitmap + CSS dimensions as `setupHiDpi`, but skips
|
|
38
|
-
* the `getContext("2d")` call — `HTMLCanvasElement` only ever yields
|
|
39
|
-
* one *kind* of context, so touching `2d` on a canvas destined for
|
|
40
|
-
* `webgl2` poisons the slot and every subsequent `getContext("webgl2")`
|
|
41
|
-
* returns null. Use this for the WebGL2 main canvas in
|
|
42
|
-
* `WebGL2LayeredSurface`; the WebGL2 viewport is set inside
|
|
14
|
+
*
|
|
15
|
+
* `setupContext` (default `true`): when `false`, skips the `getContext("2d")`
|
|
16
|
+
* + `setTransform` step for canvases destined for a non-2D context (WebGL2,
|
|
17
|
+
* WebGPU). `HTMLCanvasElement` only ever yields one *kind* of context, so
|
|
18
|
+
* touching `2d` on a canvas headed for `webgl2` poisons the slot and every
|
|
19
|
+
* subsequent `getContext("webgl2")` returns null. Use `false` for the WebGL2
|
|
20
|
+
* main canvas in `WebGL2LayeredSurface`; its viewport is set inside
|
|
43
21
|
* `WebGL2Target` after the GL context is obtained.
|
|
44
22
|
*/
|
|
45
|
-
export const
|
|
23
|
+
export const setupHiDpi = (canvas, width, height, dpr = window.devicePixelRatio || 1, setupContext = true) => {
|
|
46
24
|
const targetW = Math.round(width * dpr);
|
|
47
25
|
const targetH = Math.round(height * dpr);
|
|
48
26
|
const cssW = `${width}px`;
|
|
@@ -57,6 +35,12 @@ export const setupHiDpiNoContext = (canvas, width, height, dpr = window.devicePi
|
|
|
57
35
|
canvas.height = targetH;
|
|
58
36
|
canvas.style.width = cssW;
|
|
59
37
|
canvas.style.height = cssH;
|
|
38
|
+
if (setupContext) {
|
|
39
|
+
const ctx = canvas.getContext("2d");
|
|
40
|
+
if (!ctx)
|
|
41
|
+
throw new Error("Failed to obtain 2D context");
|
|
42
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
43
|
+
}
|
|
60
44
|
return dpr;
|
|
61
45
|
};
|
|
62
46
|
//# sourceMappingURL=hi-dpi.js.map
|
package/dist/hi-dpi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hi-dpi.js","sourceRoot":"","sources":["../src/hi-dpi.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hi-dpi.js","sourceRoot":"","sources":["../src/hi-dpi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,MAAyB,EACzB,KAAa,EACb,MAAc,EACd,MAAc,MAAM,CAAC,gBAAgB,IAAI,CAAC,EAC1C,YAAY,GAAG,IAAI,EACX,EAAE;IACV,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;IACxC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;IACzC,MAAM,IAAI,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,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,20 +6,14 @@ export { setupHiDpi } from "./hi-dpi.js";
|
|
|
6
6
|
export { LayeredCanvas } from "./layered-canvas.js";
|
|
7
7
|
export { supportsOffscreenCanvas, createOffscreenCanvas2DTarget, transferCanvasToWorker, } from "./offscreen.js";
|
|
8
8
|
export { createRenderWorker } from "./worker-factory.js";
|
|
9
|
-
// WorkerPool / LayerWorkerPool live in @oh-just-another/renderer-workers
|
|
10
|
-
// (backend-neutral primitives don't belong in the Canvas-specific package).
|
|
11
|
-
// Re-export to keep existing imports working.
|
|
12
9
|
export { WorkerPool, LayerWorkerPool } from "@oh-just-another/renderer-workers";
|
|
13
10
|
export { RecordingTarget, replayCommands } from "./recording-target.js";
|
|
14
11
|
export { createLayeredSurface, createLayeredSurfaceWithFallback, } from "./layered-surface.js";
|
|
15
12
|
export { isWebGPUAvailable, isWebGL2Available, pickAvailableBackend } from "./webgpu-detect.js";
|
|
16
13
|
export { LARGE_SCENE_WORKER_THRESHOLD } from "./constants.js";
|
|
17
|
-
// `installBuiltinRenderers` and `wrapText` live in
|
|
18
|
-
// `@oh-just-another/renderer-core` so the SVG / headless backends can share them.
|
|
19
|
-
// These re-exports keep existing imports working.
|
|
20
14
|
export { installBuiltinRenderers, wrapText } from "@oh-just-another/renderer-core";
|
|
21
|
-
// `installBuiltinRenderers()` must be called once before
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
15
|
+
// `installBuiltinRenderers()` must be called once before built-in shapes
|
|
16
|
+
// can be drawn. It is not auto-invoked so this package stays
|
|
17
|
+
// `sideEffects: false` and tree-shakeable. Hosts typically call it in
|
|
18
|
+
// their entry file.
|
|
25
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"m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AAoB,CAAC;AAChG,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGnF,yEAAyE;AACzE,6DAA6D;AAC7D,sEAAsE;AACtE,oBAAoB"}
|
package/dist/layered-surface.js
CHANGED
|
@@ -2,7 +2,7 @@ import { LAYER_ORDER } from "@oh-just-another/renderer-core";
|
|
|
2
2
|
import { LayeredCanvas } from "./layered-canvas.js";
|
|
3
3
|
import { WebGL2Target } from "./webgl2-target.js";
|
|
4
4
|
import { RecordingTarget } from "./recording-target.js";
|
|
5
|
-
import {
|
|
5
|
+
import { setupHiDpi } from "./hi-dpi.js";
|
|
6
6
|
/**
|
|
7
7
|
* Factory entry point. Picks the right backend implementation, builds
|
|
8
8
|
* it, and returns the common `LayeredSurface` interface. Canvas2D is
|
|
@@ -121,9 +121,9 @@ class WebGL2LayeredSurface {
|
|
|
121
121
|
host.insertBefore(canvas, overlay);
|
|
122
122
|
// Never call `getContext("2d")` on this canvas: the WebGL2 slot is
|
|
123
123
|
// exclusive — one canvas, one context kind, for the life of the
|
|
124
|
-
// element. `
|
|
124
|
+
// element. `setupContext: false` sizes the bitmap without touching
|
|
125
125
|
// the context.
|
|
126
|
-
|
|
126
|
+
setupHiDpi(canvas, width, height, window.devicePixelRatio || 1, false);
|
|
127
127
|
try {
|
|
128
128
|
this.mainCanvas = canvas;
|
|
129
129
|
this.mainTarget = new WebGL2Target(canvas, width, height);
|
|
@@ -150,7 +150,7 @@ class WebGL2LayeredSurface {
|
|
|
150
150
|
this._width = width;
|
|
151
151
|
this._height = height;
|
|
152
152
|
this.base.resize(width, height);
|
|
153
|
-
|
|
153
|
+
setupHiDpi(this.mainCanvas, width, height, window.devicePixelRatio || 1, false);
|
|
154
154
|
this.mainTarget.resize(width, height);
|
|
155
155
|
}
|
|
156
156
|
get size() {
|
|
@@ -176,7 +176,8 @@ class WebGL2LayeredSurface {
|
|
|
176
176
|
* overlay (pointer-following handles) sees one rAF of delay
|
|
177
177
|
* because the worker draws after the main thread yields.
|
|
178
178
|
* • Memory: 3× workers, each owning a DPR-sized OffscreenCanvas.
|
|
179
|
-
* • drawImage
|
|
179
|
+
* • drawImage records `ImageBitmap` sources; other source types are
|
|
180
|
+
* skipped and counted on the `RecordingTarget`.
|
|
180
181
|
*/
|
|
181
182
|
class OffscreenLayeredSurface {
|
|
182
183
|
backend = "offscreen";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layered-surface.js","sourceRoot":"","sources":["../src/layered-surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqC,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"layered-surface.js","sourceRoot":"","sources":["../src/layered-surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAqC,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA0DzC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAiB,EACjB,KAAa,EACb,MAAc,EACd,UAAuC,EAAE,EACzB,EAAE;IAClB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,UAAU,CAAC;IAC9C,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,UAAU;YACb,OAAO,IAAI,sBAAsB,CAAC,IAAI,EAAE,KAAK,EA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CAAC;IACD,OAAO;QACL,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YAAE,MAAM,CAAC,SAAS,EAAE,CAAC;QAC/D,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YAAE,MAAM,CAAC,MAAM,EAAE,CAAC;QAC7D,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Bounds, Color, Transform } from "@oh-just-another/types";
|
|
2
|
-
import type
|
|
2
|
+
import { LruCache, type FillRule, type LineCap, type LineJoin, type RenderTarget, type TextAlign, type TextBaseline } from "@oh-just-another/renderer-core";
|
|
3
3
|
/**
|
|
4
4
|
* Backend-agnostic RenderTarget that captures every method call as a
|
|
5
5
|
* structured command. Powers the "offscreen" pipeline: the main thread
|
|
@@ -126,19 +126,35 @@ export type RenderCommand = {
|
|
|
126
126
|
readonly k: "resize";
|
|
127
127
|
readonly w: number;
|
|
128
128
|
readonly h: number;
|
|
129
|
+
} | {
|
|
130
|
+
readonly k: "defineImage";
|
|
131
|
+
readonly id: number;
|
|
132
|
+
readonly bitmap: ImageBitmap;
|
|
133
|
+
} | {
|
|
134
|
+
readonly k: "drawImage";
|
|
135
|
+
readonly id: number;
|
|
136
|
+
readonly dx: number;
|
|
137
|
+
readonly dy: number;
|
|
138
|
+
readonly dw: number;
|
|
139
|
+
readonly dh: number;
|
|
129
140
|
};
|
|
130
141
|
/**
|
|
131
|
-
* `drawImage`
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* back to main-thread compositing for image-heavy scenes).
|
|
142
|
+
* `drawImage` records `ImageBitmap` sources — they survive the
|
|
143
|
+
* postMessage boundary and are replayed onto the worker's canvas. Other
|
|
144
|
+
* source types (HTMLImageElement, HTMLCanvasElement) are skipped and
|
|
145
|
+
* counted in `skippedImageDraws` so the host UI can warn (or fall back
|
|
146
|
+
* to main-thread compositing for image-heavy scenes).
|
|
137
147
|
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
148
|
+
* To avoid re-shipping the same bitmap every frame (the offscreen path
|
|
149
|
+
* re-renders each frame so GIF / video advance), bitmaps are interned by
|
|
150
|
+
* identity to a stable numeric id: the first draw emits a `defineImage`
|
|
151
|
+
* carrying the bitmap, later draws of the same bitmap emit only a tiny
|
|
152
|
+
* `drawImage` referencing the id. An LRU bounds the live set; the worker
|
|
153
|
+
* mirrors the same-capacity LRU, so both evict the same id in lockstep.
|
|
154
|
+
*
|
|
155
|
+
* `measureText` measures on a hidden 2D context with the active font, so
|
|
156
|
+
* caret / selection geometry lines up with the text the worker draws —
|
|
157
|
+
* without routing each call across the worker boundary.
|
|
142
158
|
*/
|
|
143
159
|
export declare class RecordingTarget implements RenderTarget {
|
|
144
160
|
private commands;
|
|
@@ -146,6 +162,19 @@ export declare class RecordingTarget implements RenderTarget {
|
|
|
146
162
|
private _height;
|
|
147
163
|
/** Counter so hosts can warn when images are silently skipped. */
|
|
148
164
|
skippedImageDraws: number;
|
|
165
|
+
/** Current font as a CSS shorthand, mirrored from `setFont` for `measureText`. */
|
|
166
|
+
private fontSpec;
|
|
167
|
+
/** Hidden 2D context used to measure text with the active font. */
|
|
168
|
+
private measureCtx;
|
|
169
|
+
/**
|
|
170
|
+
* Identity → id intern table for shipped bitmaps. Persists across
|
|
171
|
+
* `flush()` (the worker keeps its mirror across replays); bounded by an
|
|
172
|
+
* LRU of {@link OFFSCREEN_IMAGE_CACHE_CAP} so a long animation can't grow
|
|
173
|
+
* it without bound. Ids are monotonic and never reused, so an evicted
|
|
174
|
+
* bitmap that reappears is simply re-defined under a fresh id.
|
|
175
|
+
*/
|
|
176
|
+
private readonly imageIds;
|
|
177
|
+
private nextImageId;
|
|
149
178
|
constructor(width: number, height: number);
|
|
150
179
|
get size(): {
|
|
151
180
|
readonly width: number;
|
|
@@ -190,7 +219,8 @@ export declare class RecordingTarget implements RenderTarget {
|
|
|
190
219
|
measureText(text: string): {
|
|
191
220
|
width: number;
|
|
192
221
|
};
|
|
193
|
-
|
|
222
|
+
private ensureMeasureCtx;
|
|
223
|
+
drawImage(image: unknown, dx: number, dy: number, dw: number, dh: number, _dynamic?: boolean): void;
|
|
194
224
|
clear(bounds?: Bounds): void;
|
|
195
225
|
markDirty(bounds: Bounds): void;
|
|
196
226
|
}
|
|
@@ -198,6 +228,12 @@ export declare class RecordingTarget implements RenderTarget {
|
|
|
198
228
|
* Replay a previously-flushed command buffer onto a real RenderTarget.
|
|
199
229
|
* Used by the worker entry point to apply commands shipped from the
|
|
200
230
|
* main thread.
|
|
231
|
+
*
|
|
232
|
+
* `images` holds the bitmaps interned by {@link RecordingTarget}: a
|
|
233
|
+
* `defineImage` stores one under its id, a `drawImage` looks it up. The
|
|
234
|
+
* caller (worker) owns this cache so it survives across replays and
|
|
235
|
+
* mirrors the recorder's same-capacity LRU. When omitted (callers with
|
|
236
|
+
* no image commands) a throwaway cache is used.
|
|
201
237
|
*/
|
|
202
|
-
export declare const replayCommands: (target: RenderTarget, commands: readonly RenderCommand[]) => void;
|
|
238
|
+
export declare const replayCommands: (target: RenderTarget, commands: readonly RenderCommand[], images?: LruCache<number, ImageBitmap>) => void;
|
|
203
239
|
//# sourceMappingURL=recording-target.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recording-target.d.ts","sourceRoot":"","sources":["../src/recording-target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"recording-target.d.ts","sourceRoot":"","sources":["../src/recording-target.ts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