@weasel-js/hud 1.7.2 → 1.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/README.md CHANGED
@@ -33,11 +33,14 @@ painter is the single, explicit exception.
33
33
 
34
34
  ## HUD or DOM text?
35
35
 
36
- Measured in `tests/perf/README.md` ("HUD text against a DOM overlay"): below
37
- about 500 glyphs the choice costs nothing either way. Past that, static labels
38
- are cheaper in a DOM layer over the canvas, because a HUD re-emits every
39
- widget's text on each repaint; readouts that change every frame *and* follow the
40
- camera are cheaper here.
36
+ Measured in `tests/perf/README.md` ("HUD text against a DOM overlay"): at a
37
+ hundred glyphs the choice costs nothing either way. Past that, static labels on
38
+ a fixed camera are cheaper in a DOM layer over the canvas, because the renderer
39
+ walks every HUD text command on each repaint, and text that follows a pure pan
40
+ is cheapest in a DOM layer moved as one element. Readouts that change every
41
+ frame tie on the main thread and, from 2,500 glyphs, cost the HUD about 1 ms
42
+ less a frame across all threads, mostly in the compositor and GPU process; a React-rendered overlay costs more than
43
+ either whenever its labels change.
41
44
 
42
45
  ## License
43
46
 
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./tool-DtH159Hp.js";
1
+ import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./tool-DdwuyuMK.js";
2
2
  import { createViewportLayer as d, screenToWorld as f, viewToTransform as p } from "@weasel-js/core";
3
3
  import { createLoupeModel as m, loupeInnerView as h, loupeInnerView as g } from "@weasel-js/loupe";
4
4
  //#region src/loupe/readback.ts
@@ -1,4 +1,4 @@
1
- import { n as e, o as t, r as n } from "../tool-DtH159Hp.js";
1
+ import { n as e, o as t, r as n } from "../tool-DdwuyuMK.js";
2
2
  import { resolveTheme as r, weaselTheme as i } from "@weasel-js/theme";
3
3
  import { useEffect as a, useMemo as o, useState as s } from "react";
4
4
  import { useThemeOptional as c } from "@weasel-js/theme/react";