@ignifx/ui 0.2.1 → 0.3.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/dist/index.d.ts +35 -248
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -38
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/skills/ui/SKILL.md +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -877,21 +877,9 @@ export declare class I18nService {
|
|
|
877
877
|
//#endregion
|
|
878
878
|
//#region src/augmentation.d.ts
|
|
879
879
|
/**
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
* Two mechanics carry over from `@ignifx/input` and `@ignifx/2d`, both measured rather than assumed:
|
|
885
|
-
*
|
|
886
|
-
* - The module **must** import something from `@ignifx/core`. A `declare module "@ignifx/core"`
|
|
887
|
-
* block in a file that never imports the module is `TS2664: Invalid module name in augmentation`
|
|
888
|
-
* under both `tsc --build` and TypeDoc; importing the `ExtensionContext` type used below is
|
|
889
|
-
* enough to bring the module into the program.
|
|
890
|
-
* - The barrel **must** name this module in a bare `import "./augmentation.js"`. Declaration
|
|
891
|
-
* bundling drops a module whose only exports are unreferenced from the public surface, which
|
|
892
|
-
* silently takes the augmentation out of `dist/index.d.ts` with it. The bare import is a
|
|
893
|
-
* type-only side effect: the emitted JavaScript keeps no statement for it, so `sideEffects: false`
|
|
894
|
-
* stays honest.
|
|
880
|
+
* Import core before augmenting it so TypeScript resolves the target module.
|
|
881
|
+
* Keep the barrel's bare augmentation import: declaration bundling otherwise drops these types.
|
|
882
|
+
* The augmentation emits no runtime registration (docs/architecture/03-scripting-and-components.md §7).
|
|
895
883
|
*/
|
|
896
884
|
declare module "@ignifx/core" {
|
|
897
885
|
interface App {
|
|
@@ -1940,33 +1928,8 @@ export declare const VERSION = "0.0.0";
|
|
|
1940
1928
|
//#endregion
|
|
1941
1929
|
//#region src/widgets/dialog.d.ts
|
|
1942
1930
|
/**
|
|
1943
|
-
*
|
|
1944
|
-
*
|
|
1945
|
-
*
|
|
1946
|
-
* The whole point is that a template's pause menu is two lines:
|
|
1947
|
-
*
|
|
1948
|
-
* ```ts ignore-check
|
|
1949
|
-
* const pause = new Dialog(app.ui, {
|
|
1950
|
-
* title: "Paused",
|
|
1951
|
-
* buttons: [{ id: "resume", label: "Resume" }, { id: "quit", label: "Quit" }],
|
|
1952
|
-
* });
|
|
1953
|
-
* pause.onChosen.connect((id) => {
|
|
1954
|
-
* pause.hide();
|
|
1955
|
-
* if (id === "resume") app.resume();
|
|
1956
|
-
* });
|
|
1957
|
-
* ```
|
|
1958
|
-
*
|
|
1959
|
-
* Under a headless app every method is a no-op and {@link Dialog.element} is `null`, so the same
|
|
1960
|
-
* code runs in a test.
|
|
1961
|
-
*
|
|
1962
|
-
* ## Stacking
|
|
1963
|
-
*
|
|
1964
|
-
* A dialog is modal, so it is always drawn **above** the other roots of its layer: the stylesheet
|
|
1965
|
-
* gives `.ignifx-ui-dialog` a `z-index` of `UI_DIALOG_Z_INDEX`, and {@link DialogOptions.zIndex}
|
|
1966
|
-
* overrides it per dialog. Without that rule a dialog created before a `Menu` in the same layer
|
|
1967
|
-
* paints under it — siblings with no `z-index` paint in DOM order — and the invisible backdrop
|
|
1968
|
-
* swallows every click meant for the panel on top. Two dialogs in one layer still stack in DOM
|
|
1969
|
-
* order, so the one shown last is the one on top.
|
|
1931
|
+
* Modal dialogs use a higher stacking level than menus so their panels and backdrops stay above
|
|
1932
|
+
* other layer content. Without a DOM overlay, methods are no-ops and `element` is `null`.
|
|
1970
1933
|
*/
|
|
1971
1934
|
/**
|
|
1972
1935
|
* One button in a dialog.
|
|
@@ -2078,24 +2041,9 @@ export declare class Dialog {
|
|
|
2078
2041
|
//#endregion
|
|
2079
2042
|
//#region src/widgets/loading-screen.d.ts
|
|
2080
2043
|
/**
|
|
2081
|
-
*
|
|
2082
|
-
*
|
|
2083
|
-
*
|
|
2084
|
-
* ## Where the number comes from
|
|
2085
|
-
*
|
|
2086
|
-
* `app.assets.onProgress` carries `{ loaded, total, bytesLoaded, bytesTotal }`
|
|
2087
|
-
* (`packages/core/src/assets/types.ts`). {@link progressFraction} prefers the byte counts, because
|
|
2088
|
-
* a 40 MB level and a 2 KB config are not half the work each, and falls back to the handle counts
|
|
2089
|
-
* when the build recorded no sizes. A `BatchHandle` from `app.assets.preloadGroup("boot")` reports
|
|
2090
|
-
* its own mean in `progress`, which {@link LoadingScreen.progress} also accepts.
|
|
2091
|
-
*
|
|
2092
|
-
* ## Pairing with the asset-delivery rule
|
|
2093
|
-
*
|
|
2094
|
-
* A completed load settles as soon as it finishes before `app.start()` and after `app.stop()`;
|
|
2095
|
-
* once the loop runs, delivery waits for `PreUpdate`. So a boot screen that awaits
|
|
2096
|
-
* `preloadGroup("boot").promise` **before** `start()` needs no frames, and one that loads a level
|
|
2097
|
-
* mid-game is driven by the frames the loop is already running. Neither case needs this class to
|
|
2098
|
-
* poll.
|
|
2044
|
+
* Prefer byte-weighted progress, falling back to handle counts when sizes are unknown.
|
|
2045
|
+
* Boot loads can be awaited before `app.start`; running games deliver loads in `PreUpdate`.
|
|
2046
|
+
* Both paths update through asset signals, without polling.
|
|
2099
2047
|
*/
|
|
2100
2048
|
/**
|
|
2101
2049
|
* What `new LoadingScreen(app.ui, options)` accepts.
|
|
@@ -2200,14 +2148,8 @@ export declare class LoadingScreen {
|
|
|
2200
2148
|
//#endregion
|
|
2201
2149
|
//#region src/widgets/menu-row.d.ts
|
|
2202
2150
|
/**
|
|
2203
|
-
*
|
|
2204
|
-
*
|
|
2205
|
-
*
|
|
2206
|
-
* A row is **declarative**: it says what it edits (`get`/`set`) rather than how to draw it, so the
|
|
2207
|
-
* widget can render it, adjust it with Left/Right, announce it to a screen reader, and keep the
|
|
2208
|
-
* value in step with whatever else changes it. That is the difference between this and a list of
|
|
2209
|
-
* buttons: a settings screen written as buttons has to re-implement clamping, formatting and
|
|
2210
|
-
* repeat in every game.
|
|
2151
|
+
* Rows declare the values they edit through `get` and `set`. The menu handles rendering,
|
|
2152
|
+
* clamping, formatting, and input repeat so each settings screen can share that behaviour.
|
|
2211
2153
|
*/
|
|
2212
2154
|
/**
|
|
2213
2155
|
* Text that is either fixed or re-read on every refresh.
|
|
@@ -2436,42 +2378,11 @@ export declare function formatBindingPath(path: string, unbound: string): string
|
|
|
2436
2378
|
//#endregion
|
|
2437
2379
|
//#region src/widgets/menu.d.ts
|
|
2438
2380
|
/**
|
|
2439
|
-
*
|
|
2440
|
-
*
|
|
2441
|
-
*
|
|
2442
|
-
*
|
|
2443
|
-
*
|
|
2444
|
-
* (`docs/architecture/13-ui.md` §3: *"plain DOM helper classes with no styling opinions beyond a
|
|
2445
|
-
* minimal stylesheet; templates ship their own CSS"*), and it follows the same two rules: with no
|
|
2446
|
-
* DOM overlay every method is a no-op and {@link Menu.element} is `null`, and every visible piece
|
|
2447
|
-
* carries a `UI_CLASS_NAMES` class that a game restyles.
|
|
2448
|
-
*
|
|
2449
|
-
* ## Why the widget owns the selection instead of the browser
|
|
2450
|
-
*
|
|
2451
|
-
* Every row is `tabindex="-1"` and the selected row is chosen by this class rather than by
|
|
2452
|
-
* `document.activeElement`. The reason is the gamepad: a pad produces no DOM focus events, so pad
|
|
2453
|
-
* navigation needs its own path anyway, and two focus authorities in one screen disagree the first
|
|
2454
|
-
* time a row is added or removed. The DOM focus that does exist goes to the **list**, once, which
|
|
2455
|
-
* is what lets `aria-activedescendant` tell a screen reader where the selection is and what lets
|
|
2456
|
-
* the widget read the keyboard at all. The pointer only *moves* the selection and activates it,
|
|
2457
|
-
* because a mouse already has a cursor.
|
|
2458
|
-
*
|
|
2459
|
-
* ## ARIA
|
|
2460
|
-
*
|
|
2461
|
-
* The list is `role="menu"` and its rows are `role="menuitem"`, with `role="menuitemcheckbox"` plus
|
|
2462
|
-
* `aria-checked` for a `"toggle"` row and `role="separator"` for headings and separators. `menu`
|
|
2463
|
-
* was chosen over `listbox`/`option` for two reasons: WAI-ARIA's `option` expresses only *"is in
|
|
2464
|
-
* the selection"*, so a toggle's on/off state has nowhere to live, while `menuitemcheckbox` is
|
|
2465
|
-
* exactly that state; and a menu is what this is — a list of commands the player runs, not a set of
|
|
2466
|
-
* values one of which is chosen. `aria-activedescendant` on the list expresses the roving selection
|
|
2467
|
-
* without moving focus, which both roles support.
|
|
2468
|
-
*
|
|
2469
|
-
* The one compromise is the slider row. ARIA has no `menuitemslider`, and neither `menuitem` nor
|
|
2470
|
-
* `option` may contain an interactive descendant, so the native `<input type="range">` is marked
|
|
2471
|
-
* `aria-hidden="true"` and `tabindex="-1"`: it is a pointer affordance only, it is not in the
|
|
2472
|
-
* accessibility tree, and the value reaches a screen reader through the row's own accessible name
|
|
2473
|
-
* (its label plus the formatted value), which is refreshed on every change. Left and Right on the
|
|
2474
|
-
* row adjust the value with no pointer at all.
|
|
2381
|
+
* Share one selection model across keyboard, gamepad, and pointer input.
|
|
2382
|
+
* DOM focus stays on the list; `aria-activedescendant` identifies the selected row.
|
|
2383
|
+
* Toggle rows expose `aria-checked`. Sliders expose their value through the row's accessible name;
|
|
2384
|
+
* the range input is pointer-only, while Left/Right also adjust the value.
|
|
2385
|
+
* Without a DOM overlay, methods are no-ops and `element` is `null`.
|
|
2475
2386
|
*/
|
|
2476
2387
|
/**
|
|
2477
2388
|
* What `new Menu(app.ui, options)` accepts.
|
|
@@ -2650,37 +2561,10 @@ export declare class Menu {
|
|
|
2650
2561
|
//#endregion
|
|
2651
2562
|
//#region src/widgets/menu-stack.d.ts
|
|
2652
2563
|
/**
|
|
2653
|
-
*
|
|
2654
|
-
*
|
|
2655
|
-
*
|
|
2656
|
-
*
|
|
2657
|
-
* three things games get wrong: exactly one screen is visible at a time; Escape (or the pad's east
|
|
2658
|
-
* button) unwinds exactly one level; and a held direction repeats on the **unscaled** clock, so
|
|
2659
|
-
* navigation still works while `app.pause()` has stopped the game.
|
|
2660
|
-
*
|
|
2661
|
-
* ## Why the input is an interface and not `@ignifx/input`
|
|
2662
|
-
*
|
|
2663
|
-
* `@ignifx/input` is an optional peer of `@ignifx/ui` (`docs/architecture/13-ui.md` header), and a
|
|
2664
|
-
* menu is exactly the kind of thing a game builds without it. {@link MenuNavigation} is therefore a
|
|
2665
|
-
* structural shape that an `InputAction` already satisfies — pass the actions of a `UI` action map
|
|
2666
|
-
* straight in — while a game with no input extension passes its own objects, or nothing at all and
|
|
2667
|
-
* uses the widget's own keyboard handling.
|
|
2668
|
-
*
|
|
2669
|
-
* ```ts ignore-check
|
|
2670
|
-
* const ui = app.input.actions.maps.get("UI") ?? null;
|
|
2671
|
-
* const stack = new MenuStack({
|
|
2672
|
-
* navigation: {
|
|
2673
|
-
* move: ui?.actions.get("menuMove") ?? null,
|
|
2674
|
-
* submit: ui?.actions.get("menuSubmit") ?? null,
|
|
2675
|
-
* back: ui?.actions.get("menuBack") ?? null,
|
|
2676
|
-
* },
|
|
2677
|
-
* });
|
|
2678
|
-
* ```
|
|
2679
|
-
*
|
|
2680
|
-
* A stack built with a navigation source turns each pushed menu's own keyboard handling **off**
|
|
2681
|
-
* while the menu is on the stack, and restores it on the way out: otherwise a keyboard bound to
|
|
2682
|
-
* `menuMove` would move the selection twice per press, once through the action and once through
|
|
2683
|
-
* the DOM.
|
|
2564
|
+
* Show one menu at a time and unwind one level per back action. Use unscaled time for input repeat
|
|
2565
|
+
* so navigation works while paused. Navigation accepts action-shaped objects without importing input.
|
|
2566
|
+
* When a navigation source is supplied, disable each stacked menu's keyboard handling to avoid
|
|
2567
|
+
* processing the same key twice; restore it on removal.
|
|
2684
2568
|
*/
|
|
2685
2569
|
/**
|
|
2686
2570
|
* Anything with a two-dimensional value, which `@ignifx/input`'s `InputAction` is.
|
|
@@ -2842,24 +2726,9 @@ export declare class MenuStack {
|
|
|
2842
2726
|
//#endregion
|
|
2843
2727
|
//#region src/widgets/toast.d.ts
|
|
2844
2728
|
/**
|
|
2845
|
-
*
|
|
2846
|
-
*
|
|
2847
|
-
*
|
|
2848
|
-
* ## Why the clock is the app's, not the browser's
|
|
2849
|
-
*
|
|
2850
|
-
* A toast dismisses itself after a number of **game seconds**, advanced by
|
|
2851
|
-
* {@link Toast.advance} from the game's own loop, rather than by `setTimeout`. Three reasons: it
|
|
2852
|
-
* pauses when the game pauses, it is deterministic in a headless test that steps the clock, and it
|
|
2853
|
-
* cannot fire after the app has been disposed. A game that wants wall-clock timing passes
|
|
2854
|
-
* `app.time.unscaledDeltaTime`.
|
|
2855
|
-
*
|
|
2856
|
-
* The consequence is the one thing to remember: **`app.pause()` stops `update` for every ordinary
|
|
2857
|
-
* script**, so a toast advanced from an ordinary script freezes with the game and a message shown
|
|
2858
|
-
* from a pause menu never expires. The script that calls {@link Toast.advance} declares
|
|
2859
|
-
* `static updateWhenPaused = true` and passes `app.time.unscaledDeltaTime`. `UiSystem` deliberately
|
|
2860
|
-
* does not advance toasts for you: `docs/architecture/13-ui.md` §3 defines a toast as running on
|
|
2861
|
-
* the game clock, and a system that advanced every toast would take that choice away from the game
|
|
2862
|
-
* and would have to keep a registry of every toast ever built.
|
|
2729
|
+
* The caller advances toast lifetime; no browser timer can outlive the app.
|
|
2730
|
+
* For messages that expire while paused, call `advance(app.time.unscaledDeltaTime)` from a script
|
|
2731
|
+
* with `updateWhenPaused = true`. The UI system does not advance toasts automatically.
|
|
2863
2732
|
*/
|
|
2864
2733
|
/**
|
|
2865
2734
|
* What `new Toast(app.ui, options)` accepts.
|
|
@@ -3011,18 +2880,8 @@ export declare class VirtualButton {
|
|
|
3011
2880
|
//#endregion
|
|
3012
2881
|
//#region src/widgets/virtual-device.d.ts
|
|
3013
2882
|
/**
|
|
3014
|
-
*
|
|
3015
|
-
*
|
|
3016
|
-
*
|
|
3017
|
-
* `@ignifx/input` is an **optional** peer: the overlay host, the text components, and the
|
|
3018
|
-
* localization service do not need it, and only the two touch widgets do. Importing it — even
|
|
3019
|
-
* `import type` — would pull its `declare module "@ignifx/core"` augmentation into every consumer's
|
|
3020
|
-
* program, so an app that installs `@ignifx/ui` alone would suddenly have a typed `app.input` that
|
|
3021
|
-
* does not exist at runtime. The device is therefore reached structurally: the two methods the
|
|
3022
|
-
* widgets call, found by name on `app.input.devices.virtual`.
|
|
3023
|
-
*
|
|
3024
|
-
* `VirtualDevice` satisfies {@link VirtualDeviceLike} exactly
|
|
3025
|
-
* (`packages/input/src/devices/virtual.ts`), so nothing is lost by not naming the class.
|
|
2883
|
+
* Reach virtual input through its two-method shape. Importing the optional input peer, even for
|
|
2884
|
+
* types, would augment core and expose `app.input` to games that have not installed it.
|
|
3026
2885
|
*/
|
|
3027
2886
|
/**
|
|
3028
2887
|
* The part of `@ignifx/input`'s virtual device the touch widgets use.
|
|
@@ -3068,29 +2927,9 @@ export declare function findVirtualDevice(app: App): VirtualDeviceLike | null;
|
|
|
3068
2927
|
//#endregion
|
|
3069
2928
|
//#region src/widgets/virtual-joystick.d.ts
|
|
3070
2929
|
/**
|
|
3071
|
-
*
|
|
3072
|
-
*
|
|
3073
|
-
*
|
|
3074
|
-
*
|
|
3075
|
-
* ## Replacing a template's own widget
|
|
3076
|
-
*
|
|
3077
|
-
* `templates/2d-topdown/src/touch-controls.ts` says it is *"meant to be **deleted** when
|
|
3078
|
-
* `@ignifx/ui` ships a `VirtualJoystick`… the bindings in `game.input.json`
|
|
3079
|
-
* (`<Virtual>/joystick`, `<Virtual>/interact`) do not change"*. This class writes the same two
|
|
3080
|
-
* controls with the same axis convention — screen `+Y` is down and the stick's `+Y` is up, so the
|
|
3081
|
-
* vertical axis is negated here and nowhere else — and the swap is that file's deletion plus:
|
|
3082
|
-
*
|
|
3083
|
-
* ```ts ignore-check
|
|
3084
|
-
* const stick = new VirtualJoystick(app, { control: "joystick" });
|
|
3085
|
-
* const jump = new VirtualButton(app, { control: "interact", label: "E" });
|
|
3086
|
-
* ```
|
|
3087
|
-
*
|
|
3088
|
-
* ## Multi-touch
|
|
3089
|
-
*
|
|
3090
|
-
* The stick claims exactly one `pointerId` and ignores every other pointer until that one is
|
|
3091
|
-
* released, so a thumb on the stick and a thumb on a button never fight. `pointerup` **and**
|
|
3092
|
-
* `pointercancel` both release it: a value written on `pointerdown` and never cleared would leave
|
|
3093
|
-
* the character walking for ever, which is the bug the template's own comment calls out.
|
|
2930
|
+
* Write a virtual vector control with Y up, converting screen Y-down motion here.
|
|
2931
|
+
* Claim one pointer at a time so the stick and buttons support separate touches.
|
|
2932
|
+
* Clear the control on both release and cancellation to prevent stuck movement.
|
|
3094
2933
|
*/
|
|
3095
2934
|
/**
|
|
3096
2935
|
* What `new VirtualJoystick(app, options)` accepts.
|
|
@@ -3175,28 +3014,9 @@ export declare class VirtualJoystick {
|
|
|
3175
3014
|
//#endregion
|
|
3176
3015
|
//#region src/world/anchor-math.d.ts
|
|
3177
3016
|
/**
|
|
3178
|
-
*
|
|
3179
|
-
*
|
|
3180
|
-
*
|
|
3181
|
-
* camera and no DOM.
|
|
3182
|
-
*
|
|
3183
|
-
* ## The two pixel spaces
|
|
3184
|
-
*
|
|
3185
|
-
* `Camera.worldToScreen` writes **render-target** pixels: it divides by
|
|
3186
|
-
* `RendererImpl.readTargetSize`, which is `canvas.width`/`canvas.height`
|
|
3187
|
-
* (`packages/core/src/lite/gpu/render-diagnostics-gpu.ts` 126-128). A DOM element lives in the
|
|
3188
|
-
* overlay's UI units. {@link UiPixelMapping}, built by the host from the current layout, is the
|
|
3189
|
-
* conversion, and it is applied here rather than in the system so the system does nothing but
|
|
3190
|
-
* loop.
|
|
3191
|
-
*
|
|
3192
|
-
* ## Behind the camera
|
|
3193
|
-
*
|
|
3194
|
-
* `worldToScreen` returns `false` and leaves a **mirrored** projection in `out` when the point is
|
|
3195
|
-
* behind the camera — its own documentation says the value "should be ignored". So a point behind
|
|
3196
|
-
* the camera is either hidden (`hideWhenBehindCamera`) or, when the anchor also clamps, reflected
|
|
3197
|
-
* about the viewport centre before being clamped, which pushes an off-screen marker to the correct
|
|
3198
|
-
* edge instead of the opposite one. With neither flag set it is hidden, because a mirrored
|
|
3199
|
-
* position is not a position.
|
|
3017
|
+
* Convert camera backing-store pixels to overlay units through `UiPixelMapping`.
|
|
3018
|
+
* Behind-camera projections are mirrored: hide them, or reflect before clamping to the viewport
|
|
3019
|
+
* edge. Keep the arithmetic independent of the DOM for headless tests.
|
|
3200
3020
|
*/
|
|
3201
3021
|
/**
|
|
3202
3022
|
* Everything {@link computeAnchorPlacement} reads.
|
|
@@ -3283,27 +3103,8 @@ export declare function computeAnchorPlacement(input: AnchorInput, out: AnchorPl
|
|
|
3283
3103
|
//#endregion
|
|
3284
3104
|
//#region src/world/ui-system.d.ts
|
|
3285
3105
|
/**
|
|
3286
|
-
*
|
|
3287
|
-
*
|
|
3288
|
-
* `Camera.worldToScreen`"*).
|
|
3289
|
-
*
|
|
3290
|
-
* ## Ordering
|
|
3291
|
-
*
|
|
3292
|
-
* `@ignifx/core`'s `RenderSyncSystem` runs at `PreRender` order **900**
|
|
3293
|
-
* (`packages/core/src/render/render-sync-system.ts` 63) and is what refreshes the render target's
|
|
3294
|
-
* size on every `Camera` and writes the frame's transforms onto the Lite cameras. Every projection
|
|
3295
|
-
* this system performs would be a frame stale, and would divide by last frame's viewport, if it ran
|
|
3296
|
-
* before that. {@link UI_SYNC_ORDER} is therefore **1100**: after core's sync, and inside the
|
|
3297
|
-
* `[1001, 9999]` band `RegisterSystemOptions` reserves for extensions
|
|
3298
|
-
* (`packages/core/src/app/types.ts` 649). Nothing else in the engine occupies it — physics
|
|
3299
|
-
* interpolation is at `-500`, 2D sync at `-450`, audio at `-400`.
|
|
3300
|
-
*
|
|
3301
|
-
* ## What it does
|
|
3302
|
-
*
|
|
3303
|
-
* One pass per component kind, in the order a frame needs them: create the text renderer if this is
|
|
3304
|
-
* the first frame, project every `WorldAnchor` and every `WorldText2D` once, then re-shape whatever
|
|
3305
|
-
* text changed. Projection uses the world's main camera; with no camera nothing is projected and
|
|
3306
|
-
* every anchored element is hidden, which is what a loading screen with no scene looks like.
|
|
3106
|
+
* Run after core's camera sync so projections use the current pose and render-target size.
|
|
3107
|
+
* With no main camera, hide anchored elements. Text shaping only repeats when content changes.
|
|
3307
3108
|
*/
|
|
3308
3109
|
/**
|
|
3309
3110
|
* The `PreRender` order the UI system runs at.
|
|
@@ -3369,23 +3170,9 @@ export declare class UiSystem implements System {
|
|
|
3369
3170
|
//#endregion
|
|
3370
3171
|
//#region src/world/world-anchor.d.ts
|
|
3371
3172
|
/**
|
|
3372
|
-
*
|
|
3373
|
-
*
|
|
3374
|
-
*
|
|
3375
|
-
* ## The element is the game's, not the component's
|
|
3376
|
-
*
|
|
3377
|
-
* A game creates the element — with its framework, its CSS, its accessibility attributes — mounts
|
|
3378
|
-
* it in whichever `app.ui.layer` it belongs to, and assigns it to {@link WorldAnchor.element}. The
|
|
3379
|
-
* component writes exactly three properties on it and nothing else: `position: absolute`,
|
|
3380
|
-
* `left`/`top` at the origin, and a `transform` carrying the translate and the scale. That keeps a
|
|
3381
|
-
* React tree's own rendering untouched — the anchor only ever writes inline style — and it means
|
|
3382
|
-
* an anchor with no element is simply inert.
|
|
3383
|
-
*
|
|
3384
|
-
* ## Cost
|
|
3385
|
-
*
|
|
3386
|
-
* The transform string is the one per-frame allocation and it is unavoidable: the DOM takes CSS
|
|
3387
|
-
* text. Everything else is compared first, so an anchor whose entity did not move and whose camera
|
|
3388
|
-
* did not move writes nothing at all (coding standards §7).
|
|
3173
|
+
* Position a game-owned DOM element without changing its contents or ownership.
|
|
3174
|
+
* Cache pose and camera state to avoid redundant style writes; changing a CSS transform still
|
|
3175
|
+
* requires a string allocation.
|
|
3389
3176
|
*/
|
|
3390
3177
|
/**
|
|
3391
3178
|
* An entity-to-element anchor.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/dom/layer.ts","../src/dom/dom-target.ts","../src/settings.ts","../src/dom/scaling.ts","../src/dom/host.ts","../src/i18n/locale-file.ts","../src/i18n/message.ts","../src/i18n/i18n-service.ts","../src/augmentation.ts","../src/dom/focus.ts","../src/dom/styles.ts","../src/errors.ts","../src/extension.ts","../src/i18n/loader.ts","../src/lite/text.ts","../src/schemas.ts","../src/text/hud-layout.ts","../src/text/text-component.ts","../src/text/text-runtime.ts","../src/text/hud-text.ts","../src/text/world-text.ts","../src/text/world-text-2d.ts","../src/version.ts","../src/widgets/dialog.ts","../src/widgets/loading-screen.ts","../src/widgets/menu-row.ts","../src/widgets/menu.ts","../src/widgets/menu-stack.ts","../src/widgets/toast.ts","../src/widgets/virtual-button.ts","../src/widgets/virtual-device.ts","../src/widgets/virtual-joystick.ts","../src/world/anchor-math.ts","../src/world/ui-system.ts","../src/world/world-anchor.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAkBiB;;WAEN;;WAEA;;;;;;;;;;;;;;qBAeE;;;WAEF;;;;;;;;;;;EAkBT,YAAY,cAAc,SAAS,uBAAuB,gBAAgB;;;;;;;;;;;;;;EAuB1E,OAAO,SAAS;;;;;;MAUZ,WAAW;;;;;;MASX;MAKA,OAAO;;;;;;;MAcP;MAKA,QAAQ;;;;;;;EAcZ;;;;;;;;;;;;;;;;;;;UCzHe;;WAEN,QAAQ;;WAER,UAAU;;WAEV,QAAQ;;;;;;;;;;;;;;qBCRN;;;;;;;qBAQA;;;;;;;;;;;;;;;;;KAkBD,wBAAwB;;;;;;;;;;;;;;UAenB;;WAEN,SAAS;;;;;WAKT;;;;;WAKA;;WAEA;;;;;;;;;qBAUE;;;;;;;;wBASG,qBAAqB;;;;;;;;wBAWrB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;UCxEnB;;WAEN;;WAEA;;WAEA;;WAEA;;;;;;;UAQM;;WAEN,MAAM;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;;;;;;;;;;;;;;;;;;wBA6CK,gBACd,MAAM,eACN,SAAS,kBACT,+BACC;;;;;;;;;;;;;UAyDc;;WAEN;;WAEA;;WAEA;;WAEA;;;;;;;;;;;;;;;;;;;wBAoBK,a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iBAAiB;;;;;;;;;;;;;;;;;wBA0FtC,cAAc,SAAS,gBAAgB,QAAQ,eAAe,QAAQ;;;;;;;;UCvWrE;;WAEN,KAAK;;WAEL;;;;;;;;;;;;;;qBAeE;;;;;;;;;EAwBX,YAAY,SAAS;;;;;;;;MAcjB;MAKA,OAAO;;;;;;;MAqBP;MAKA,eAAe;;;;;;MASf;;;;;;;MAUA,mBAAmB;;;;;;;;;;;;;;;;;;;;EAuBvB,KAAW,QAAQ,YAAY,eAAe,cAAc;;;;;;;EA4B5D,IAAI;;;;;;;;;;;;;;EAiBJ,EAAE,aAAa,SAAQ;;;;;;EAiBvB;;;;;;EAWA
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/dom/layer.ts","../src/dom/dom-target.ts","../src/settings.ts","../src/dom/scaling.ts","../src/dom/host.ts","../src/i18n/locale-file.ts","../src/i18n/message.ts","../src/i18n/i18n-service.ts","../src/augmentation.ts","../src/dom/focus.ts","../src/dom/styles.ts","../src/errors.ts","../src/extension.ts","../src/i18n/loader.ts","../src/lite/text.ts","../src/schemas.ts","../src/text/hud-layout.ts","../src/text/text-component.ts","../src/text/text-runtime.ts","../src/text/hud-text.ts","../src/text/world-text.ts","../src/text/world-text-2d.ts","../src/version.ts","../src/widgets/dialog.ts","../src/widgets/loading-screen.ts","../src/widgets/menu-row.ts","../src/widgets/menu.ts","../src/widgets/menu-stack.ts","../src/widgets/toast.ts","../src/widgets/virtual-button.ts","../src/widgets/virtual-device.ts","../src/widgets/virtual-joystick.ts","../src/world/anchor-math.ts","../src/world/ui-system.ts","../src/world/world-anchor.ts"],"mappings":";;;;;;;;;;;;;;;;;;UAkBiB;;WAEN;;WAEA;;;;;;;;;;;;;;qBAeE;;;WAEF;;;;;;;;;;;EAkBT,YAAY,cAAc,SAAS,uBAAuB,gBAAgB;;;;;;;;;;;;;;EAuB1E,OAAO,SAAS;;;;;;MAUZ,WAAW;;;;;;MASX;MAKA,OAAO;;;;;;;MAcP;MAKA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wBAqDc,uBAAuB,OAAO,aAAa,KAAK,kBAAkB;;;;;;;;;;;;;;;;qBC3ErE;;;;;;;UAQI;;WAEN,KAAK;;WAEL,MAAM;;WAEN,SAAS;;WAET,MAAM;;;;;;;qBAQJ,oBAAoB;;;WAEtB;;;;;;;;EAqBT,YAAY,SAAS;;;;;;;;;;;EAcrB,eAAe,QAAQ;;;;;;EASvB,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;qBC5ED,oBAAoB,qBAAqB;;;SAE7C;;SAGA;;SAGA,QAAQ;;EAGf,QAAgB;;EAGhB;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;;;;EAMA,SAAS;;EAeT;;;;;;MAUI,aAAa,SAAS;;EAK1B;;;;;;;;;;;;;;EAqBA,MACE,iBACA,iBACA,kBACA,kBACA,mBACA,oBACA,SAAS"}
|
package/dist/index.js
CHANGED
|
@@ -3151,23 +3151,9 @@ function computeAnchorPlacement(input, out) {
|
|
|
3151
3151
|
//#endregion
|
|
3152
3152
|
//#region src/world/world-anchor.ts
|
|
3153
3153
|
/**
|
|
3154
|
-
*
|
|
3155
|
-
*
|
|
3156
|
-
*
|
|
3157
|
-
* ## The element is the game's, not the component's
|
|
3158
|
-
*
|
|
3159
|
-
* A game creates the element — with its framework, its CSS, its accessibility attributes — mounts
|
|
3160
|
-
* it in whichever `app.ui.layer` it belongs to, and assigns it to {@link WorldAnchor.element}. The
|
|
3161
|
-
* component writes exactly three properties on it and nothing else: `position: absolute`,
|
|
3162
|
-
* `left`/`top` at the origin, and a `transform` carrying the translate and the scale. That keeps a
|
|
3163
|
-
* React tree's own rendering untouched — the anchor only ever writes inline style — and it means
|
|
3164
|
-
* an anchor with no element is simply inert.
|
|
3165
|
-
*
|
|
3166
|
-
* ## Cost
|
|
3167
|
-
*
|
|
3168
|
-
* The transform string is the one per-frame allocation and it is unavoidable: the DOM takes CSS
|
|
3169
|
-
* text. Everything else is compared first, so an anchor whose entity did not move and whose camera
|
|
3170
|
-
* did not move writes nothing at all (coding standards §7).
|
|
3154
|
+
* Position a game-owned DOM element without changing its contents or ownership.
|
|
3155
|
+
* Cache pose and camera state to avoid redundant style writes; changing a CSS transform still
|
|
3156
|
+
* requires a string allocation.
|
|
3171
3157
|
*/
|
|
3172
3158
|
/**
|
|
3173
3159
|
* An entity-to-element anchor.
|
|
@@ -3316,27 +3302,8 @@ function worldAnchorSchema() {
|
|
|
3316
3302
|
//#endregion
|
|
3317
3303
|
//#region src/world/ui-system.ts
|
|
3318
3304
|
/**
|
|
3319
|
-
*
|
|
3320
|
-
*
|
|
3321
|
-
* `Camera.worldToScreen`"*).
|
|
3322
|
-
*
|
|
3323
|
-
* ## Ordering
|
|
3324
|
-
*
|
|
3325
|
-
* `@ignifx/core`'s `RenderSyncSystem` runs at `PreRender` order **900**
|
|
3326
|
-
* (`packages/core/src/render/render-sync-system.ts` 63) and is what refreshes the render target's
|
|
3327
|
-
* size on every `Camera` and writes the frame's transforms onto the Lite cameras. Every projection
|
|
3328
|
-
* this system performs would be a frame stale, and would divide by last frame's viewport, if it ran
|
|
3329
|
-
* before that. {@link UI_SYNC_ORDER} is therefore **1100**: after core's sync, and inside the
|
|
3330
|
-
* `[1001, 9999]` band `RegisterSystemOptions` reserves for extensions
|
|
3331
|
-
* (`packages/core/src/app/types.ts` 649). Nothing else in the engine occupies it — physics
|
|
3332
|
-
* interpolation is at `-500`, 2D sync at `-450`, audio at `-400`.
|
|
3333
|
-
*
|
|
3334
|
-
* ## What it does
|
|
3335
|
-
*
|
|
3336
|
-
* One pass per component kind, in the order a frame needs them: create the text renderer if this is
|
|
3337
|
-
* the first frame, project every `WorldAnchor` and every `WorldText2D` once, then re-shape whatever
|
|
3338
|
-
* text changed. Projection uses the world's main camera; with no camera nothing is projected and
|
|
3339
|
-
* every anchored element is hidden, which is what a loading screen with no scene looks like.
|
|
3305
|
+
* Run after core's camera sync so projections use the current pose and render-target size.
|
|
3306
|
+
* With no main camera, hide anchored elements. Text shaping only repeats when content changes.
|
|
3340
3307
|
*/
|
|
3341
3308
|
/**
|
|
3342
3309
|
* The `PreRender` order the UI system runs at.
|