@moku-labs/game 0.15.99 → 0.15.101
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 +1 -1
- package/dist/app/page.d.mts +4 -3
- package/dist/app/page.mjs +72 -3
- package/dist/app/system.d.mts +3 -3
- package/dist/app.d.mts +3 -3
- package/dist/app.mjs +2 -2
- package/dist/assets.d.mts +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/{commands-12Om5aNO.d.mts → commands-DFCBw6F2.d.mts} +5 -5
- package/dist/control.d.mts +4 -4
- package/dist/{define-hPbGjPAY.d.mts → define-6cjZwkJu.d.mts} +2 -2
- package/dist/{headless-Co3SEFi5.d.mts → headless-WyPk3UrP.d.mts} +1 -1
- package/dist/{index-aU0FlLL6.d.mts → index-Bz6p2alA.d.mts} +22 -4
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +2 -2
- package/dist/inspect.d.mts +6 -6
- package/dist/jsx-dev-runtime.d.mts +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/{memory-CWlqhS7l.mjs → memory-DeD9wis6.mjs} +28 -3
- package/dist/{runtime-B69fIYx_.d.mts → runtime-BDCv5mp-.d.mts} +1 -1
- package/dist/{src-DUt139Ds.mjs → src-DsyJR7Ds.mjs} +69 -4
- package/dist/testing.d.mts +4 -4
- package/dist/testing.mjs +2 -2
- package/dist/{types-qCcSw8YI.d.mts → types-BzVQAaSX.d.mts} +6 -3
- package/dist/{types-BsF8WS0c.d.mts → types-Co-6A6Y8.d.mts} +20 -4
- package/dist/{types-L3E-YS4N.d.mts → types-Cx_-n0Ts.d.mts} +1 -1
- package/dist/{types-BBRC69WT.d.mts → types-Dx2qRDFg.d.mts} +4 -4
- package/dist/{types-BE6tcAFX.d.mts → types-DyohsXF_.d.mts} +2 -2
- package/dist/{visual-CzT4SRfd.d.mts → visual-D5L3ZtuQ.d.mts} +6 -6
- package/dist/visual.d.mts +1 -1
- package/llms.txt +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -236,7 +236,7 @@ createApp({ plugins: [...screen, effectsPlugin, audioPlugin, platformPlugin] });
|
|
|
236
236
|
| [`i18n`](./src/plugins/i18n/README.md) | screen | Strings as data, ICU messages, compiled per locale; a sub-feature's strings travel with its bundle |
|
|
237
237
|
| [`text`](./src/plugins/text/README.md) | screen | MSDF text, styles, inline tags and icons |
|
|
238
238
|
| [`ui`](./src/plugins/ui/README.md) | screen | Screens in JSX, Yoga layout, popups, styles |
|
|
239
|
-
| [`effects`](./src/plugins/effects/README.md) | opt-in | Particles and filters as components, WGSL and GLSL; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Fold` ready to list ([set](./src/plugins/effects/set/README.md)) |
|
|
239
|
+
| [`effects`](./src/plugins/effects/README.md) | opt-in | Particles and filters as components, WGSL and GLSL; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Aura`, `Fold` ready to list ([set](./src/plugins/effects/set/README.md)) |
|
|
240
240
|
| [`audio`](./src/plugins/audio/README.md) | opt-in | Music and sound effects on three buses |
|
|
241
241
|
| [`platform`](./src/plugins/platform/README.md) | opt-in | The phone: Back button, haptics, keep-awake |
|
|
242
242
|
|
package/dist/app/page.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-
|
|
1
|
+
import { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-Dx2qRDFg.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/app/page.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* Runs a game on its page: resolves `config.ts`,
|
|
6
|
-
* fresh memory save, never on the stored one), builds the
|
|
5
|
+
* Runs a game on its page: resolves `config.ts`, puts the zoom guard on the window, picks the
|
|
6
|
+
* start (a `?player=` scenario runs on a fresh memory save, never on the stored one), builds the
|
|
7
|
+
* system shell when the page has one,
|
|
7
8
|
* picks the save, makes the screen app on `#game` over the device clock and the manifest next to
|
|
8
9
|
* the page, sets `globalThis.game`, `system` and `doors`, follows reduced motion, starts the shell,
|
|
9
10
|
* then the app, follows the boot picture of `page.boot` (it fades once the first scene drew, and
|
package/dist/app/page.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as systemSource, t as memory } from "../memory-DeD9wis6.mjs";
|
|
2
2
|
import { t as applyTo } from "../drafts-BawpSaVp.mjs";
|
|
3
3
|
import { i as isControl } from "../dev-BNndV-hU.mjs";
|
|
4
4
|
import { n as fakeClock, t as VISUAL_CLOCK } from "../fake-hnJcJeYf.mjs";
|
|
@@ -204,6 +204,73 @@ function pageSave(kind, where) {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
//#endregion
|
|
207
|
+
//#region src/app/zoom.ts
|
|
208
|
+
/** The longest gap between two taps iOS reads as a double tap, ms. */
|
|
209
|
+
const DOUBLE_TAP_MS = 350;
|
|
210
|
+
/**
|
|
211
|
+
* Tells whether a node of the event path keeps its double tap: the game's own `#game` (its canvas
|
|
212
|
+
* takes no zoom), or a text field.
|
|
213
|
+
*
|
|
214
|
+
* @param node - A node of `composedPath()`.
|
|
215
|
+
* @returns True for `#game`, an `input`, a `textarea` or an editable element.
|
|
216
|
+
* @example
|
|
217
|
+
* ```ts
|
|
218
|
+
* keepsDoubleTap({ id: "game" }); // true
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
function keepsDoubleTap(node) {
|
|
222
|
+
if (typeof node !== "object" || node === null) return false;
|
|
223
|
+
return "id" in node && node.id === "game" || "tagName" in node && (node.tagName === "INPUT" || node.tagName === "TEXTAREA") || "isContentEditable" in node && node.isContentEditable === true;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Cancels an event: WebKit's pinch.
|
|
227
|
+
*
|
|
228
|
+
* @param event - `gesturestart` or `gesturechange`.
|
|
229
|
+
*/
|
|
230
|
+
function cancel(event) {
|
|
231
|
+
event.preventDefault();
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Cancels a move with two fingers or more: a pinch inside a scroll box.
|
|
235
|
+
*
|
|
236
|
+
* @param event - A `touchmove`.
|
|
237
|
+
*/
|
|
238
|
+
function pinch(event) {
|
|
239
|
+
if (event.touches.length > 1) event.preventDefault();
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Puts the zoom guard on the window, in the capture phase, so an overlay that stops its events
|
|
243
|
+
* from bubbling is still guarded. `gesturestart` and `gesturechange` (WebKit's pinch) are
|
|
244
|
+
* cancelled, a `touchmove` with two fingers is cancelled, and the second `touchend` of a double
|
|
245
|
+
* tap outside `#game` and outside a text field is cancelled. A single tap, a one-finger scroll
|
|
246
|
+
* and the game's pointer events go through untouched. It stays for the life of the page: nothing
|
|
247
|
+
* takes it off.
|
|
248
|
+
*
|
|
249
|
+
* @param target - The window of the page.
|
|
250
|
+
* @param now - The clock of the double tap, ms.
|
|
251
|
+
*/
|
|
252
|
+
function guardZoom(target, now) {
|
|
253
|
+
const options = {
|
|
254
|
+
capture: true,
|
|
255
|
+
passive: false
|
|
256
|
+
};
|
|
257
|
+
let lastTap = Number.NEGATIVE_INFINITY;
|
|
258
|
+
const tap = (event) => {
|
|
259
|
+
if (event.touches.length > 0) return;
|
|
260
|
+
const moment = now();
|
|
261
|
+
const second = moment - lastTap < DOUBLE_TAP_MS;
|
|
262
|
+
lastTap = second ? Number.NEGATIVE_INFINITY : moment;
|
|
263
|
+
if (second && !event.composedPath().some((node) => keepsDoubleTap(node))) event.preventDefault();
|
|
264
|
+
};
|
|
265
|
+
const listeners = [
|
|
266
|
+
["gesturestart", cancel],
|
|
267
|
+
["gesturechange", cancel],
|
|
268
|
+
["touchmove", pinch],
|
|
269
|
+
["touchend", tap]
|
|
270
|
+
];
|
|
271
|
+
for (const [type, listener] of listeners) target.addEventListener(type, listener, options);
|
|
272
|
+
}
|
|
273
|
+
//#endregion
|
|
207
274
|
//#region src/app/page.ts
|
|
208
275
|
/**
|
|
209
276
|
* @file The `@moku-labs/game/app/page` entry: `startPage`, the page of a game. The generated
|
|
@@ -402,8 +469,9 @@ function openStartOverlay(app, overlay) {
|
|
|
402
469
|
app.debug.overlay.open({ mode: overlay === "pill" ? "pill" : "card" });
|
|
403
470
|
}
|
|
404
471
|
/**
|
|
405
|
-
* Runs a game on its page: resolves `config.ts`,
|
|
406
|
-
* fresh memory save, never on the stored one), builds the
|
|
472
|
+
* Runs a game on its page: resolves `config.ts`, puts the zoom guard on the window, picks the
|
|
473
|
+
* start (a `?player=` scenario runs on a fresh memory save, never on the stored one), builds the
|
|
474
|
+
* system shell when the page has one,
|
|
407
475
|
* picks the save, makes the screen app on `#game` over the device clock and the manifest next to
|
|
408
476
|
* the page, sets `globalThis.game`, `system` and `doors`, follows reduced motion, starts the shell,
|
|
409
477
|
* then the app, follows the boot picture of `page.boot` (it fades once the first scene drew, and
|
|
@@ -449,6 +517,7 @@ function openStartOverlay(app, overlay) {
|
|
|
449
517
|
async function startPage(game, config, options = {}) {
|
|
450
518
|
const settings = resolveConfig(config);
|
|
451
519
|
const query = new URLSearchParams(location.search);
|
|
520
|
+
guardZoom(globalThis, () => performance.now());
|
|
452
521
|
const { report, attach } = lateReporter();
|
|
453
522
|
const clock = pageClock();
|
|
454
523
|
const start = scenarioStart(query.get("player"), options.scenarios ?? {}, clock.now(), report);
|
package/dist/app/system.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { qr as PlayerStateProvider } from "../types-
|
|
2
|
-
import {
|
|
3
|
-
import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-
|
|
1
|
+
import { qr as PlayerStateProvider } from "../types-BzVQAaSX.mjs";
|
|
2
|
+
import { Tt as PlatformProvider } from "../index-Bz6p2alA.mjs";
|
|
3
|
+
import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-Dx2qRDFg.mjs";
|
|
4
4
|
import { Back, Haptics, KeepAwake, Lifecycle, Store } from "@moku-labs/system";
|
|
5
5
|
|
|
6
6
|
//#region src/app/system.d.ts
|
package/dist/app.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Hr as Json } from "./types-
|
|
2
|
-
import { q as StringTable } from "./types-
|
|
3
|
-
import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-
|
|
1
|
+
import { Hr as Json } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { q as StringTable } from "./types-Cx_-n0Ts.mjs";
|
|
3
|
+
import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-Dx2qRDFg.mjs";
|
|
4
4
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
5
5
|
|
|
6
6
|
//#region src/app/define.d.ts
|
package/dist/app.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as memory } from "./memory-
|
|
1
|
+
import { C as flattenFeatures, Nt as effectsPlugin, Wt as audioPlugin, Z as platformPlugin, i as screen, t as createApp } from "./src-DsyJR7Ds.mjs";
|
|
2
|
+
import { t as memory } from "./memory-DeD9wis6.mjs";
|
|
3
3
|
import { n as fakeClock, r as isFakeClock } from "./fake-hnJcJeYf.mjs";
|
|
4
4
|
//#region src/app/define.ts
|
|
5
5
|
/**
|
package/dist/assets.d.mts
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -413,7 +413,7 @@ function bootImage(boot, toRoot) {
|
|
|
413
413
|
function pageHtml(page, links) {
|
|
414
414
|
const background = safeValue(page.background, `[game] moku-game: page.background "${page.background}" is not a CSS color.`);
|
|
415
415
|
const lang = safeValue(page.lang, `[game] moku-game: page.lang "${page.lang}" is not a language tag.`);
|
|
416
|
-
const style = `html, body { margin: 0; height: 100%; background: ${background}; } #game { width: 100%; height: 100%; touch-action: none; } html, body, #game { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; } input, textarea { -webkit-user-select: text; user-select: text; }` + (page.boot === void 0 ? "" : bootRule(page.boot));
|
|
416
|
+
const style = `html, body { margin: 0; height: 100%; background: ${background}; } html, body { touch-action: pan-x pan-y; } #game { width: 100%; height: 100%; touch-action: none; } html, body, #game { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; } input, textarea { -webkit-user-select: text; user-select: text; }` + (page.boot === void 0 ? "" : bootRule(page.boot));
|
|
417
417
|
return [
|
|
418
418
|
"<!doctype html>",
|
|
419
419
|
`<html lang="${lang}">`,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $r as StoreApi, D as DebugSwitches, In as FlowState, Nn as Bookmark, Or as Api$2, Z as Api$1, Zr as Snapshot, ft as Captured, mi as Time, ni as Api, ui as FrameRate, w as ScenesApi } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
import { L as InputApi } from "./types-
|
|
4
|
-
import { t as HeadlessApp } from "./headless-
|
|
5
|
-
import { i as ControlApp, r as Command } from "./types-
|
|
1
|
+
import { $r as StoreApi, D as DebugSwitches, In as FlowState, Nn as Bookmark, Or as Api$2, Z as Api$1, Zr as Snapshot, ft as Captured, mi as Time, ni as Api, ui as FrameRate, w as ScenesApi } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { U as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-Co-6A6Y8.mjs";
|
|
3
|
+
import { L as InputApi } from "./types-Cx_-n0Ts.mjs";
|
|
4
|
+
import { t as HeadlessApp } from "./headless-WyPk3UrP.mjs";
|
|
5
|
+
import { i as ControlApp, r as Command } from "./types-DyohsXF_.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/flow/doors/commands.d.ts
|
|
8
8
|
/**
|
package/dist/control.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as HeadlessApp } from "./headless-
|
|
2
|
-
import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-
|
|
3
|
-
import { t as commands } from "./commands-
|
|
4
|
-
import { t as defineCommand } from "./define-
|
|
1
|
+
import { t as HeadlessApp } from "./headless-WyPk3UrP.mjs";
|
|
2
|
+
import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-DyohsXF_.mjs";
|
|
3
|
+
import { t as commands } from "./commands-DFCBw6F2.mjs";
|
|
4
|
+
import { t as defineCommand } from "./define-6cjZwkJu.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/flow/doors/dev.d.ts
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as HeadlessApp } from "./headless-
|
|
2
|
-
import { l as Source, r as Command, s as InputSchema } from "./types-
|
|
1
|
+
import { t as HeadlessApp } from "./headless-WyPk3UrP.mjs";
|
|
2
|
+
import { l as Source, r as Command, s as InputSchema } from "./types-DyohsXF_.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/flow/doors/define.d.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Hr as Json, In as FlowState, Jn as Answer, Ln as JournalEntry, ci as Api, fn as Api$1, ti as RngState, zn as RouteStep } from "./types-
|
|
1
|
+
import { Hr as Json, In as FlowState, Jn as Answer, Ln as JournalEntry, ci as Api, fn as Api$1, ti as RngState, zn as RouteStep } from "./types-BzVQAaSX.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/flow/headless.d.ts
|
|
4
4
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $n as Ease, $r as StoreApi, An as FeaturePlugin, Bn as SceneIdOf, Br as Config$5, C as SceneSpec, Cr as QueryTerm, Dr as TagType, Er as SystemFor, F as HudPartValue, Fr as Config$2, Ft as PassKind, G as SpriteOptions, Gn as GuideOptions, H as ShapeValue, Hn as Descriptor, Hr as Json, J as TransformValue, K as SpriteValue, Kn as Hint, Kr as Patch, L as NineSliceValue, Lr as State$2, Nr as Api$1, Or as Api$6, Pn as DefineNode, Q as Config$6, Qn as DescriptionNode, S as SceneDefinition, Sr as Narrowed, T as State$7, Tr as SystemDefinition, Tt as FrameRing, Un as Effect, Ur as Root, Wn as EffectOptions, Wr as State$5, Y as sprite, Yn as Answered, Z as Api$4, _ as AnySceneProjection, _i as Events$1, _n as HudKeysOf, _r as ComponentValue, _t as ViewportSize, a as Config$1, ai as PauseReason, ar as ProjectionSpec, bn as TextFormatsOf, c as LoadBundles, ci as Api$5, di as RateChange, ei as RngApi, f as ReadyBundles, fi as State$8, fn as Api$2, gi as Config$10, gn as GameTypes, gr as ComponentType, hn as EmitterIdOf, i as BundleSpec, ii as Events, ir as ProjectionMotion, jn as FeatureTree, jr as State$9, kn as FeatureDescription, kr as Config$9, l as LoadReason, li as Config$8, m as Tier, mn as Config$3, mr as ComponentHandle, ni as Api$3, o as DefineBundles, oi as State$4, or as ReducedMotion, p as State$1, pi as ThermalReading, pn as BundlesOf, r as BundleMap, ri as Config$4, rr as NumericFields, st as State$6, t as Api, u as LoadResult, v as Config$7, vi as Require, w as ScenesApi, wn as defineFlow, wr as ResourceType, wt as FrameRecord, x as LayerMap, xn as TextStylesOf, xr as Mut, y as DefineScene, yn as State$3, z as OverlayValue } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
import { $ as Style, A as TextFormats, B as Argument, C as Point, E as TextBind, F as defineComponent, G as Part, H as I18nApi, I as Config$16, J as TextKey, K as State$14, L as InputApi, M as TextStyles, N as TextValue, Q as ResolvedStyle, R as State$15, T as TextApi, U as IntlKit, V as Config$15, W as Message, Y as TypedTr, Z as IsFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as TextStyleInput, k as TextFormatFunction, s as PopupComponent, tt as WhenFlags, v as BindField, w as State$16, x as CountdownValue, y as BindOptions } from "./types-
|
|
1
|
+
import { $n as Ease, $r as StoreApi, An as FeaturePlugin, Bn as SceneIdOf, Br as Config$5, C as SceneSpec, Cr as QueryTerm, Dr as TagType, Er as SystemFor, F as HudPartValue, Fr as Config$2, Ft as PassKind, G as SpriteOptions, Gn as GuideOptions, H as ShapeValue, Hn as Descriptor, Hr as Json, J as TransformValue, K as SpriteValue, Kn as Hint, Kr as Patch, L as NineSliceValue, Lr as State$2, Nr as Api$1, Or as Api$6, Pn as DefineNode, Q as Config$6, Qn as DescriptionNode, S as SceneDefinition, Sr as Narrowed, T as State$7, Tr as SystemDefinition, Tt as FrameRing, Un as Effect, Ur as Root, Wn as EffectOptions, Wr as State$5, Y as sprite, Yn as Answered, Z as Api$4, _ as AnySceneProjection, _i as Events$1, _n as HudKeysOf, _r as ComponentValue, _t as ViewportSize, a as Config$1, ai as PauseReason, ar as ProjectionSpec, bn as TextFormatsOf, c as LoadBundles, ci as Api$5, di as RateChange, ei as RngApi, f as ReadyBundles, fi as State$8, fn as Api$2, gi as Config$10, gn as GameTypes, gr as ComponentType, hn as EmitterIdOf, i as BundleSpec, ii as Events, ir as ProjectionMotion, jn as FeatureTree, jr as State$9, kn as FeatureDescription, kr as Config$9, l as LoadReason, li as Config$8, m as Tier, mn as Config$3, mr as ComponentHandle, ni as Api$3, o as DefineBundles, oi as State$4, or as ReducedMotion, p as State$1, pi as ThermalReading, pn as BundlesOf, r as BundleMap, ri as Config$4, rr as NumericFields, st as State$6, t as Api, u as LoadResult, v as Config$7, vi as Require, w as ScenesApi, wn as defineFlow, wr as ResourceType, wt as FrameRecord, x as LayerMap, xn as TextStylesOf, xr as Mut, y as DefineScene, yn as State$3, z as OverlayValue } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { $ as Step, A as EmitterValue, B as NoiseValue, C as GradeValue, D as VignetteValue, E as ShineValue, G as Config$11, H as UniformDeclaration, I as FilterComponent, J as State$10, K as FramesValue, L as FilterSpec, M as BlurValue, N as ColorMatrixValue, O as EmitterConfig, P as DisplacementValue, Q as SfxDescriptor, R as FilterValueOf, S as FoldValue, T as RevealRoundValue, U as AnimApi, V as OutlineValue, W as AnimPlayerValue, Y as Target, Z as HapticKind, _ as State$12, a as AudioApi, b as DissolveValue, c as MusicDescriptor, d as State$11, f as VolumesFor, h as EffectsApi, j as AlphaValue, k as EmitterDefinition, l as MusicOptions, m as Config$13, n as State$13, q as MotionKeyframe, r as UiApi, s as Config$12, st as play, t as Config$14, tt as defineAnimation, vt as OverlayApi, w as RevealLineValue, x as FlashValue, y as AuraValue, z as GlowValue } from "./types-Co-6A6Y8.mjs";
|
|
3
|
+
import { $ as Style, A as TextFormats, B as Argument, C as Point, E as TextBind, F as defineComponent, G as Part, H as I18nApi, I as Config$16, J as TextKey, K as State$14, L as InputApi, M as TextStyles, N as TextValue, Q as ResolvedStyle, R as State$15, T as TextApi, U as IntlKit, V as Config$15, W as Message, Y as TypedTr, Z as IsFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as TextStyleInput, k as TextFormatFunction, s as PopupComponent, tt as WhenFlags, v as BindField, w as State$16, x as CountdownValue, y as BindOptions } from "./types-Cx_-n0Ts.mjs";
|
|
4
4
|
import { Log } from "@moku-labs/common/browser";
|
|
5
5
|
import { PluginCtx } from "@moku-labs/core";
|
|
6
6
|
|
|
@@ -1758,6 +1758,24 @@ declare const Alpha: ComponentType<AlphaValue>;
|
|
|
1758
1758
|
*/
|
|
1759
1759
|
declare function defineFilter<Uniforms extends Record<string, UniformDeclaration> = Record<never, never>>(id: string, spec: FilterSpec<Uniforms>): FilterComponent<FilterValueOf<Uniforms>>;
|
|
1760
1760
|
//#endregion
|
|
1761
|
+
//#region src/plugins/effects/set/aura.d.ts
|
|
1762
|
+
/**
|
|
1763
|
+
* A soft halo of `color` around the shape of a view and its subtree, `spread` CSS px wide and as strong as `strength`
|
|
1764
|
+
* (0..2; 1 is full next to a straight edge, 2 widens the full part). The view is padded by its live `spread`, so the
|
|
1765
|
+
* halo has room. A cheap glow: 13 samples where `Glow` takes 64 to 256, so it bands a little where `Glow` is smooth.
|
|
1766
|
+
* For a picked tile, a hint, a selected card. List it in a feature's `filters`, as a game's own filter. One render
|
|
1767
|
+
* pass; on WebGPU a tween of `strength` draws on the view's own quad, no pass, from its third frame.
|
|
1768
|
+
*
|
|
1769
|
+
* @example
|
|
1770
|
+
* ```ts
|
|
1771
|
+
* // A hinted tile glows gold, twelve pixels wide; the view is padded by the live spread.
|
|
1772
|
+
* Aura({ color: 0xffd700, spread: 12 }).value.spread; // 12
|
|
1773
|
+
* Aura.filter.padding; // "spread"
|
|
1774
|
+
* view.tween(Aura, { strength: 0 }, { ms: 300 });
|
|
1775
|
+
* ```
|
|
1776
|
+
*/
|
|
1777
|
+
declare const Aura: FilterComponent<AuraValue>;
|
|
1778
|
+
//#endregion
|
|
1761
1779
|
//#region src/plugins/effects/set/dissolve.d.ts
|
|
1762
1780
|
/**
|
|
1763
1781
|
* A view eaten away by a noise of `scale` cells across: `progress` 0 keeps all of it, 1 none, and the edge of what is
|
|
@@ -2211,4 +2229,4 @@ declare const screen: readonly [import("@moku-labs/core").PluginInstance<"world"
|
|
|
2211
2229
|
};
|
|
2212
2230
|
}> & Record<never, never>, import("@moku-labs/core").PluginInstance<"text", Config$17, State$16, TextApi, {}> & Record<never, never>, import("@moku-labs/core").PluginInstance<"ui", Config$14, State$13, UiApi, {}> & Record<never, never>];
|
|
2213
2231
|
//#endregion
|
|
2214
|
-
export {
|
|
2232
|
+
export { PASS_KINDS as $, cubicBezier as A, i18nPlugin as At, DropTarget as B, Text as Bt, Outline as C, platformPlugin as Ct, tr as D, modelPlugin as Dt, defineStyle as E, types_d_exports as Et, defineScene as F, audioPlugin as Ft, Pressable as G, Hovered as H, defineTextFormats as Ht, defineBundles as I, assetsPlugin as It, TapValue as J, Pressed as K, load as L, animPlugin as Lt, AnimPlayer as M, effectsPlugin as Mt, Animation as N, debugPlugin as Nt, messageArgument as O, lifecyclePlugin as Ot, Frames as P, clockPlugin as Pt, Traced as Q, ready as R, projection as Rt, Noise as S, rendererPlugin as St, resolve as T, PlatformProvider as Tt, Pointer as U, defineTextStyles as Ut, Held as V, bind as Vt, PointerOver as W, label as Wt, Touchable as X, Tappable as Y, Traceable as Z, Alpha as _, worldPlugin as _t, defineEmitter as a, Tree as at, Displacement as b, textPlugin as bt, Shine as c, resource as ct, Grade as d, defineEffect as dt, frameAt as et, Fold as f, guide as ft, defineFilter as g, flattenFeatures as gt, Aura as h, defineFeature as ht, screen as i, Order as it, defineMotion as j, flowPlugin as jt, messageDuration as k, inputPlugin as kt, RevealRound as l, system as lt, Dissolve as m, schedule as mt, createPlugin as n, Layer as nt, Emitter as o, component as ot, Flash as p, hint as pt, Swipeable as q, defineGame as r, Now as rt, Vignette as s, mut as st, createApp as t, Exiting as tt, RevealLine as u, tag as ut, Blur as v, uiPlugin as vt, music as w, BackResult as wt, Glow as x, scenesPlugin as xt, ColorMatrix as y, timePlugin as yt, Draggable as z, Countdown as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as MonitorConfig, $t as PerfStartupLine, At as OverlayWhat, B as Parent, Bt as PerfCollectorLine, Cn as contribution, Ct as FrameReadout, Dn as to, Dt as MONITOR_SECTIONS, E as types_d_exports$13, En as slot, Et as LongFrameEntry, F as HudPartValue, Ft as PassKind, Gr as types_d_exports$10, Gt as PerfGapLine, Ht as PerfDisplay, I as NineSlice, It as PassRecord, Jt as PerfLongFrameLine, Kt as PerfHeaderLine, Lt as PerfCause, M as WhyEntry, Mr as types_d_exports$17, Mt as PERF_GAP_BUCKETS, N as Display, Nt as PERF_LOG_VERSION, On as type, Ot as MonitorSections, P as HudPart, Pt as PROBLEM_RULES, Qn as DescriptionNode, Qt as PerfSpikeLine, R as Overlay, Rr as types_d_exports$3, Rt as PerfChange, Sn as types_d_exports$6, St as FrameReadResult, Tn as exit, Tt as FrameRing, U as Sprite, Ut as PerfEventLine, V as Shape, Vt as PerfCounts, W as SpriteBlend, Wt as PerfEventName, X as AdaptiveScale, Xn as AnchorTarget, Xr as SaveUnreadableError, Xt as PerfMeasured, Y as sprite, Yt as PerfMarkLine, Zt as PerfSampleLine, an as SHADER_WHATS, bt as WhyLive, cn as WarmDetail, dn as DEMAND_REASONS, dt as ShotsConfig, en as PerfTelemetryLine, g as types_d_exports$1, hi as types_d_exports$15, in as ProblemRule, jt as PERF_CAUSES, kt as OverlayEventDetail, ln as CANVAS_RESTARTS, lt as types_d_exports$12, nn as PoolTrimDetail, on as ShaderEventDetail, ot as PoolTrim, pt as MonitorCounts, q as Transform, qt as PerfLogLine, rn as ProblemEventDetail, si as types_d_exports$9, sn as ShaderWhat, sr as SceneSwitch, tn as PerfThermalLine, un as CanvasRestart, ut as ShotsApi, wt as FrameRecord, xt as FrameColumns, yt as RetakeWhy, z as OverlayValue, zt as PerfChangeEntry } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
import { A as TextFormats, D as TextFormat, F as defineComponent, O as TextFormatAnswer, P as types_d_exports$14, S as FormattedNumber, X as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, k as TextFormatFunction, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions, z as types_d_exports$8 } from "./types-
|
|
4
|
-
import { $ as
|
|
5
|
-
export { type AdaptiveScale, Alpha, type AnchorTarget, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, type BackResult, type BindOptions, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Dissolve, type DissolveValue, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, Flash, type FlashValue, types_d_exports$6 as Flow, Fold, type FoldValue, type FormattedNumber, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, Grade, type GradeValue, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, RevealLine, type RevealLineValue, RevealRound, type RevealRoundValue, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Shine, type ShineValue, type ShotsApi, type ShotsConfig, Sprite, type SpriteBlend, Swipeable, type TapValue, Tappable, Text, type TextFormat, type TextFormatAnswer, type TextFormatFunction, type TextFormats, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, Vignette, type VignetteValue, type WarmDetail, type WhyEntry, type WhyLive, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
|
1
|
+
import { $ as MonitorConfig, $t as PerfStartupLine, At as OverlayWhat, B as Parent, Bt as PerfCollectorLine, Cn as contribution, Ct as FrameReadout, Dn as to, Dt as MONITOR_SECTIONS, E as types_d_exports$13, En as slot, Et as LongFrameEntry, F as HudPartValue, Ft as PassKind, Gr as types_d_exports$10, Gt as PerfGapLine, Ht as PerfDisplay, I as NineSlice, It as PassRecord, Jt as PerfLongFrameLine, Kt as PerfHeaderLine, Lt as PerfCause, M as WhyEntry, Mr as types_d_exports$17, Mt as PERF_GAP_BUCKETS, N as Display, Nt as PERF_LOG_VERSION, On as type, Ot as MonitorSections, P as HudPart, Pt as PROBLEM_RULES, Qn as DescriptionNode, Qt as PerfSpikeLine, R as Overlay, Rr as types_d_exports$3, Rt as PerfChange, Sn as types_d_exports$6, St as FrameReadResult, Tn as exit, Tt as FrameRing, U as Sprite, Ut as PerfEventLine, V as Shape, Vt as PerfCounts, W as SpriteBlend, Wt as PerfEventName, X as AdaptiveScale, Xn as AnchorTarget, Xr as SaveUnreadableError, Xt as PerfMeasured, Y as sprite, Yt as PerfMarkLine, Zt as PerfSampleLine, an as SHADER_WHATS, bt as WhyLive, cn as WarmDetail, dn as DEMAND_REASONS, dt as ShotsConfig, en as PerfTelemetryLine, g as types_d_exports$1, hi as types_d_exports$15, in as ProblemRule, jt as PERF_CAUSES, kt as OverlayEventDetail, ln as CANVAS_RESTARTS, lt as types_d_exports$12, nn as PoolTrimDetail, on as ShaderEventDetail, ot as PoolTrim, pt as MonitorCounts, q as Transform, qt as PerfLogLine, rn as ProblemEventDetail, si as types_d_exports$9, sn as ShaderWhat, sr as SceneSwitch, tn as PerfThermalLine, un as CanvasRestart, ut as ShotsApi, wt as FrameRecord, xt as FrameColumns, yt as RetakeWhy, z as OverlayValue, zt as PerfChangeEntry } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { C as GradeValue, D as VignetteValue, E as ShineValue, F as FilterArea, S as FoldValue, T as RevealRoundValue, X as types_d_exports, Z as HapticKind, _t as wait, at as mark, b as DissolveValue, ct as sequence, dt as spawn, et as HAPTIC_KINDS, ft as spawned, gt as use, ht as tween, i as types_d_exports$16, it as haptic, lt as set, mt as stopSfx, nt as external, ot as parallel, p as types_d_exports$2, pt as stagger, rt as frames, st as play, tt as defineAnimation, ut as sfx, v as types_d_exports$5, w as RevealLineValue, x as FlashValue, y as AuraValue, yt as types_d_exports$4 } from "./types-Co-6A6Y8.mjs";
|
|
3
|
+
import { A as TextFormats, D as TextFormat, F as defineComponent, O as TextFormatAnswer, P as types_d_exports$14, S as FormattedNumber, X as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, k as TextFormatFunction, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions, z as types_d_exports$8 } from "./types-Cx_-n0Ts.mjs";
|
|
4
|
+
import { $ as PASS_KINDS, A as cubicBezier, At as i18nPlugin, B as DropTarget, Bt as Text, C as Outline, Ct as platformPlugin, D as tr, Dt as modelPlugin, E as defineStyle, Et as types_d_exports$11, F as defineScene, Ft as audioPlugin, G as Pressable, H as Hovered, Ht as defineTextFormats, I as defineBundles, It as assetsPlugin, J as TapValue, K as Pressed, L as load, Lt as animPlugin, M as AnimPlayer, Mt as effectsPlugin, N as Animation, Nt as debugPlugin, O as messageArgument, Ot as lifecyclePlugin, P as Frames, Pt as clockPlugin, Q as Traced, R as ready, Rt as projection, S as Noise, St as rendererPlugin, T as resolve, Tt as PlatformProvider, U as Pointer, Ut as defineTextStyles, V as Held, Vt as bind, W as PointerOver, Wt as label, X as Touchable, Y as Tappable, Z as Traceable, _ as Alpha, _t as worldPlugin, a as defineEmitter, at as Tree, b as Displacement, bt as textPlugin, c as Shine, ct as resource, d as Grade, dt as defineEffect, et as frameAt, f as Fold, ft as guide, g as defineFilter, gt as flattenFeatures, h as Aura, ht as defineFeature, i as screen, it as Order, j as defineMotion, jt as flowPlugin, k as messageDuration, kt as inputPlugin, l as RevealRound, lt as system, m as Dissolve, mt as schedule, n as createPlugin, nt as Layer, o as Emitter, ot as component, p as Flash, pt as hint, q as Swipeable, r as defineGame, rt as Now, s as Vignette, st as mut, t as createApp, tt as Exiting, u as RevealLine, ut as tag, v as Blur, vt as uiPlugin, w as music, wt as BackResult, x as Glow, xt as scenesPlugin, y as ColorMatrix, yt as timePlugin, z as Draggable, zt as Countdown } from "./index-Bz6p2alA.mjs";
|
|
5
|
+
export { type AdaptiveScale, Alpha, type AnchorTarget, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, Aura, type AuraValue, type BackResult, type BindOptions, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Dissolve, type DissolveValue, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, Flash, type FlashValue, types_d_exports$6 as Flow, Fold, type FoldValue, type FormattedNumber, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, Grade, type GradeValue, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, RevealLine, type RevealLineValue, RevealRound, type RevealRoundValue, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Shine, type ShineValue, type ShotsApi, type ShotsConfig, Sprite, type SpriteBlend, Swipeable, type TapValue, Tappable, Text, type TextFormat, type TextFormatAnswer, type TextFormatFunction, type TextFormats, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, Vignette, type VignetteValue, type WarmDetail, type WhyEntry, type WhyLive, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as defineAnimation, $t as frameAt, A as types_exports$16, At as i18nPlugin, B as types_exports$6, Bt as Noise, C as flattenFeatures, Ct as Pressable, D as load, Dt as Touchable, E as defineBundles, Et as Tappable, F as types_exports$11, Ft as Alpha, G as types_exports$1, Gt as scenesPlugin, H as types_exports$4, Ht as defineFilter, I as types_exports$10, It as Blur, J as resolve, Jt as AnimPlayer, K as types_exports, Kt as assetsPlugin, L as types_exports$9, Lt as ColorMatrix, M as types_exports$14, Mt as messageDuration, N as types_exports$13, Nt as effectsPlugin, O as ready, Ot as Traceable, P as types_exports$12, Pt as Emitter, Q as HAPTIC_KINDS, Qt as PASS_KINDS, R as types_exports$8, Rt as Displacement, S as defineFeature, St as PointerOver, T as music, Tt as Swipeable, U as types_exports$3, Ut as debugPlugin, V as types_exports$5, Vt as Outline, W as types_exports$2, Wt as audioPlugin, X as textPlugin, Xt as Frames, Y as defineMotion, Yt as Animation, Z as platformPlugin, Zt as rendererPlugin, _ as hint, _n as SaveUnreadableError, _t as Draggable, a as Vignette, an as SHADER_WHATS, at as play, b as defineScene, bn as clockPlugin, bt as Hovered, c as RevealLine, cn as worldPlugin, ct as sfx, d as Flash, dn as contribution, dt as stagger, en as MONITOR_SECTIONS, et as external, f as Dissolve, fn as exit, ft as stopSfx, g as guide, gn as modelPlugin, gt as inputPlugin, h as defineEffect, hn as type, ht as wait, i as screen, in as PROBLEM_RULES, it as parallel, j as types_exports$15, jt as messageArgument, k as types_exports$17, kt as Traced, l as Grade, ln as flowPlugin, lt as spawn, m as cubicBezier, mn as to, mt as use, n as createPlugin, nn as PERF_GAP_BUCKETS, nt as haptic, o as Shine, on as CANVAS_RESTARTS, ot as sequence, p as Aura, pn as slot, pt as tween, q as uiPlugin, qt as animPlugin, r as defineGame, rn as PERF_LOG_VERSION, rt as mark, s as RevealRound, sn as DEMAND_REASONS, st as set, t as createApp, tn as PERF_CAUSES, tt as frames, u as Fold, ut as spawned, v as schedule, vn as lifecyclePlugin, vt as DropTarget, w as defineEmitter, wt as Pressed, x as tr, xt as Pointer, y as projection, yn as timePlugin, yt as Held, z as types_exports$7, zt as Glow } from "./src-DsyJR7Ds.mjs";
|
|
2
2
|
import { $ as Shape, A as Countdown, F as defineTextStyles, I as label, J as HudPart, M as bind, P as defineTextFormats, Q as Parent, S as popup, T as defineStyle, X as Overlay, Y as NineSlice, _ as LocalWrite, at as Exiting, ct as Order, dt as mut, et as Sprite, ft as resource, h as DebugTrigger, ht as tag, it as sprite, j as Text, lt as Tree, ot as Layer, p as Box, pt as system, q as Display, st as Now, tt as Transform, ut as component, w as defineTokens, y as ScrollState } from "./visual-DhqD6W3v.mjs";
|
|
3
3
|
import { t as defineComponent } from "./component-DGg5DqKK.mjs";
|
|
4
|
-
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Dissolve, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, Flash, types_exports$6 as Flow, Fold, Frames, Glow, Grade, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, RevealLine, RevealRound, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Shine, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, Vignette, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
|
4
|
+
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Aura, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Dissolve, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, Flash, types_exports$6 as Flow, Fold, Frames, Glow, Grade, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, RevealLine, RevealRound, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Shine, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, Vignette, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
package/dist/inspect.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ar as Explained, Fn as FlowGraph, Ln as JournalEntry, Or as Api$1, Z as Api$2, Zr as Snapshot, br as FrameDiff, ct as Under, h as Usage, hr as ComponentSchema, mt as RenderStats, t as Api$3, vn as Position, yr as EntitySnapshot, zr as Api } from "./types-
|
|
2
|
-
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-
|
|
3
|
-
import { c as UiNode } from "./types-
|
|
4
|
-
import { t as HeadlessApp } from "./headless-
|
|
5
|
-
import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-
|
|
6
|
-
import { n as defineSource } from "./define-
|
|
1
|
+
import { Ar as Explained, Fn as FlowGraph, Ln as JournalEntry, Or as Api$1, Z as Api$2, Zr as Snapshot, br as FrameDiff, ct as Under, h as Usage, hr as ComponentSchema, mt as RenderStats, t as Api$3, vn as Position, yr as EntitySnapshot, zr as Api } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-Co-6A6Y8.mjs";
|
|
3
|
+
import { c as UiNode } from "./types-Cx_-n0Ts.mjs";
|
|
4
|
+
import { t as HeadlessApp } from "./headless-WyPk3UrP.mjs";
|
|
5
|
+
import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-DyohsXF_.mjs";
|
|
6
|
+
import { n as defineSource } from "./define-6cjZwkJu.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/plugins/flow/doors/read.d.ts
|
|
9
9
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-
|
|
1
|
+
import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-BDCv5mp-.mjs";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxDEV, jsxs };
|
package/dist/jsx-runtime.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-
|
|
1
|
+
import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-BDCv5mp-.mjs";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxs };
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { t as applyTo } from "./drafts-BawpSaVp.mjs";
|
|
2
2
|
//#region src/plugins/clock/system.ts
|
|
3
3
|
/**
|
|
4
|
+
* The longest delay a platform timer keeps, 2^31−1 ms (24.8 days). A longer one overflows and
|
|
5
|
+
* fires at once (F151), so a longer wait is made of steps of this length. `arm` asks no source
|
|
6
|
+
* for more, a game's own source included.
|
|
7
|
+
*/
|
|
8
|
+
const MAX_TIMER_MS = 2147483647;
|
|
9
|
+
/**
|
|
10
|
+
* Waits `delayMs` on platform timers, one step of at most `MAX_TIMER_MS` at a time, and calls
|
|
11
|
+
* the callback once, after the last step. The handle always holds the step now pending.
|
|
12
|
+
*
|
|
13
|
+
* @param handle - The handle the steps write their timer to.
|
|
14
|
+
* @param callback - Called once the whole delay is over.
|
|
15
|
+
* @param delayMs - The delay still to wait.
|
|
16
|
+
*/
|
|
17
|
+
function step(handle, callback, delayMs) {
|
|
18
|
+
if (delayMs <= 2147483647) {
|
|
19
|
+
handle.timer = setTimeout(callback, delayMs);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
handle.timer = setTimeout(() => step(handle, callback, delayMs - MAX_TIMER_MS), MAX_TIMER_MS);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
4
25
|
* Tells whether a handle was produced by this source.
|
|
5
26
|
*
|
|
6
27
|
* @param handle - Handle given back to `clearTimer`.
|
|
@@ -17,12 +38,16 @@ function isSystemTimer(handle) {
|
|
|
17
38
|
/**
|
|
18
39
|
* Creates the system source: epoch milliseconds from the device clock and real timers.
|
|
19
40
|
*
|
|
20
|
-
* @returns A source reading `Date.now` and scheduling with `setTimeout
|
|
41
|
+
* @returns A source reading `Date.now` and scheduling with `setTimeout`, for a delay of any length.
|
|
21
42
|
*/
|
|
22
43
|
function systemSource() {
|
|
23
44
|
return {
|
|
24
45
|
now: () => Date.now(),
|
|
25
|
-
setTimer: (callback, delayMs) =>
|
|
46
|
+
setTimer: (callback, delayMs) => {
|
|
47
|
+
const handle = { timer: void 0 };
|
|
48
|
+
step(handle, callback, delayMs);
|
|
49
|
+
return handle;
|
|
50
|
+
},
|
|
26
51
|
clearTimer: (handle) => {
|
|
27
52
|
if (!isSystemTimer(handle)) return;
|
|
28
53
|
clearTimeout(handle.timer);
|
|
@@ -133,4 +158,4 @@ function saveOf(player, seed = defaultSeed) {
|
|
|
133
158
|
};
|
|
134
159
|
}
|
|
135
160
|
//#endregion
|
|
136
|
-
export { saveOf as n,
|
|
161
|
+
export { systemSource as i, saveOf as n, MAX_TIMER_MS as r, memory as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-
|
|
1
|
+
import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-Cx_-n0Ts.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/ui/jsx/runtime.d.ts
|
|
4
4
|
/** What the compiler passes as props: the children plus whatever the tag declared. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { i as systemSource, r as MAX_TIMER_MS, t as memory } from "./memory-DeD9wis6.mjs";
|
|
3
3
|
import { a as finishDrafts, i as enableDraftPatches, n as deepFreeze$1, o as openDrafts, r as dropDrafts } from "./drafts-BawpSaVp.mjs";
|
|
4
4
|
import { _ as compact, c as collectFlows, d as findNode, f as framePath, g as slotNames, h as restlessCapOf, i as servePaused, l as describeGraph, m as isRestCheckpoint, n as captureFrame, o as epochOf, p as graphHash, r as serveCaptures, s as pageNow$1, t as cancelCaptures, v as pushEntry } from "./capture-BtS6_oWr.mjs";
|
|
5
5
|
import { $ as Shape, A as Countdown, B as isLeaving, C as uiFor, D as isTextFormat, E as formatBound, G as rootPoseInto, H as parentOf$1, J as HudPart, K as rootPoseOf, L as readStyle, N as builtInStyles, O as unitOf, Q as Parent, R as textFor, U as poseUnder, V as localPoseOf, W as rootPointOf, X as Overlay, Y as NineSlice, Z as OverlayLevel, _ as LocalWrite, a as fieldsLeftAlone, at as Exiting, b as UI_OWNER, c as namesFormat, ct as Order, d as visualOf$1, et as Sprite, f as visualRectOf, ft as resource, g as Escapable, h as DebugTrigger, ht as tag, i as drawnRect, j as Text, k as wholeValue, l as restValueOf, lt as Tree, m as Covered, mt as systemsFor, n as CONTENT$1, nt as arcDefaults, o as fitScaleOf, ot as Layer, p as Box, pt as system, q as Display, r as bindOf, rt as componentsFor, s as livePatch, st as Now, tt as Transform, u as samePose, ut as component, v as Scroll, x as UiCounters, y as ScrollState, z as applyPose } from "./visual-DhqD6W3v.mjs";
|
|
@@ -30,6 +30,10 @@ const createCore$1 = coreConfig.createCore;
|
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/plugins/clock/api.ts
|
|
32
32
|
/**
|
|
33
|
+
* @file clock plugin — API factory. Holds the monotonic rule, the single pending due moment and
|
|
34
|
+
* the `elapsed` listeners.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
33
37
|
* Reads the source and raises the high-water mark. A source that goes back cannot move game time
|
|
34
38
|
* back, and a fractional reading is cut to whole milliseconds.
|
|
35
39
|
*
|
|
@@ -65,13 +69,14 @@ function deliverElapsed(state) {
|
|
|
65
69
|
/**
|
|
66
70
|
* Arms the single timer for a due moment. The delay is counted from the RAW source reading, not
|
|
67
71
|
* from trusted time: the source's timer runs on the device clock, so after the device clock was
|
|
68
|
-
* moved back the wait is longer than `moment - now()`.
|
|
72
|
+
* moved back the wait is longer than `moment - now()`. A moment further than the longest timer
|
|
73
|
+
* waits in steps: the timer fires early and `fireDue` arms it again.
|
|
69
74
|
*
|
|
70
75
|
* @param state - Clock state.
|
|
71
76
|
* @param moment - Due moment in epoch milliseconds.
|
|
72
77
|
*/
|
|
73
78
|
function arm(state, moment) {
|
|
74
|
-
const delayMs = Math.max(0, moment - Math.trunc(state.source.now()));
|
|
79
|
+
const delayMs = Math.min(MAX_TIMER_MS, Math.max(0, moment - Math.trunc(state.source.now())));
|
|
75
80
|
state.dueAt = moment;
|
|
76
81
|
state.handle = state.source.setTimer(() => fireDue(state), delayMs);
|
|
77
82
|
}
|
|
@@ -74452,6 +74457,66 @@ function withSetGlsl(body) {
|
|
|
74452
74457
|
return SET_GLSL + body;
|
|
74453
74458
|
}
|
|
74454
74459
|
/**
|
|
74460
|
+
* A soft halo of `color` around the shape of a view and its subtree, `spread` CSS px wide and as strong as `strength`
|
|
74461
|
+
* (0..2; 1 is full next to a straight edge, 2 widens the full part). The view is padded by its live `spread`, so the
|
|
74462
|
+
* halo has room. A cheap glow: 13 samples where `Glow` takes 64 to 256, so it bands a little where `Glow` is smooth.
|
|
74463
|
+
* For a picked tile, a hint, a selected card. List it in a feature's `filters`, as a game's own filter. One render
|
|
74464
|
+
* pass; on WebGPU a tween of `strength` draws on the view's own quad, no pass, from its third frame.
|
|
74465
|
+
*
|
|
74466
|
+
* @example
|
|
74467
|
+
* ```ts
|
|
74468
|
+
* // A hinted tile glows gold, twelve pixels wide; the view is padded by the live spread.
|
|
74469
|
+
* Aura({ color: 0xffd700, spread: 12 }).value.spread; // 12
|
|
74470
|
+
* Aura.filter.padding; // "spread"
|
|
74471
|
+
* view.tween(Aura, { strength: 0 }, { ms: 300 });
|
|
74472
|
+
* ```
|
|
74473
|
+
*/
|
|
74474
|
+
const Aura = /*#__PURE__*/ defineFilter("effects.aura", {
|
|
74475
|
+
wgsl: /* @__PURE__ */ withSetWgsl(`const AURA_TAU: f32 = 6.283185307179586;
|
|
74476
|
+
|
|
74477
|
+
@fragment
|
|
74478
|
+
fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
|
|
74479
|
+
let n = inputPlace(uv);
|
|
74480
|
+
let c = sampleInput(n);
|
|
74481
|
+
let reach = fu.spread / inputFrame();
|
|
74482
|
+
var ring = 0.0;
|
|
74483
|
+
|
|
74484
|
+
for (var i = 0; i < 12; i++) {
|
|
74485
|
+
let turn = AURA_TAU * f32(i) / 12.0;
|
|
74486
|
+
ring += sampleInput(n + vec2<f32>(cos(turn), sin(turn)) * reach).a;
|
|
74487
|
+
}
|
|
74488
|
+
|
|
74489
|
+
let halo = min(smoothstep(0.0, 0.5, ring / 12.0) * max(fu.strength, 0.0), 1.0);
|
|
74490
|
+
|
|
74491
|
+
return c + vec4<f32>(fu.color * halo, halo) * (1.0 - c.a);
|
|
74492
|
+
}
|
|
74493
|
+
`),
|
|
74494
|
+
glsl: /* @__PURE__ */ withSetGlsl(`const float AURA_TAU = 6.283185307179586;
|
|
74495
|
+
|
|
74496
|
+
void main() {
|
|
74497
|
+
vec2 n = inputPlace(vTextureCoord);
|
|
74498
|
+
vec4 c = sampleInput(n);
|
|
74499
|
+
vec2 reach = spread / inputFrame();
|
|
74500
|
+
float ring = 0.0;
|
|
74501
|
+
|
|
74502
|
+
for (int i = 0; i < 12; i++) {
|
|
74503
|
+
float turn = AURA_TAU * float(i) / 12.0;
|
|
74504
|
+
ring += sampleInput(n + vec2(cos(turn), sin(turn)) * reach).a;
|
|
74505
|
+
}
|
|
74506
|
+
|
|
74507
|
+
float halo = min(smoothstep(0.0, 0.5, ring / 12.0) * max(strength, 0.0), 1.0);
|
|
74508
|
+
|
|
74509
|
+
finalColor = c + vec4(color * halo, halo) * (1.0 - c.a);
|
|
74510
|
+
}
|
|
74511
|
+
`),
|
|
74512
|
+
uniforms: {
|
|
74513
|
+
color: { color: 16777215 },
|
|
74514
|
+
strength: 1,
|
|
74515
|
+
spread: 8
|
|
74516
|
+
},
|
|
74517
|
+
padding: "spread"
|
|
74518
|
+
});
|
|
74519
|
+
/**
|
|
74455
74520
|
* A view eaten away by a noise of `scale` cells across: `progress` 0 keeps all of it, 1 none, and the edge of what is
|
|
74456
74521
|
* left glows in `edgeColor` over `edge` (0..1 of the noise). The noise has no time: the same cells go first at every
|
|
74457
74522
|
* run, on WebGPU and WebGL alike. For a piece that burns away, a card that crumbles. List it in a feature's
|
|
@@ -75052,4 +75117,4 @@ const screen = [
|
|
|
75052
75117
|
uiPlugin
|
|
75053
75118
|
];
|
|
75054
75119
|
//#endregion
|
|
75055
|
-
export {
|
|
75120
|
+
export { defineAnimation as $, frameAt as $t, types_exports$1 as A, i18nPlugin as At, types_exports$11 as B, Noise as Bt, flattenFeatures as C, Pressable as Ct, load as D, Touchable as Dt, defineBundles as E, Tappable as Et, types_exports$6 as F, Alpha as Ft, types_exports$16 as G, scenesPlugin as Gt, types_exports$13 as H, defineFilter as Ht, types_exports$7 as I, Blur as It, resolve as J, AnimPlayer as Jt, types_exports$17 as K, assetsPlugin as Kt, types_exports$8 as L, ColorMatrix as Lt, types_exports$3 as M, messageDuration as Mt, types_exports$4 as N, effectsPlugin as Nt, ready as O, Traceable as Ot, types_exports$5 as P, Emitter as Pt, HAPTIC_KINDS as Q, PASS_KINDS as Qt, types_exports$9 as R, Displacement as Rt, defineFeature as S, PointerOver as St, music as T, Swipeable as Tt, types_exports$14 as U, debugPlugin as Ut, types_exports$12 as V, Outline as Vt, types_exports$15 as W, audioPlugin as Wt, textPlugin as X, Frames as Xt, defineMotion as Y, Animation as Yt, platformPlugin as Z, rendererPlugin as Zt, hint as _, SaveUnreadableError as _n, Draggable as _t, Vignette as a, SHADER_WHATS as an, play$1 as at, defineScene as b, clockPlugin as bn, Hovered as bt, RevealLine as c, worldPlugin as cn, sfx as ct, Flash as d, contribution as dn, stagger as dt, MONITOR_SECTIONS as en, external as et, Dissolve as f, exit as fn, stopSfx as ft, guide as g, modelPlugin as gn, inputPlugin as gt, defineEffect as h, type as hn, wait as ht, screen as i, PROBLEM_RULES as in, parallel as it, types_exports$2 as j, messageArgument as jt, types_exports as k, Traced as kt, Grade as l, flowPlugin as ln, spawn as lt, cubicBezier as m, to as mn, use as mt, createPlugin as n, PERF_GAP_BUCKETS as nn, haptic as nt, Shine as o, CANVAS_RESTARTS as on, sequence as ot, Aura as p, slot as pn, tween as pt, uiPlugin as q, animPlugin as qt, defineGame as r, PERF_LOG_VERSION as rn, mark as rt, RevealRound as s, DEMAND_REASONS as sn, set as st, createApp as t, PERF_CAUSES as tn, frames as tt, Fold as u, refuseStart as un, spawned as ut, schedule as v, lifecyclePlugin as vn, DropTarget as vt, defineEmitter as w, Pressed as wt, tr as x, Pointer as xt, projection as y, timePlugin as yn, Held as yt, types_exports$10 as z, Glow as zt };
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { An as FeaturePlugin, Hn as Descriptor, Hr as Json, Ir as FakeClock, Kn as Hint, Mn as AnyFlow, Pr as ClockSource, Rn as NodeTable, qn as NodeFx } from "./types-
|
|
2
|
-
import { t as createApp } from "./index-
|
|
3
|
-
import { b as memory, x as saveOf, y as WithGameState } from "./types-
|
|
4
|
-
import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-
|
|
1
|
+
import { An as FeaturePlugin, Hn as Descriptor, Hr as Json, Ir as FakeClock, Kn as Hint, Mn as AnyFlow, Pr as ClockSource, Rn as NodeTable, qn as NodeFx } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { t as createApp } from "./index-Bz6p2alA.mjs";
|
|
3
|
+
import { b as memory, x as saveOf, y as WithGameState } from "./types-Dx2qRDFg.mjs";
|
|
4
|
+
import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-WyPk3UrP.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/clock/fake.d.ts
|
package/dist/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as saveOf, t as memory } from "./memory-
|
|
1
|
+
import { C as flattenFeatures, fn as exit, hn as type, t as createApp, un as refuseStart } from "./src-DsyJR7Ds.mjs";
|
|
2
|
+
import { n as saveOf, t as memory } from "./memory-DeD9wis6.mjs";
|
|
3
3
|
import { n as fakeClock } from "./fake-hnJcJeYf.mjs";
|
|
4
4
|
import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-CCiUwvlp.mjs";
|
|
5
5
|
//#region src/testing/fake-fx.ts
|
|
@@ -1686,10 +1686,12 @@ type ClockSource = {
|
|
|
1686
1686
|
*/
|
|
1687
1687
|
now(): number;
|
|
1688
1688
|
/**
|
|
1689
|
-
* Schedules one callback. The plugin keeps at most one timer alive
|
|
1689
|
+
* Schedules one callback. The plugin keeps at most one timer alive, and never asks for more
|
|
1690
|
+
* than 2^31−1 ms (24.8 days), the most a platform timer keeps: a farther moment is armed again
|
|
1691
|
+
* when this timer fires.
|
|
1690
1692
|
*
|
|
1691
1693
|
* @param callback - Function to run when the delay has passed.
|
|
1692
|
-
* @param delayMs - Delay in milliseconds,
|
|
1694
|
+
* @param delayMs - Delay in milliseconds, from 0 to 2^31−1.
|
|
1693
1695
|
* @returns A handle of any shape; the plugin only hands it back to `clearTimer`.
|
|
1694
1696
|
*/
|
|
1695
1697
|
setTimer(callback: () => void, delayMs: number): unknown;
|
|
@@ -1801,7 +1803,8 @@ type Api$4 = {
|
|
|
1801
1803
|
now(): number;
|
|
1802
1804
|
/**
|
|
1803
1805
|
* Replaces the single pending due moment. A moment in the past is not delivered synchronously:
|
|
1804
|
-
* it fires on the next macrotask of the source.
|
|
1806
|
+
* it fires on the next macrotask of the source. A moment further than 2^31−1 ms (24.8 days) waits
|
|
1807
|
+
* on one timer of that length at a time, armed again until the moment comes.
|
|
1805
1808
|
*
|
|
1806
1809
|
* @param moment - Moment in epoch milliseconds, or `undefined` to cancel.
|
|
1807
1810
|
* @example
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $n as Ease, A as FilterSlotQuad, Hn as Descriptor, Hr as Json, O as FilterSlot, Or as Api$3, Vn as TypeTag, Vr as Events$3, Xn as AnchorTarget, Z as Api$4, _i as Events$2, at as PixiUniformGroup, b as Events$4, ci as Api$1, cr as TrackOptions, dr as AnyComponent, et as PixiFilter, fn as Api$2, gr as ComponentType, gt as Point, ii as Events$5, it as PixiTexture, j as SyncApi, k as FilterSlotInputs, lr as TrackSegment, mr as ComponentHandle, nr as MotionHandle, nt as PixiModule, or as ReducedMotion, pr as AnyComponentValue, rr as NumericFields, rt as PixiSprite, s as Events$1, t as Api$5, tt as PixiGpuProgram, vi as Require, vr as Entity, vt as FilterCache, zr as Api$6 } from "./types-
|
|
2
|
-
import { H as I18nApi, L as InputApi, T as TextApi, c as UiNode, et as StylesState, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion } from "./types-
|
|
1
|
+
import { $n as Ease, A as FilterSlotQuad, Hn as Descriptor, Hr as Json, O as FilterSlot, Or as Api$3, Vn as TypeTag, Vr as Events$3, Xn as AnchorTarget, Z as Api$4, _i as Events$2, at as PixiUniformGroup, b as Events$4, ci as Api$1, cr as TrackOptions, dr as AnyComponent, et as PixiFilter, fn as Api$2, gr as ComponentType, gt as Point, ii as Events$5, it as PixiTexture, j as SyncApi, k as FilterSlotInputs, lr as TrackSegment, mr as ComponentHandle, nr as MotionHandle, nt as PixiModule, or as ReducedMotion, pr as AnyComponentValue, rr as NumericFields, rt as PixiSprite, s as Events$1, t as Api$5, tt as PixiGpuProgram, vi as Require, vr as Entity, vt as FilterCache, zr as Api$6 } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { H as I18nApi, L as InputApi, T as TextApi, c as UiNode, et as StylesState, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion } from "./types-Cx_-n0Ts.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
import { PluginCtx } from "@moku-labs/core";
|
|
5
5
|
|
|
@@ -2365,6 +2365,22 @@ type ShineValue = {
|
|
|
2365
2365
|
enabled: boolean;
|
|
2366
2366
|
order: number;
|
|
2367
2367
|
};
|
|
2368
|
+
/**
|
|
2369
|
+
* `Aura`: a halo of `color` by `strength` (0..2) around the shape of the view, `spread` CSS px wide, which is also the
|
|
2370
|
+
* view's padding.
|
|
2371
|
+
*
|
|
2372
|
+
* @example
|
|
2373
|
+
* ```ts
|
|
2374
|
+
* const value: AuraValue = { color: 0xffd700, strength: 1, spread: 12, enabled: true, order: 0 };
|
|
2375
|
+
* ```
|
|
2376
|
+
*/
|
|
2377
|
+
type AuraValue = {
|
|
2378
|
+
color: number;
|
|
2379
|
+
strength: number;
|
|
2380
|
+
spread: number;
|
|
2381
|
+
enabled: boolean;
|
|
2382
|
+
order: number;
|
|
2383
|
+
};
|
|
2368
2384
|
/**
|
|
2369
2385
|
* `Fold`: the view turned by `angle` (radians) about its vertical axis (`axis: 0`) or its horizontal one (`axis: 1`),
|
|
2370
2386
|
* leaning by `perspective` (0..1), its back darkened by `shade` (0..1).
|
|
@@ -2383,7 +2399,7 @@ type FoldValue = {
|
|
|
2383
2399
|
order: number;
|
|
2384
2400
|
};
|
|
2385
2401
|
declare namespace types_d_exports$2 {
|
|
2386
|
-
export { AlphaValue, AssetsReplaced$1 as AssetsReplaced, BlurValue, BundleUnloaded$1 as BundleUnloaded, ColorMatrixValue, Config$2 as Config, CoreKind, Curve, Deps$2 as Deps, DisplacementValue, DissolveValue, EffectsApi, EffectsCtx, EffectsDiagnostics, EffectsStats, EmitterConfig, EmitterDefinition, EmitterValue, FilterArea, FilterCache, FilterChainContext, FilterComponent, FilterDefinition, FilterInput, FilterInputDefinition, FilterSpec, FilterStage, FilterStep, FilterValueOf, FlashValue, FoldValue, GlowValue, GradeValue, HotSwap, KernelSlice$2 as KernelSlice, NoiseValue, OutlineValue, Range, ResolvedEmitterConfig, RevealLineValue, RevealRoundValue, Shape, ShineValue, State$2 as State, UniformDeclaration, UniformSpec, UniformValue, VignetteValue };
|
|
2402
|
+
export { AlphaValue, AssetsReplaced$1 as AssetsReplaced, AuraValue, BlurValue, BundleUnloaded$1 as BundleUnloaded, ColorMatrixValue, Config$2 as Config, CoreKind, Curve, Deps$2 as Deps, DisplacementValue, DissolveValue, EffectsApi, EffectsCtx, EffectsDiagnostics, EffectsStats, EmitterConfig, EmitterDefinition, EmitterValue, FilterArea, FilterCache, FilterChainContext, FilterComponent, FilterDefinition, FilterInput, FilterInputDefinition, FilterSpec, FilterStage, FilterStep, FilterValueOf, FlashValue, FoldValue, GlowValue, GradeValue, HotSwap, KernelSlice$2 as KernelSlice, NoiseValue, OutlineValue, Range, ResolvedEmitterConfig, RevealLineValue, RevealRoundValue, Shape, ShineValue, State$2 as State, UniformDeclaration, UniformSpec, UniformValue, VignetteValue };
|
|
2387
2403
|
}
|
|
2388
2404
|
/**
|
|
2389
2405
|
* effects plugin config. `maxParticles` here is the global warning line; the `maxParticles` of an
|
|
@@ -3370,4 +3386,4 @@ type UiApi = {
|
|
|
3370
3386
|
}> | undefined;
|
|
3371
3387
|
};
|
|
3372
3388
|
//#endregion
|
|
3373
|
-
export {
|
|
3389
|
+
export { Step as $, EmitterValue as A, NoiseValue as B, GradeValue as C, VignetteValue as D, ShineValue as E, FilterArea as F, Config$3 as G, UniformDeclaration as H, FilterComponent as I, State$3 as J, FramesValue as K, FilterSpec as L, BlurValue as M, ColorMatrixValue as N, EmitterConfig as O, DisplacementValue as P, SfxDescriptor as Q, FilterValueOf as R, FoldValue as S, RevealRoundValue as T, AnimApi as U, OutlineValue as V, AnimPlayerValue as W, types_d_exports$3 as X, Target as Y, HapticKind as Z, State$2 as _, wait as _t, AudioApi as a, mark as at, DissolveValue as b, MusicDescriptor as c, sequence as ct, State$1 as d, spawn as dt, HAPTIC_KINDS as et, VolumesFor as f, spawned as ft, EffectsStats as g, use as gt, EffectsApi as h, tween as ht, types_d_exports as i, haptic as it, AlphaValue as j, EmitterDefinition as k, MusicOptions as l, set as lt, Config$2 as m, stopSfx as mt, State as n, external as nt, AudioContextLike as o, parallel as ot, types_d_exports$1 as p, stagger as pt, MotionKeyframe as q, UiApi as r, frames as rt, Config$1 as s, play as st, Config as t, defineAnimation as tt, SoundEntry as u, sfx as ut, types_d_exports$2 as v, OverlayApi as vt, RevealLineValue as w, FlashValue as x, AuraValue as y, types_d_exports$4 as yt, GlowValue as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as Ease, Dr as TagType, Hn as Descriptor, Hr as Json, J as TransformValue, Kn as Hint, Nr as Api$5, Or as Api$2, Xn as AnchorTarget, Yn as Answered, Z as Api$3, Zn as ChangeHook, _t as ViewportSize, ci as Api, dr as AnyComponent, er as Motion, fn as Api$1, fr as AnyComponentType, gr as ComponentType, ir as ProjectionMotion, nr as MotionHandle, or as ReducedMotion, pr as AnyComponentValue, rr as NumericFields, s as Events$1, t as Api$4, tr as MotionCause, ur as ViewHandle, vi as Require, vr as Entity } from "./types-
|
|
1
|
+
import { $n as Ease, Dr as TagType, Hn as Descriptor, Hr as Json, J as TransformValue, Kn as Hint, Nr as Api$5, Or as Api$2, Xn as AnchorTarget, Yn as Answered, Z as Api$3, Zn as ChangeHook, _t as ViewportSize, ci as Api, dr as AnyComponent, er as Motion, fn as Api$1, fr as AnyComponentType, gr as ComponentType, ir as ProjectionMotion, nr as MotionHandle, or as ReducedMotion, pr as AnyComponentValue, rr as NumericFields, s as Events$1, t as Api$4, tr as MotionCause, ur as ViewHandle, vi as Require, vr as Entity } from "./types-BzVQAaSX.mjs";
|
|
2
2
|
import { Log } from "@moku-labs/common/browser";
|
|
3
3
|
import { PluginCtx } from "@moku-labs/core";
|
|
4
4
|
import { Node, Yoga } from "yoga-layout/load";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { An as FeaturePlugin, Br as Config, Hr as Json, Ir as FakeClock, Jr as ProviderCall, Mn as AnyFlow, Pr as ClockSource, Q as Config$2, Qr as SnapshotOf, Vn as TypeTag, Yr as SaveDoc, a as Config$3, d as Manifest, ht as Orientation, mn as Config$1, n as AssetsIo, nt as PixiModule, qr as PlayerStateProvider } from "./types-
|
|
2
|
-
import { o as AudioContextLike, s as Config$4 } from "./types-
|
|
3
|
-
import { H as I18nApi, J as TextKey, q as StringTable } from "./types-
|
|
4
|
-
import {
|
|
1
|
+
import { An as FeaturePlugin, Br as Config, Hr as Json, Ir as FakeClock, Jr as ProviderCall, Mn as AnyFlow, Pr as ClockSource, Q as Config$2, Qr as SnapshotOf, Vn as TypeTag, Yr as SaveDoc, a as Config$3, d as Manifest, ht as Orientation, mn as Config$1, n as AssetsIo, nt as PixiModule, qr as PlayerStateProvider } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { o as AudioContextLike, s as Config$4 } from "./types-Co-6A6Y8.mjs";
|
|
3
|
+
import { H as I18nApi, J as TextKey, q as StringTable } from "./types-Cx_-n0Ts.mjs";
|
|
4
|
+
import { Ct as platformPlugin, Ft as audioPlugin, Mt as effectsPlugin, Tt as PlatformProvider, i as screen, t as createApp } from "./index-Bz6p2alA.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/model/store/providers/memory.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Hr as Json, Zr as Snapshot } from "./types-
|
|
2
|
-
import { t as HeadlessApp } from "./headless-
|
|
1
|
+
import { Hr as Json, Zr as Snapshot } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { t as HeadlessApp } from "./headless-WyPk3UrP.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/flow/doors/types.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Nr as Api$4, Or as Api$1, Z as Api, ni as Api$3, zr as Api$2 } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
import { L as InputApi } from "./types-
|
|
4
|
-
import { r as Repro } from "./headless-
|
|
5
|
-
import { i as ControlApp, o as InputOf } from "./types-
|
|
6
|
-
import { t as commands } from "./commands-
|
|
1
|
+
import { Nr as Api$4, Or as Api$1, Z as Api, ni as Api$3, zr as Api$2 } from "./types-BzVQAaSX.mjs";
|
|
2
|
+
import { U as AnimApi, r as UiApi } from "./types-Co-6A6Y8.mjs";
|
|
3
|
+
import { L as InputApi } from "./types-Cx_-n0Ts.mjs";
|
|
4
|
+
import { r as Repro } from "./headless-WyPk3UrP.mjs";
|
|
5
|
+
import { i as ControlApp, o as InputOf } from "./types-DyohsXF_.mjs";
|
|
6
|
+
import { t as commands } from "./commands-DFCBw6F2.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/visual/types.d.ts
|
|
9
9
|
/** The base commands of the `/control` door, keyed by their short names. */
|
package/dist/visual.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-
|
|
1
|
+
import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-D5L3ZtuQ.mjs";
|
|
2
2
|
export { type CheckpointResult, type VisualApp, type VisualOptions, type VisualPage, type VisualRenderer, type VisualReport, type VisualSetup, type VisualStart, type VisualStep, type VisualTest, type VisualTestResult, type VisualTolerance, defineVisualTest, parseVisualArgv, runVisualTests };
|
package/llms.txt
CHANGED
|
@@ -28,7 +28,7 @@ Root exports:
|
|
|
28
28
|
- Plugin instances: `timePlugin`, `lifecyclePlugin`, `modelPlugin`, `clockPlugin`, `flowPlugin`, `worldPlugin`, `rendererPlugin`, `inputPlugin`, `assetsPlugin`, `scenesPlugin`, `animPlugin`, `i18nPlugin`, `textPlugin`, `uiPlugin`, `audioPlugin`, `effectsPlugin`, `platformPlugin`; the list `screen` = `world`, `renderer`, `input`, `assets`, `scenes`, `anim`, `i18n`, `text`, `ui`. `effects`, `audio` and `platform` are opt-in: `plugins: [...screen, effectsPlugin, audioPlugin, platformPlugin]`, `platform` last.
|
|
29
29
|
- Screen helpers from the root: `component`, `tag`, `resource`, `mut`, `system`, `projection`, `Layer`, `Order`, `Exiting`, `Tree`, `Now`, `Transform`, `Sprite`, `NineSlice`, `Shape`, `Parent`, `Display`, `Overlay`, `HudPart`, `sprite`, `Tappable`, `Pressable`, `Draggable`, `DropTarget`, `Swipeable`, `Traceable`, `Touchable`, `Held`, `Hovered`, `PointerOver`, `Pressed`, `Pointer`, `Traced`, `defineBundles`, `load`, `defineScene`.
|
|
30
30
|
- Interface helpers from the root (V3): `defineAnimation`, `sequence`, `parallel`, `stagger`, `tween`, `set`, `wait`, `mark`, `frames`, `sfx`, `haptic`, `use`, `spawn`, `spawned`, `play`, `external`, `defineMotion`, `Animation`, `Frames`, the resource `AnimPlayer`; `tr`, `messageArgument`, `messageDuration`; `Text`, `label`, `defineTextStyles`, `defineTextFormats`, `bind`, `Countdown` and the types `BindOptions`, `CountdownValue`, `TextFormat`, `TextFormats`, `TextFormatAnswer`, `TextFormatFunction`, `FormattedNumber`; `defineComponent`, `popup`, `defineStyle`, `defineTokens`, `resolve`, `Box`, `LocalWrite`, `DebugTrigger`, `ScrollState`; `music`. Also `stopSfx(id, { fadeMs? })` (ends a named sound, see audio) and `cubicBezier(x1, y1, x2, y2)` (a CSS-style easing curve for `tween`'s `ease`).
|
|
31
|
-
- Effects helpers from the root (V5): `defineEmitter`, `Emitter`, `defineFilter`, `Glow`, `Outline`, `Blur`, `ColorMatrix`, `Noise`, `Displacement`, `Alpha`; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Fold` and their value types `FlashValue`, `GradeValue`, `VignetteValue`, `RevealLineValue`, `RevealRoundValue`, `DissolveValue`, `ShineValue`, `FoldValue`.
|
|
31
|
+
- Effects helpers from the root (V5): `defineEmitter`, `Emitter`, `defineFilter`, `Glow`, `Outline`, `Blur`, `ColorMatrix`, `Noise`, `Displacement`, `Alpha`; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Aura`, `Fold` and their value types `FlashValue`, `GradeValue`, `VignetteValue`, `RevealLineValue`, `RevealRoundValue`, `DissolveValue`, `ShineValue`, `AuraValue`, `FoldValue`.
|
|
32
32
|
- Platform from the root (V6): the types `PlatformProvider`, `BackResult`, `HapticKind` and the frozen list `HAPTIC_KINDS`.
|
|
33
33
|
- `defineGame<Types>()` returns, typed by the game's `player`, `session`, `assets`, `bundles`, `scenes`, `strings`, `textStyles` and `textFormats`: `defineNode`, `defineFlow`, `defineFeature`, `projection`, `sprite`, `Sprite`, `NineSlice`, `defineBundles`, `load`, `defineScene`, `defineAnimation`, `frames`, `sfx`, `play`, `tr`, `label`, `bind`, `defineTextStyles`, `defineTextFormats`, `defineComponent`, `defineStyle`, `defineTokens`, `popup`, `music`, `Frames`, `defineEmitter`, `Emitter`, `Displacement`, and `system` (its `ctx.snapshot` typed by `player` and `session`), `volumes` (the `audio` config's reader of the typed player), `key` (string keys from data, below). `Types` is `{ player; session; assets: string; bundles?: string; scenes?: string; strings: Record<string, unknown>; textStyles?: string; textFormats?: string; emitters?: string }`.
|
|
34
34
|
- `@moku-labs/game/assets`: `scanAssets(options)`, `emitKeys`, `emitManifest`, `compileStrings(root, out, options?)`, `checkStrings`, `packAssets(options)`, `exportStrings`, `importStrings`, `runCli(argv, strings)` with `strings: StringsTools` = `{ compile: compileStrings, exportStrings, importStrings }`. Audio files are `.mp3` or `.m4a`. Asset key = feature (or layer name) + "." + path inside `assets/`; a sub-feature's own name, `features/episodes/ep01/assets/ward/room.png` → `ep01.ward.room`. `runCli` (a game's `bun run assets:keys`) scans the assets and compiles the `strings/<locale>.json` of every feature and sub-feature, and the `strings/` of every layer, into `generated/strings.ts` (the `Strings` type for `defineGame`), one `generated/strings.<locale>.ts` per locale for the top-level features and the layers, and `generated/strings.<feature>.<locale>.ts` per sub-feature with string files, its keys only, each starting with `<feature>.` (it imports `messageArgument` and `messageDuration` from `@moku-labs/game` when a message needs them, no helper is copied in); `--check` fails when any output is out of date; `--pack <dir>` writes the production build. `--layer <folder>[=<name>]`, repeatable and good with every mode, scans `<root>/<folder>/` like one more feature under `<name>` (`<folder>` alone maps to itself): its `assets.ts`, `assets/` and `strings/<locale>.json`. A game on the layered layout passes `--layer shared=ui`, so `shared/assets/*` keeps the `ui.*` keys. A missing layer folder is a warning. `scanAssets`, `compileStrings`, `exportStrings` and `importStrings` take the same map as `layers: { shared: "ui" }`. `--pseudo` also writes the pseudo-locale `en-XA`. `--export <dir>` and `--import <dir>` exchange strings with translators; `--source <locale>` names the locale they read from, `"en"` by default. The package bin `moku-game-assets` is this CLI: a script is `"assets:keys": "moku-game-assets --root src --manifest public/assets/manifest.json --keys src/generated/assets.ts"`. A game with `config.ts` runs `moku-game keys` and `moku-game pack` instead: they pass its paths and its layers.
|
|
@@ -676,7 +676,7 @@ Cosmetic rendering extras as data, drawn by `effectsPlugin`: `plugins: [...scree
|
|
|
676
676
|
- Filter inputs: `inputs: { blur: { stages: [FrostBox4, FrostGauss], chain: (value, { resolution }) => [{ stage, scale, uniforms? }] } }` gives the body `sampleBlur(uv)` in both languages: the last texture of a chain of stages (each a `defineFilter`, drawing alone) drawn from the view's input into pooled textures at `resolution × scale`. The chain runs only when a uniform or the resolution changed; a step naming a stage not in `stages` breaks the filter. The engine counts the passes (leave `passes` out). `fallback: OtherFilter` (a subset of the uniforms) draws when the filter is broken.
|
|
677
677
|
- Shader checks run in every build: every body, stage and fallback compiles once on the device when the renderer first draws, and the first scene mounts after the checks (`effects:mount-waited`). A broken filter (`effects:broken` with reason `compile`, `apply` or `chain`) draws its fallback or the view unfiltered, never a blank frame; a dev build also draws magenta stripes over it.
|
|
678
678
|
- Built-in filters: `Glow`, `Outline`, `Blur`, `ColorMatrix`, `Noise`, `Displacement` (`map` is an asset key), `Alpha`. A motion hook tweens them like any component: `view.tween(Glow, { strength: 0 }, { ms: 200 })`.
|
|
679
|
-
- The effect set: ready filters a feature lists in `filters`, as a game's own (`filters: [Flash]`; two features may list the same one): `Flash({ amount: 0..1, color })` washes the view with a colour, `Grade({ brightness, contrast, saturation, tint })` grades it (each 1 for none, 0..2), `Vignette({ x, y, radius, soft, color, amount })` darkens it outside a disc in 0..1 of the view, `RevealLine({ progress: 0..1, angle, soft })` shows it up to a line that sweeps across at `angle` (0 hides all, 1 shows all), `RevealRound({ x, y, radius: 0..1.5, soft, wobble: 0..0.2 })` shows it inside a disc (radius 0 hides all), `Dissolve({ progress: 0..1, scale, edge, edgeColor })` eats it away by a fixed noise of `scale` cells with a rim in `edgeColor`, `Shine({ position: -0.5..1.5, width, angle, strength })` sweeps a band of light across it (light on the colour only, the alpha kept), `Fold({ angle, axis: 0 | 1, perspective: 0..1, shade: 0..1 })` turns it about its vertical (`axis: 0`) or horizontal (`axis: 1`) axis, padded by 8 px. Each is one pass and one sample, `cache: "local"`, and on WebGPU a tween draws on the view's own quad from its third frame: `view.tween(Flash, { amount: 0 }, { ms: 160 })`. A view that carries a filter no feature lists draws unfiltered; a dev build warns `effects:filter-unlisted` once per id.
|
|
679
|
+
- The effect set: ready filters a feature lists in `filters`, as a game's own (`filters: [Flash]`; two features may list the same one): `Flash({ amount: 0..1, color })` washes the view with a colour, `Grade({ brightness, contrast, saturation, tint })` grades it (each 1 for none, 0..2), `Vignette({ x, y, radius, soft, color, amount })` darkens it outside a disc in 0..1 of the view, `RevealLine({ progress: 0..1, angle, soft })` shows it up to a line that sweeps across at `angle` (0 hides all, 1 shows all), `RevealRound({ x, y, radius: 0..1.5, soft, wobble: 0..0.2 })` shows it inside a disc (radius 0 hides all), `Dissolve({ progress: 0..1, scale, edge, edgeColor })` eats it away by a fixed noise of `scale` cells with a rim in `edgeColor`, `Shine({ position: -0.5..1.5, width, angle, strength })` sweeps a band of light across it (light on the colour only, the alpha kept), `Aura({ color, strength: 0..2, spread })` puts a halo `spread` px wide around its shape (padded by `spread`, 13 samples), `Fold({ angle, axis: 0 | 1, perspective: 0..1, shade: 0..1 })` turns it about its vertical (`axis: 0`) or horizontal (`axis: 1`) axis, padded by 8 px. Each is one pass and one sample (`Aura` 13), `cache: "local"`, and on WebGPU a tween draws on the view's own quad from its third frame: `view.tween(Flash, { amount: 0 }, { ms: 160 })`. A view that carries a filter no feature lists draws unfiltered; a dev build warns `effects:filter-unlisted` once per id.
|
|
680
680
|
- API: `app.effects.stats()` returns `{ particles, emitters, filters, renderPasses }`; headless every number is 0.
|
|
681
681
|
- `app.effects.diagnostics`: `kinds()` (built-ins, then feature filters, after start), `disable(kind)`, `enable(kind)`, `disabled()` (the off kinds in registration order). A switch acts on a dev or agent page only and answers `false` elsewhere or for an unknown kind (`effects:diagnostics-unknown`, once per id); an off kind keeps its instances and is left out of what the renderer draws from the next frame (`stats().filters` stays, `renderPasses` drops); a switch logs `effects:diagnostics` and writes a `switch` event to the performance log.
|
|
682
682
|
- Config: `maxParticles: 3000` and `maxPasses: 24`, each warns once per crossing; `phone: "auto"`; `blur: { quality: 2, phoneResolution: 0.5 }`.
|