@moku-labs/game 0.15.144 → 0.15.145
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/app/page.d.mts +1 -1
- package/dist/app/system.d.mts +3 -3
- package/dist/app.d.mts +3 -3
- package/dist/app.mjs +1 -1
- package/dist/{assets-D6LmjgQc.mjs → assets-Cw-dwgD4.mjs} +377 -147
- package/dist/assets.d.mts +9 -7
- package/dist/assets.mjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/{commands-DLHoLKme.d.mts → commands-7RWSJMv7.d.mts} +5 -5
- package/dist/control.d.mts +4 -4
- package/dist/{define-Yco7v9wv.d.mts → define-DK_J6R4D.d.mts} +2 -2
- package/dist/{headless-Def8N-1F.d.mts → headless-BcgzSec_.d.mts} +1 -1
- package/dist/{index-bracik73.d.mts → index-BFbScS-y.d.mts} +3 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- 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/{runtime-BMasjfv7.d.mts → runtime-RVZfCuNw.d.mts} +1 -1
- package/dist/{src-Ckz4E7D4.mjs → src-BR2Uw9Xz.mjs} +127 -14
- package/dist/testing.d.mts +4 -4
- package/dist/testing.mjs +1 -1
- package/dist/{types-Bj1uc5Qt.d.mts → types-BDCkyWXq.d.mts} +2 -2
- package/dist/{types-Dp8LeQTw.d.mts → types-C2hkiREP.d.mts} +2 -2
- package/dist/{types-DY1ck0TP.d.mts → types-DVNJ6JUa.d.mts} +4 -4
- package/dist/{types-BFoRyZqu.d.mts → types-NOciAl87.d.mts} +58 -11
- package/dist/{types-CwQ1ySw5.d.mts → types-rsz4pIqe.d.mts} +1 -1
- package/dist/{visual-CfI3T3Am.d.mts → visual-xIubQ2dq.d.mts} +6 -6
- package/dist/visual.d.mts +1 -1
- package/package.json +1 -1
package/dist/assets.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as Manifest } from "./types-
|
|
1
|
+
import { d as Manifest } from "./types-NOciAl87.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/assets/scan/cli.d.ts
|
|
4
4
|
/**
|
|
@@ -358,12 +358,14 @@ type PackResult = {
|
|
|
358
358
|
};
|
|
359
359
|
/**
|
|
360
360
|
* Packs the art of a game for production: per bundle, the textures of the `fx` group and of the
|
|
361
|
-
* `main` group go onto WebP atlas pages (2048 px at most
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
* the
|
|
361
|
+
* `main` group go onto WebP atlas pages (2048 px at most; 2 px padding and border with each frame's edge extruded 1 px
|
|
362
|
+
* into it, never rotated), a texture that is not a nine-slice is cropped to its visible pixels and
|
|
363
|
+
* the manifest keeps where the crop lay in the original (F198). A `main` texture above `LOOSE_SIDE`, a
|
|
364
|
+
* mipmapped one and a group of one stay loose files; a texture too large for the page is a
|
|
365
|
+
* problem. Fonts and sounds are copied, every file name carries the hash of its
|
|
366
|
+
* bytes, and the packed manifest (version 2) names it all. Nothing is written while a problem is
|
|
367
|
+
* open; afterwards the pack folder holds exactly what the manifest references, plus
|
|
368
|
+
* `manifest.json`. Two runs on the same tree and the same `sharp` write the same bytes.
|
|
367
369
|
*
|
|
368
370
|
* @param options - The sources, the scanned manifest, the pack folder, the manifest file, the cache.
|
|
369
371
|
* @returns The packed manifest and what was written.
|
package/dist/assets.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as runCli, c as emitKeys, i as compileStrings, l as emitManifest, n as importStrings, o as scanAssets, r as checkStrings, s as packAssets, t as exportStrings } from "./assets-
|
|
1
|
+
import { a as runCli, c as emitKeys, i as compileStrings, l as emitManifest, n as importStrings, o as scanAssets, r as checkStrings, s as packAssets, t as exportStrings } from "./assets-Cw-dwgD4.mjs";
|
|
2
2
|
export { checkStrings, compileStrings, emitKeys, emitManifest, exportStrings, importStrings, packAssets, runCli, scanAssets };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as resolveConfig } from "./config-DVqciSkP.mjs";
|
|
2
2
|
import { t as findFeatureOwners } from "./features-DowEilZm.mjs";
|
|
3
3
|
import { r as watchTree, t as createBatcher, x as isSkippedFolder$1 } from "./watch-BSgptowj.mjs";
|
|
4
|
-
import { a as runCli$1, i as compileStrings, n as importStrings, t as exportStrings } from "./assets-
|
|
4
|
+
import { a as runCli$1, i as compileStrings, n as importStrings, t as exportStrings } from "./assets-Cw-dwgD4.mjs";
|
|
5
5
|
import { constants, copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
|
|
6
6
|
import { homedir, networkInterfaces } from "node:os";
|
|
7
7
|
import path from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $r as Snapshot, Ar as Api$3, Fn as Bookmark, Fr as Api, O as DebugSwitches, Q as Api$2, Rn as FlowState, fi as FrameRate, gi as Time, ii as Api$1, mt as Captured, ti as StoreApi, w as ScenesApi } from "./types-
|
|
2
|
-
import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-
|
|
3
|
-
import { R 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 Snapshot, Ar as Api$3, Fn as Bookmark, Fr as Api, O as DebugSwitches, Q as Api$2, Rn as FlowState, fi as FrameRate, gi as Time, ii as Api$1, mt as Captured, ti as StoreApi, w as ScenesApi } from "./types-NOciAl87.mjs";
|
|
2
|
+
import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-BDCkyWXq.mjs";
|
|
3
|
+
import { R as InputApi } from "./types-rsz4pIqe.mjs";
|
|
4
|
+
import { t as HeadlessApp } from "./headless-BcgzSec_.mjs";
|
|
5
|
+
import { i as ControlApp, r as Command } from "./types-C2hkiREP.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-BcgzSec_.mjs";
|
|
2
|
+
import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-C2hkiREP.mjs";
|
|
3
|
+
import { t as commands } from "./commands-7RWSJMv7.mjs";
|
|
4
|
+
import { t as defineCommand } from "./define-DK_J6R4D.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-BcgzSec_.mjs";
|
|
2
|
+
import { l as Source, r as Command, s as InputSchema } from "./types-C2hkiREP.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/flow/doors/define.d.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Rn as FlowState, Vn as RouteStep, Wr as Json, Xn as Answer, mn as Api$1, ri as RngState, ui as Api, zn as JournalEntry } from "./types-
|
|
1
|
+
import { Rn as FlowState, Vn as RouteStep, Wr as Json, Xn as Answer, mn as Api$1, ri as RngState, ui as Api, zn as JournalEntry } from "./types-NOciAl87.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/flow/headless.d.ts
|
|
4
4
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as Config$6, Ar as Api$6, B as OverlayValue, C as SceneSpec, Cn as TextStylesOf, Cr as Mut, Dr as SystemDefinition, Dt as FrameRing, En as defineFlow, Er as ResourceType, Et as FrameRecord, Fr as Api$1, Gn as Effect, Gr as Root, Hn as SceneIdOf, Hr as Config$5, I as HudPartValue, In as DefineNode, Jn as Hint, Jr as Patch, K as SpriteOptions, Kn as EffectOptions, Kr as State$5, Lr as Config$2, Lt as PassKind, Mn as FeaturePlugin, Nn as FeatureTree, Nr as State$9, Or as SystemFor, Q as Api$4, R as NineSliceValue, S as SceneDefinition, Sn as TextFormatsOf, T as State$7, Tr as QueryTerm, U as ShapeValue, Wn as Descriptor, Wr as Json, X as sprite, Y as TransformValue, Zn as Answered, _ as AnySceneProjection, _n as EmitterIdOf, a as Config$1, ai as Config$4, ar as NumericFields, bi as Require, c as LoadBundles, ci as State$4, cr as ReducedMotion, di as Config$8, er as DescriptionNode, f as ReadyBundles, gn as Config$3, gr as ComponentHandle, hi as ThermalReading, hn as BundlesOf, i as BundleSpec, ii as Api$3, jn as FeatureDescription, jr as Config$9, kr as TagType, l as LoadReason, lt as State$6, m as Tier, mi as State$8, mn as Api$2, ni as RngApi, o as DefineBundles, oi as Events, or as ProjectionMotion, p as State$1, pi as RateChange, q as SpriteValue, qn as GuideOptions, r as BundleMap, si as PauseReason, sr as ProjectionSpec, t as Api, ti as StoreApi, tr as Ease, u as LoadResult, ui as Api$5, v as Config$7, vi as Config$10, vn as GameTypes, vr as ComponentType, w as ScenesApi, wr as Narrowed, x as LayerMap, xn as State$3, y as DefineScene, yi as Events$1, yn as HudKeysOf, yr as ComponentValue, yt as ViewportSize, zr as State$2 } from "./types-
|
|
2
|
-
import { $ as HapticKind, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, bt as OverlayApi, c as MusicDescriptor, d as State$11, et as SfxDescriptor, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, lt as play, m as Config$13, n as State$13, q as FramesValue, r as UiApi, rt as defineAnimation, s as Config$12, t as Config$14, tt as Step, w as GradeValue, x as DissolveValue, y as AuraValue, z as FilterValueOf } from "./types-
|
|
3
|
-
import { $ as ResolvedStyle, A as TextFormats, C as Point, E as TextBind, G as Message, H as Config$15, I as defineComponent, K as Part, L as Config$16, M as TextStyleInput, N as TextStyles, P as TextValue, Q as IsFlags, R as InputApi, T as TextApi, U as I18nApi, V as Argument, W as IntlKit, X as TypedTr, Y as TextKey, b as Config$17, et as Style, g as IntrinsicElementsFor, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, nt as TextTagStyle, q as State$14, rt as WhenFlags, s as PopupComponent, v as BindField, w as State$16, x as CountdownValue, y as BindOptions, z as State$15 } from "./types-
|
|
1
|
+
import { $ as Config$6, Ar as Api$6, B as OverlayValue, C as SceneSpec, Cn as TextStylesOf, Cr as Mut, Dr as SystemDefinition, Dt as FrameRing, En as defineFlow, Er as ResourceType, Et as FrameRecord, Fr as Api$1, Gn as Effect, Gr as Root, Hn as SceneIdOf, Hr as Config$5, I as HudPartValue, In as DefineNode, Jn as Hint, Jr as Patch, K as SpriteOptions, Kn as EffectOptions, Kr as State$5, Lr as Config$2, Lt as PassKind, Mn as FeaturePlugin, Nn as FeatureTree, Nr as State$9, Or as SystemFor, Q as Api$4, R as NineSliceValue, S as SceneDefinition, Sn as TextFormatsOf, T as State$7, Tr as QueryTerm, U as ShapeValue, Wn as Descriptor, Wr as Json, X as sprite, Y as TransformValue, Zn as Answered, _ as AnySceneProjection, _n as EmitterIdOf, a as Config$1, ai as Config$4, ar as NumericFields, bi as Require, c as LoadBundles, ci as State$4, cr as ReducedMotion, di as Config$8, er as DescriptionNode, f as ReadyBundles, gn as Config$3, gr as ComponentHandle, hi as ThermalReading, hn as BundlesOf, i as BundleSpec, ii as Api$3, jn as FeatureDescription, jr as Config$9, kr as TagType, l as LoadReason, lt as State$6, m as Tier, mi as State$8, mn as Api$2, ni as RngApi, o as DefineBundles, oi as Events, or as ProjectionMotion, p as State$1, pi as RateChange, q as SpriteValue, qn as GuideOptions, r as BundleMap, si as PauseReason, sr as ProjectionSpec, t as Api, ti as StoreApi, tr as Ease, u as LoadResult, ui as Api$5, v as Config$7, vi as Config$10, vn as GameTypes, vr as ComponentType, w as ScenesApi, wr as Narrowed, x as LayerMap, xn as State$3, y as DefineScene, yi as Events$1, yn as HudKeysOf, yr as ComponentValue, yt as ViewportSize, zr as State$2 } from "./types-NOciAl87.mjs";
|
|
2
|
+
import { $ as HapticKind, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, bt as OverlayApi, c as MusicDescriptor, d as State$11, et as SfxDescriptor, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, lt as play, m as Config$13, n as State$13, q as FramesValue, r as UiApi, rt as defineAnimation, s as Config$12, t as Config$14, tt as Step, w as GradeValue, x as DissolveValue, y as AuraValue, z as FilterValueOf } from "./types-BDCkyWXq.mjs";
|
|
3
|
+
import { $ as ResolvedStyle, A as TextFormats, C as Point, E as TextBind, G as Message, H as Config$15, I as defineComponent, K as Part, L as Config$16, M as TextStyleInput, N as TextStyles, P as TextValue, Q as IsFlags, R as InputApi, T as TextApi, U as I18nApi, V as Argument, W as IntlKit, X as TypedTr, Y as TextKey, b as Config$17, et as Style, g as IntrinsicElementsFor, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, nt as TextTagStyle, q as State$14, rt as WhenFlags, s as PopupComponent, v as BindField, w as State$16, x as CountdownValue, y as BindOptions, z as State$15 } from "./types-rsz4pIqe.mjs";
|
|
4
4
|
import { Log } from "@moku-labs/common/browser";
|
|
5
5
|
import { PluginCtx } from "@moku-labs/core";
|
|
6
6
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as PerfSampleLine, An as type, At as MonitorSections, B as OverlayValue, Br as types_d_exports$3, Bt as PerfChange, Ct as FrameColumns, Dn as exit, Dt as FrameRing, E as types_d_exports$13, Et as FrameRecord, F as HudPart, Ft as PERF_LOG_VERSION, G as SpriteBlend, Gt as PerfEventLine, H as Shape, Ht as PerfCollectorLine, I as HudPartValue, It as PROBLEM_RULES, J as Transform, Jt as PerfHeaderLine, Kt as PerfEventName, L as NineSlice, Lt as PassKind, Mt as OverlayWhat, N as WhyEntry, Nt as PERF_CAUSES, On as slot, Ot as LongFrameEntry, P as Display, Pr as types_d_exports$17, Pt as PERF_GAP_BUCKETS, Qn as AnchorTarget, Qr as SaveUnreadableError, Qt as PerfMeasured, Rt as PassRecord, St as WhyLive, Tn as contribution, Tt as FrameReadout, Ut as PerfCounts, V as Parent, Vt as PerfChangeEntry, W as Sprite, Wt as PerfDisplay, X as sprite, Xt as PerfLongFrameLine, Yt as PerfLogLine, Z as AdaptiveScale, Zt as PerfMarkLine, _i as types_d_exports$15, an as ProblemEventDetail, cn as ShaderEventDetail, ct as PoolTrim, dn as CANVAS_RESTARTS, dt as types_d_exports$12, en as PerfSpikeLine, er as DescriptionNode, et as MonitorConfig, fn as CanvasRestart, ft as ShotsApi, g as types_d_exports$1, ht as MonitorCounts, in as PoolTrimDetail, jt as OverlayEventDetail, kn as to, kt as MONITOR_SECTIONS, li as types_d_exports$9, ln as ShaderWhat, lr as SceneSwitch, nn as PerfTelemetryLine, on as ProblemRule, pn as DEMAND_REASONS, pt as ShotsConfig, qr as types_d_exports$10, qt as PerfGapLine, rn as PerfThermalLine, sn as SHADER_WHATS, tn as PerfStartupLine, un as WarmDetail, wn as types_d_exports$6, wt as FrameReadResult, xt as RetakeWhy, z as Overlay, zt as PerfCause } from "./types-
|
|
2
|
-
import { $ as HapticKind, C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as types_d_exports, S as FlashValue, T as RevealLineValue, _t as tween, at as frames, b as BloomValue, ct as parallel, dt as set, ft as sfx, gt as stopSfx, ht as stagger, i as types_d_exports$16, it as external, lt as play, mt as spawned, nt as HAPTIC_KINDS, ot as haptic, p as types_d_exports$2, pt as spawn, rt as defineAnimation, st as mark, ut as sequence, v as types_d_exports$5, vt as use, w as GradeValue, x as DissolveValue, xt as types_d_exports$4, y as AuraValue, yt as wait } from "./types-
|
|
3
|
-
import { A as TextFormats, B as types_d_exports$8, D as TextFormat, F as types_d_exports$14, I as defineComponent, O as TextFormatAnswer, S as FormattedNumber, Z as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, m as popup, nt as TextTagStyle, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-
|
|
4
|
-
import { $ as Traced, A as messageDuration, At as inputPlugin, B as Draggable, Bt as Countdown, C as Noise, Ct as rendererPlugin, D as defineStyle, Dt as types_d_exports$11, E as resolve, Et as PlatformProvider, F as Frames, Ft as clockPlugin, G as PointerOver, Gt as label, H as Held, Ht as bind, I as defineScene, It as audioPlugin, J as Swipeable, K as Pressable, L as defineBundles, Lt as assetsPlugin, M as defineMotion, Mt as flowPlugin, N as AnimPlayer, Nt as effectsPlugin, O as tr, Ot as modelPlugin, P as Animation, Pt as debugPlugin, Q as Traceable, R as load, Rt as animPlugin, S as Glow, St as scenesPlugin, T as music, Tt as BackResult, U as Hovered, Ut as defineTextFormats, V as DropTarget, Vt as Text, W as Pointer, Wt as defineTextStyles, X as Tappable, Y as TapValue, Z as Touchable, _ as defineFilter, _t as flattenFeatures, a as defineEmitter, at as Order, b as ColorMatrix, bt as timePlugin, c as Shine, ct as mut, d as Grade, dt as tag, et as PASS_KINDS, f as Fold, ft as defineEffect, g as Aura, gt as defineFeature, h as Bloom, ht as schedule, i as screen, it as Now, j as cubicBezier, jt as i18nPlugin, k as messageArgument, kt as lifecyclePlugin, l as RevealRound, lt as resource, m as Dissolve, mt as hint, n as createPlugin, nt as Exiting, o as Emitter, ot as Tree, p as Flash, pt as guide, q as Pressed, r as defineGame, rt as Layer, s as Vignette, st as component, t as createApp, tt as frameAt, u as RevealLine, ut as system, v as Alpha, vt as worldPlugin, w as Outline, wt as platformPlugin, x as Displacement, xt as textPlugin, y as Blur, yt as uiPlugin, z as ready, zt as projection } from "./index-
|
|
1
|
+
import { $t as PerfSampleLine, An as type, At as MonitorSections, B as OverlayValue, Br as types_d_exports$3, Bt as PerfChange, Ct as FrameColumns, Dn as exit, Dt as FrameRing, E as types_d_exports$13, Et as FrameRecord, F as HudPart, Ft as PERF_LOG_VERSION, G as SpriteBlend, Gt as PerfEventLine, H as Shape, Ht as PerfCollectorLine, I as HudPartValue, It as PROBLEM_RULES, J as Transform, Jt as PerfHeaderLine, Kt as PerfEventName, L as NineSlice, Lt as PassKind, Mt as OverlayWhat, N as WhyEntry, Nt as PERF_CAUSES, On as slot, Ot as LongFrameEntry, P as Display, Pr as types_d_exports$17, Pt as PERF_GAP_BUCKETS, Qn as AnchorTarget, Qr as SaveUnreadableError, Qt as PerfMeasured, Rt as PassRecord, St as WhyLive, Tn as contribution, Tt as FrameReadout, Ut as PerfCounts, V as Parent, Vt as PerfChangeEntry, W as Sprite, Wt as PerfDisplay, X as sprite, Xt as PerfLongFrameLine, Yt as PerfLogLine, Z as AdaptiveScale, Zt as PerfMarkLine, _i as types_d_exports$15, an as ProblemEventDetail, cn as ShaderEventDetail, ct as PoolTrim, dn as CANVAS_RESTARTS, dt as types_d_exports$12, en as PerfSpikeLine, er as DescriptionNode, et as MonitorConfig, fn as CanvasRestart, ft as ShotsApi, g as types_d_exports$1, ht as MonitorCounts, in as PoolTrimDetail, jt as OverlayEventDetail, kn as to, kt as MONITOR_SECTIONS, li as types_d_exports$9, ln as ShaderWhat, lr as SceneSwitch, nn as PerfTelemetryLine, on as ProblemRule, pn as DEMAND_REASONS, pt as ShotsConfig, qr as types_d_exports$10, qt as PerfGapLine, rn as PerfThermalLine, sn as SHADER_WHATS, tn as PerfStartupLine, un as WarmDetail, wn as types_d_exports$6, wt as FrameReadResult, xt as RetakeWhy, z as Overlay, zt as PerfCause } from "./types-NOciAl87.mjs";
|
|
2
|
+
import { $ as HapticKind, C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as types_d_exports, S as FlashValue, T as RevealLineValue, _t as tween, at as frames, b as BloomValue, ct as parallel, dt as set, ft as sfx, gt as stopSfx, ht as stagger, i as types_d_exports$16, it as external, lt as play, mt as spawned, nt as HAPTIC_KINDS, ot as haptic, p as types_d_exports$2, pt as spawn, rt as defineAnimation, st as mark, ut as sequence, v as types_d_exports$5, vt as use, w as GradeValue, x as DissolveValue, xt as types_d_exports$4, y as AuraValue, yt as wait } from "./types-BDCkyWXq.mjs";
|
|
3
|
+
import { A as TextFormats, B as types_d_exports$8, D as TextFormat, F as types_d_exports$14, I as defineComponent, O as TextFormatAnswer, S as FormattedNumber, Z as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as TextRunStyle, k as TextFormatFunction, m as popup, nt as TextTagStyle, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-rsz4pIqe.mjs";
|
|
4
|
+
import { $ as Traced, A as messageDuration, At as inputPlugin, B as Draggable, Bt as Countdown, C as Noise, Ct as rendererPlugin, D as defineStyle, Dt as types_d_exports$11, E as resolve, Et as PlatformProvider, F as Frames, Ft as clockPlugin, G as PointerOver, Gt as label, H as Held, Ht as bind, I as defineScene, It as audioPlugin, J as Swipeable, K as Pressable, L as defineBundles, Lt as assetsPlugin, M as defineMotion, Mt as flowPlugin, N as AnimPlayer, Nt as effectsPlugin, O as tr, Ot as modelPlugin, P as Animation, Pt as debugPlugin, Q as Traceable, R as load, Rt as animPlugin, S as Glow, St as scenesPlugin, T as music, Tt as BackResult, U as Hovered, Ut as defineTextFormats, V as DropTarget, Vt as Text, W as Pointer, Wt as defineTextStyles, X as Tappable, Y as TapValue, Z as Touchable, _ as defineFilter, _t as flattenFeatures, a as defineEmitter, at as Order, b as ColorMatrix, bt as timePlugin, c as Shine, ct as mut, d as Grade, dt as tag, et as PASS_KINDS, f as Fold, ft as defineEffect, g as Aura, gt as defineFeature, h as Bloom, ht as schedule, i as screen, it as Now, j as cubicBezier, jt as i18nPlugin, k as messageArgument, kt as lifecyclePlugin, l as RevealRound, lt as resource, m as Dissolve, mt as hint, n as createPlugin, nt as Exiting, o as Emitter, ot as Tree, p as Flash, pt as guide, q as Pressed, r as defineGame, rt as Layer, s as Vignette, st as component, t as createApp, tt as frameAt, u as RevealLine, ut as system, v as Alpha, vt as worldPlugin, w as Outline, wt as platformPlugin, x as Displacement, xt as textPlugin, y as Blur, yt as uiPlugin, z as ready, zt as projection } from "./index-BFbScS-y.mjs";
|
|
5
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, Bloom, type BloomValue, 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, type TextRunStyle, type TextTagStyle, 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 HAPTIC_KINDS, $t as PASS_KINDS, A as types_exports$17, At as Traced, B as types_exports$7, Bt as Glow, C as defineFeature, Ct as PointerOver, D as defineBundles, Dt as Tappable, E as music, Et as Swipeable, F as types_exports$12, Ft as Emitter, G as types_exports$2, Gt as audioPlugin, H as types_exports$5, Ht as Outline, I as types_exports$11, It as Alpha, J as uiPlugin, Jt as animPlugin, K as types_exports$1, Kt as scenesPlugin, L as types_exports$10, Lt as Blur, M as types_exports$15, Mt as messageArgument, N as types_exports$14, Nt as messageDuration, O as load, Ot as Touchable, P as types_exports$13, Pt as effectsPlugin, Q as platformPlugin, Qt as rendererPlugin, R as types_exports$9, Rt as ColorMatrix, S as tr, St as Pointer, T as defineEmitter, Tt as Pressed, U as types_exports$4, Ut as defineFilter, V as types_exports$6, Vt as Noise, W as types_exports$3, Wt as debugPlugin, X as defineMotion, Xt as Animation, Y as resolve, Yt as AnimPlayer, Z as textPlugin, Zt as Frames, _ as guide, _n as modelPlugin, _t as inputPlugin, a as Vignette, an as PROBLEM_RULES, at as parallel, b as projection, bn as lifecyclePlugin, bt as Held, c as RevealLine, cn as DEMAND_REASONS, ct as set, d as Flash, dt as spawned, en as frameAt, et as defineAnimation, f as Dissolve, fn as contribution, ft as stagger, g as defineEffect, gn as type, gt as wait, h as cubicBezier, hn as to, ht as use, i as screen, in as PERF_LOG_VERSION, it as mark, j as types_exports$16, jt as i18nPlugin, k as ready, kt as Traceable, l as Grade, ln as worldPlugin, lt as sfx, m as Aura, mn as slot, mt as tween, n as createPlugin, nn as PERF_CAUSES, nt as frames, o as Shine, on as SHADER_WHATS, ot as play, p as Bloom, pn as exit, pt as stopSfx, q as types_exports, qt as assetsPlugin, r as defineGame, rn as PERF_GAP_BUCKETS, rt as haptic, s as RevealRound, sn as CANVAS_RESTARTS, st as sequence, t as createApp, tn as MONITOR_SECTIONS, tt as external, u as Fold, un as flowPlugin, ut as spawn, v as hint, vn as SaveUnreadableError, vt as Draggable, w as flattenFeatures, wt as Pressable, x as defineScene, xn as timePlugin, xt as Hovered, y as schedule, yn as clockPlugin, yt as DropTarget, z as types_exports$8, zt as Displacement } from "./src-
|
|
1
|
+
import { $ as HAPTIC_KINDS, $t as PASS_KINDS, A as types_exports$17, At as Traced, B as types_exports$7, Bt as Glow, C as defineFeature, Ct as PointerOver, D as defineBundles, Dt as Tappable, E as music, Et as Swipeable, F as types_exports$12, Ft as Emitter, G as types_exports$2, Gt as audioPlugin, H as types_exports$5, Ht as Outline, I as types_exports$11, It as Alpha, J as uiPlugin, Jt as animPlugin, K as types_exports$1, Kt as scenesPlugin, L as types_exports$10, Lt as Blur, M as types_exports$15, Mt as messageArgument, N as types_exports$14, Nt as messageDuration, O as load, Ot as Touchable, P as types_exports$13, Pt as effectsPlugin, Q as platformPlugin, Qt as rendererPlugin, R as types_exports$9, Rt as ColorMatrix, S as tr, St as Pointer, T as defineEmitter, Tt as Pressed, U as types_exports$4, Ut as defineFilter, V as types_exports$6, Vt as Noise, W as types_exports$3, Wt as debugPlugin, X as defineMotion, Xt as Animation, Y as resolve, Yt as AnimPlayer, Z as textPlugin, Zt as Frames, _ as guide, _n as modelPlugin, _t as inputPlugin, a as Vignette, an as PROBLEM_RULES, at as parallel, b as projection, bn as lifecyclePlugin, bt as Held, c as RevealLine, cn as DEMAND_REASONS, ct as set, d as Flash, dt as spawned, en as frameAt, et as defineAnimation, f as Dissolve, fn as contribution, ft as stagger, g as defineEffect, gn as type, gt as wait, h as cubicBezier, hn as to, ht as use, i as screen, in as PERF_LOG_VERSION, it as mark, j as types_exports$16, jt as i18nPlugin, k as ready, kt as Traceable, l as Grade, ln as worldPlugin, lt as sfx, m as Aura, mn as slot, mt as tween, n as createPlugin, nn as PERF_CAUSES, nt as frames, o as Shine, on as SHADER_WHATS, ot as play, p as Bloom, pn as exit, pt as stopSfx, q as types_exports, qt as assetsPlugin, r as defineGame, rn as PERF_GAP_BUCKETS, rt as haptic, s as RevealRound, sn as CANVAS_RESTARTS, st as sequence, t as createApp, tn as MONITOR_SECTIONS, tt as external, u as Fold, un as flowPlugin, ut as spawn, v as hint, vn as SaveUnreadableError, vt as Draggable, w as flattenFeatures, wt as Pressable, x as defineScene, xn as timePlugin, xt as Hovered, y as schedule, yn as clockPlugin, yt as DropTarget, z as types_exports$8, zt as Displacement } from "./src-BR2Uw9Xz.mjs";
|
|
2
2
|
import { $ as Overlay, D as defineStyle, E as defineTokens, L as defineTextFormats, M as Countdown, N as Text, P as bind, Q as NineSlice, R as defineTextStyles, X as Display, Z as HudPart, _ as DebugTrigger, ct as Exiting, dt as Order, ft as Tree, gt as system, h as Box, ht as resource, it as Transform, lt as Layer, mt as mut, nt as Shape, pt as component, rt as Sprite, st as sprite, tt as Parent, ut as Now, vt as tag, w as popup, x as ScrollState, y as LocalWrite, z as label } from "./visual-x0TPowBE.mjs";
|
|
3
3
|
import { t as defineComponent } from "./component-DGg5DqKK.mjs";
|
|
4
4
|
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Aura, Bloom, 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 { $r as Snapshot, Ar as Api$1, Ln as FlowGraph, Mr as Explained, Q as Api$2, Sr as FrameDiff, Vr as Api, _r as ComponentSchema, bn as Position, gt as RenderStats, h as Usage, t as Api$3, ut as Under, xr as EntitySnapshot, zn as JournalEntry } from "./types-
|
|
2
|
-
import { W as AnimApi, Z as TimelinesSnapshot, 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 { $r as Snapshot, Ar as Api$1, Ln as FlowGraph, Mr as Explained, Q as Api$2, Sr as FrameDiff, Vr as Api, _r as ComponentSchema, bn as Position, gt as RenderStats, h as Usage, t as Api$3, ut as Under, xr as EntitySnapshot, zn as JournalEntry } from "./types-NOciAl87.mjs";
|
|
2
|
+
import { W as AnimApi, Z as TimelinesSnapshot, a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-BDCkyWXq.mjs";
|
|
3
|
+
import { c as UiNode } from "./types-rsz4pIqe.mjs";
|
|
4
|
+
import { t as HeadlessApp } from "./headless-BcgzSec_.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-C2hkiREP.mjs";
|
|
6
|
+
import { n as defineSource } from "./define-DK_J6R4D.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-RVZfCuNw.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-RVZfCuNw.mjs";
|
|
2
2
|
export { Fragment, type JSX, jsx, jsxs };
|
|
@@ -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-rsz4pIqe.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. */
|
|
@@ -31435,33 +31435,65 @@ function createTexture(sctx, image, options) {
|
|
|
31435
31435
|
return bordered;
|
|
31436
31436
|
}
|
|
31437
31437
|
/**
|
|
31438
|
-
* Tells whether a frame
|
|
31439
|
-
*
|
|
31438
|
+
* Tells whether a frame carries the four trim fields. An incomplete set counts as none.
|
|
31439
|
+
*
|
|
31440
|
+
* @param frame - The frame.
|
|
31441
|
+
* @returns True when the offset and the original size are all numbers.
|
|
31442
|
+
* @example
|
|
31443
|
+
* ```ts
|
|
31444
|
+
* isTrimmed({ x: 0, y: 0, width: 8, height: 8, offsetX: 0, offsetY: 0, origWidth: 10 }); // false
|
|
31445
|
+
* ```
|
|
31446
|
+
*/
|
|
31447
|
+
function isTrimmed(frame) {
|
|
31448
|
+
return typeof frame.offsetX === "number" && typeof frame.offsetY === "number" && typeof frame.origWidth === "number" && typeof frame.origHeight === "number";
|
|
31449
|
+
}
|
|
31450
|
+
/**
|
|
31451
|
+
* Tells whether a frame lies inside a page of the given size, and a trimmed frame inside its
|
|
31452
|
+
* original too. A negative number, or one that is not a number, lies outside.
|
|
31440
31453
|
*
|
|
31441
31454
|
* @param frame - The frame in page pixels.
|
|
31442
31455
|
* @param page - The size of the page.
|
|
31443
31456
|
* @param page.width - Width of the page in pixels.
|
|
31444
31457
|
* @param page.height - Height of the page in pixels.
|
|
31445
|
-
* @returns True when the whole frame is on the page.
|
|
31458
|
+
* @returns True when the whole frame is on the page and, when trimmed, in its original.
|
|
31446
31459
|
* @example
|
|
31447
31460
|
* ```ts
|
|
31448
31461
|
* frameFits({ x: 256, y: 384, width: 256, height: 128 }, { width: 512, height: 512 }); // true
|
|
31449
31462
|
* ```
|
|
31450
31463
|
*/
|
|
31451
31464
|
function frameFits(frame, page) {
|
|
31452
|
-
|
|
31465
|
+
const onPage = frame.x >= 0 && frame.y >= 0 && frame.width >= 0 && frame.height >= 0 && frame.x + frame.width <= page.width && frame.y + frame.height <= page.height;
|
|
31466
|
+
if (!onPage || !isTrimmed(frame)) return onPage;
|
|
31467
|
+
return frame.offsetX >= 0 && frame.offsetY >= 0 && frame.offsetX + frame.width <= frame.origWidth && frame.offsetY + frame.height <= frame.origHeight;
|
|
31468
|
+
}
|
|
31469
|
+
/**
|
|
31470
|
+
* The `orig` and `trim` Pixi gives a slice of a trimmed frame: the original's size, and where the
|
|
31471
|
+
* frame's pixels lie in it. A frame without the four fields gets neither.
|
|
31472
|
+
*
|
|
31473
|
+
* @param pixi - The Pixi module.
|
|
31474
|
+
* @param frame - The frame.
|
|
31475
|
+
* @returns The two rectangles, or nothing for an untrimmed frame.
|
|
31476
|
+
*/
|
|
31477
|
+
function trimOf(pixi, frame) {
|
|
31478
|
+
if (!isTrimmed(frame)) return {};
|
|
31479
|
+
return {
|
|
31480
|
+
orig: new pixi.Rectangle(0, 0, frame.origWidth, frame.origHeight),
|
|
31481
|
+
trim: new pixi.Rectangle(frame.offsetX, frame.offsetY, frame.width, frame.height)
|
|
31482
|
+
};
|
|
31453
31483
|
}
|
|
31454
31484
|
/**
|
|
31455
31485
|
* Cuts a texture out of an atlas page, on behalf of `assets`. The slice shares the page's source,
|
|
31456
31486
|
* its frame is offset by the page's own frame, and it is marked as a slice so `destroyTexture`
|
|
31457
|
-
* frees only the wrapper.
|
|
31487
|
+
* frees only the wrapper. A trimmed frame also gets `orig` and `trim`, so the slice answers the
|
|
31488
|
+
* size of its original (F198).
|
|
31458
31489
|
*
|
|
31459
31490
|
* @param sctx - Domain context of the sync module.
|
|
31460
31491
|
* @param page - The page texture.
|
|
31461
|
-
* @param frame - The frame in page pixels.
|
|
31492
|
+
* @param frame - The frame in page pixels, with the four trim fields when it was trimmed.
|
|
31462
31493
|
* @param options - Nine-slice borders, in pixels.
|
|
31463
31494
|
* @returns The slice.
|
|
31464
|
-
* @throws {Error} When the renderer does not draw, and when the frame does not fit in the page
|
|
31495
|
+
* @throws {Error} When the renderer does not draw, and when the frame does not fit in the page or
|
|
31496
|
+
* a trimmed frame not in its original.
|
|
31465
31497
|
*/
|
|
31466
31498
|
function sliceTexture(sctx, page, frame, options) {
|
|
31467
31499
|
const pixi = drawingPixi(sctx, "slice");
|
|
@@ -31470,6 +31502,7 @@ function sliceTexture(sctx, page, frame, options) {
|
|
|
31470
31502
|
const slice = new pixi.Texture({
|
|
31471
31503
|
source: page.source,
|
|
31472
31504
|
frame: new pixi.Rectangle(page.frame.x + frame.x, page.frame.y + frame.y, frame.width, frame.height),
|
|
31505
|
+
...trimOf(pixi, frame),
|
|
31473
31506
|
...nine === void 0 ? {} : { defaultBorders: defaultBordersOf(nine) }
|
|
31474
31507
|
});
|
|
31475
31508
|
sctx.ctx.state.sync.slices.add(slice);
|
|
@@ -31491,6 +31524,51 @@ function frameKeyOf(key, width, height) {
|
|
|
31491
31524
|
return `${key}@${width}x${height}`;
|
|
31492
31525
|
}
|
|
31493
31526
|
/**
|
|
31527
|
+
* The crop of an untrimmed base: the part of its frame inside `crop`.
|
|
31528
|
+
*
|
|
31529
|
+
* @param pixi - The Pixi module.
|
|
31530
|
+
* @param base - The untrimmed texture.
|
|
31531
|
+
* @param crop - The part of the base to show, in its pixels.
|
|
31532
|
+
* @returns The crop, sharing the base's source.
|
|
31533
|
+
*/
|
|
31534
|
+
function plainCrop(pixi, base, crop) {
|
|
31535
|
+
return new pixi.Texture({
|
|
31536
|
+
source: base.source,
|
|
31537
|
+
frame: new pixi.Rectangle(base.frame.x + crop.x, base.frame.y + crop.y, crop.width, crop.height)
|
|
31538
|
+
});
|
|
31539
|
+
}
|
|
31540
|
+
/**
|
|
31541
|
+
* The crop of a trimmed base (F198). The crop is in original pixels, the base's pixels lie at its
|
|
31542
|
+
* trim: the crop draws their common part `I`, not rounded, where it lies in the crop, and keeps the
|
|
31543
|
+
* crop's size. A crop that misses the trim draws nothing, over one pixel of the base's own frame,
|
|
31544
|
+
* so it never shows a neighbour on the page.
|
|
31545
|
+
*
|
|
31546
|
+
* @param pixi - The Pixi module.
|
|
31547
|
+
* @param base - The trimmed texture.
|
|
31548
|
+
* @param trim - Where the base's pixels lie in its original.
|
|
31549
|
+
* @param crop - The part of the original to show.
|
|
31550
|
+
* @returns The crop, sharing the base's source.
|
|
31551
|
+
*/
|
|
31552
|
+
function trimmedCrop(pixi, base, trim, crop) {
|
|
31553
|
+
const left = Math.max(crop.x, trim.x);
|
|
31554
|
+
const top = Math.max(crop.y, trim.y);
|
|
31555
|
+
const width = Math.min(crop.x + crop.width, trim.x + trim.width) - left;
|
|
31556
|
+
const height = Math.min(crop.y + crop.height, trim.y + trim.height) - top;
|
|
31557
|
+
const orig = new pixi.Rectangle(0, 0, crop.width, crop.height);
|
|
31558
|
+
if (width <= 0 || height <= 0) return new pixi.Texture({
|
|
31559
|
+
source: base.source,
|
|
31560
|
+
frame: new pixi.Rectangle(base.frame.x, base.frame.y, 1, 1),
|
|
31561
|
+
orig,
|
|
31562
|
+
trim: new pixi.Rectangle(0, 0, 0, 0)
|
|
31563
|
+
});
|
|
31564
|
+
return new pixi.Texture({
|
|
31565
|
+
source: base.source,
|
|
31566
|
+
frame: new pixi.Rectangle(base.frame.x + left - trim.x, base.frame.y + top - trim.y, width, height),
|
|
31567
|
+
orig,
|
|
31568
|
+
trim: new pixi.Rectangle(left - crop.x, top - crop.y, width, height)
|
|
31569
|
+
});
|
|
31570
|
+
}
|
|
31571
|
+
/**
|
|
31494
31572
|
* The texture a `"cover"` sprite draws: the part of `base` inside `crop`, sharing its source. One
|
|
31495
31573
|
* crop per asset key and box, shared by every entity that shows it; the entity is added to its
|
|
31496
31574
|
* users. A key that answers a new base has been invalidated, so every view of it resolves again
|
|
@@ -31503,7 +31581,8 @@ function frameKeyOf(key, width, height) {
|
|
|
31503
31581
|
* @param box - The box the sprite covers, which names the crop.
|
|
31504
31582
|
* @param box.width - Width of the box.
|
|
31505
31583
|
* @param box.height - Height of the box.
|
|
31506
|
-
* @param crop - The part of the base to show, in texture pixels
|
|
31584
|
+
* @param crop - The part of the base to show, in texture pixels: those of the original for a
|
|
31585
|
+
* trimmed base, whose `width` and `height` are the original's.
|
|
31507
31586
|
* @returns The crop and its `frames` key, or the base and `""` while inert.
|
|
31508
31587
|
*/
|
|
31509
31588
|
function coverTexture(sctx, entity, key, base, box, crop) {
|
|
@@ -31523,10 +31602,8 @@ function coverTexture(sctx, entity, key, base, box, crop) {
|
|
|
31523
31602
|
frameKey: ""
|
|
31524
31603
|
};
|
|
31525
31604
|
if (cached !== void 0) cached.texture.destroy(false);
|
|
31526
|
-
const
|
|
31527
|
-
|
|
31528
|
-
frame: new pixi.Rectangle(base.frame.x + crop.x, base.frame.y + crop.y, crop.width, crop.height)
|
|
31529
|
-
});
|
|
31605
|
+
const trim = base.trim;
|
|
31606
|
+
const texture = trim === void 0 ? plainCrop(pixi, base, crop) : trimmedCrop(pixi, base, trim, crop);
|
|
31530
31607
|
const users = emptySet$5();
|
|
31531
31608
|
users.add(entity);
|
|
31532
31609
|
frames.set(frameKey, {
|
|
@@ -42530,10 +42607,45 @@ function parseNine(value) {
|
|
|
42530
42607
|
};
|
|
42531
42608
|
}
|
|
42532
42609
|
/**
|
|
42610
|
+
* Reads a value that must be a finite number of 0 or more.
|
|
42611
|
+
*
|
|
42612
|
+
* @param value - Anything that came out of JSON.
|
|
42613
|
+
* @returns The number, or `undefined` for anything else, a missing field included.
|
|
42614
|
+
* @example
|
|
42615
|
+
* ```ts
|
|
42616
|
+
* sizeAt(0); // 0
|
|
42617
|
+
* ```
|
|
42618
|
+
*/
|
|
42619
|
+
function sizeAt(value) {
|
|
42620
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
42621
|
+
}
|
|
42622
|
+
/**
|
|
42623
|
+
* Reads the trim fields of an atlas frame (F198): `offsetX`, `offsetY`, `origWidth` and `origHeight`.
|
|
42624
|
+
* Each must be a finite number of 0 or more; `numberAt` is not used, because it turns a missing field
|
|
42625
|
+
* into 0 and 0 is a legal offset. The four are kept together or not at all: a frame that lost one is
|
|
42626
|
+
* the whole image, as every older manifest says.
|
|
42627
|
+
*
|
|
42628
|
+
* @param value - The `atlas` object.
|
|
42629
|
+
* @returns The four fields, or `undefined` when any of them is missing or not such a number.
|
|
42630
|
+
*/
|
|
42631
|
+
function parseTrim(value) {
|
|
42632
|
+
const offsetX = sizeAt(value.offsetX);
|
|
42633
|
+
const offsetY = sizeAt(value.offsetY);
|
|
42634
|
+
const origWidth = sizeAt(value.origWidth);
|
|
42635
|
+
const origHeight = sizeAt(value.origHeight);
|
|
42636
|
+
if (offsetX === void 0 || offsetY === void 0 || origWidth === void 0 || origHeight === void 0) return;
|
|
42637
|
+
return {
|
|
42638
|
+
offsetX,
|
|
42639
|
+
offsetY,
|
|
42640
|
+
origWidth,
|
|
42641
|
+
origHeight
|
|
42642
|
+
};
|
|
42643
|
+
}
|
|
42644
|
+
/**
|
|
42533
42645
|
* Reads the atlas placement of a packed file.
|
|
42534
42646
|
*
|
|
42535
42647
|
* @param value - What the `atlas` field carried.
|
|
42536
|
-
* @returns The frame, or `undefined`.
|
|
42648
|
+
* @returns The frame, with its trim fields when it has all four, or `undefined`.
|
|
42537
42649
|
*/
|
|
42538
42650
|
function parseAtlas(value) {
|
|
42539
42651
|
if (!isRecord$3(value)) return void 0;
|
|
@@ -42542,7 +42654,8 @@ function parseAtlas(value) {
|
|
|
42542
42654
|
x: numberAt(value, "x"),
|
|
42543
42655
|
y: numberAt(value, "y"),
|
|
42544
42656
|
width: numberAt(value, "width"),
|
|
42545
|
-
height: numberAt(value, "height")
|
|
42657
|
+
height: numberAt(value, "height"),
|
|
42658
|
+
...parseTrim(value)
|
|
42546
42659
|
};
|
|
42547
42660
|
}
|
|
42548
42661
|
/**
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Bn as NodeTable, Ir as ClockSource, Jn as Hint, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Wn as Descriptor, Wr as Json, Yn 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 { Bn as NodeTable, Ir as ClockSource, Jn as Hint, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Wn as Descriptor, Wr as Json, Yn as NodeFx } from "./types-NOciAl87.mjs";
|
|
2
|
+
import { t as createApp } from "./index-BFbScS-y.mjs";
|
|
3
|
+
import { b as memory, x as saveOf, y as WithGameState } from "./types-DVNJ6JUa.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-BcgzSec_.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,4 +1,4 @@
|
|
|
1
|
-
import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-
|
|
1
|
+
import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-BR2Uw9Xz.mjs";
|
|
2
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-BuXptVI_.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as FilterSlotInputs, Ar as Api$3, M as SyncApi, Q as Api$4, Qn as AnchorTarget, Un as TypeTag, Ur as Events$3, Vr as Api$6, Wn as Descriptor, Wr as Json, ar as NumericFields, at as PixiSprite, b as Events$4, bi as Require, br as Entity, bt as FilterCache, cr as ReducedMotion, dr as TrackSegment, gr as ComponentHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, j as FilterSlotQuad, k as FilterSlot, mn as Api$2, nt as PixiFilter, oi as Events$5, ot as PixiTexture, pr as AnyComponent, rt as PixiGpuProgram, s as Events$1, st as PixiUniformGroup, t as Api$5, tr as Ease, ui as Api$1, ur as TrackOptions, vr as ComponentType, vt as Point, yi as Events$2 } from "./types-
|
|
2
|
-
import { R as InputApi, T as TextApi, U as I18nApi, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, tt as StylesState } from "./types-
|
|
1
|
+
import { A as FilterSlotInputs, Ar as Api$3, M as SyncApi, Q as Api$4, Qn as AnchorTarget, Un as TypeTag, Ur as Events$3, Vr as Api$6, Wn as Descriptor, Wr as Json, ar as NumericFields, at as PixiSprite, b as Events$4, bi as Require, br as Entity, bt as FilterCache, cr as ReducedMotion, dr as TrackSegment, gr as ComponentHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, j as FilterSlotQuad, k as FilterSlot, mn as Api$2, nt as PixiFilter, oi as Events$5, ot as PixiTexture, pr as AnyComponent, rt as PixiGpuProgram, s as Events$1, st as PixiUniformGroup, t as Api$5, tr as Ease, ui as Api$1, ur as TrackOptions, vr as ComponentType, vt as Point, yi as Events$2 } from "./types-NOciAl87.mjs";
|
|
2
|
+
import { R as InputApi, T as TextApi, U as I18nApi, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, tt as StylesState } from "./types-rsz4pIqe.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
import { PluginCtx } from "@moku-labs/core";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $r as Snapshot, Wr as Json } from "./types-
|
|
2
|
-
import { t as HeadlessApp } from "./headless-
|
|
1
|
+
import { $r as Snapshot, Wr as Json } from "./types-NOciAl87.mjs";
|
|
2
|
+
import { t as HeadlessApp } from "./headless-BcgzSec_.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/flow/doors/types.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as Config$2, Hr as Config, Ir as ClockSource, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Un as TypeTag, Wr as Json, Xr as ProviderCall, Yr as PlayerStateProvider, Zr as SaveDoc, _t as Orientation, a as Config$3, d as Manifest, ei as SnapshotOf, gn as Config$1, it as PixiModule, n as AssetsIo } from "./types-
|
|
2
|
-
import { o as AudioContextLike, s as Config$4 } from "./types-
|
|
3
|
-
import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-
|
|
4
|
-
import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-
|
|
1
|
+
import { $ as Config$2, Hr as Config, Ir as ClockSource, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Un as TypeTag, Wr as Json, Xr as ProviderCall, Yr as PlayerStateProvider, Zr as SaveDoc, _t as Orientation, a as Config$3, d as Manifest, ei as SnapshotOf, gn as Config$1, it as PixiModule, n as AssetsIo } from "./types-NOciAl87.mjs";
|
|
2
|
+
import { o as AudioContextLike, s as Config$4 } from "./types-BDCkyWXq.mjs";
|
|
3
|
+
import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-rsz4pIqe.mjs";
|
|
4
|
+
import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-BFbScS-y.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/model/store/providers/memory.d.ts
|
|
@@ -11728,16 +11728,29 @@ type CreateTextureOptions$1 = {
|
|
|
11728
11728
|
* Where `textures.slice` cuts a texture out of an atlas page, in page pixels. The manifest `atlas`
|
|
11729
11729
|
* field of `assets` carries it with the page id next to it, and passes as it is.
|
|
11730
11730
|
*
|
|
11731
|
+
* A frame cropped to its visible pixels at pack time also says where the crop lies in the original
|
|
11732
|
+
* image: `offsetX` and `offsetY` are the crop's first column and row inside the original,
|
|
11733
|
+
* `origWidth` and `origHeight` the original's size. All four together or none; an incomplete set
|
|
11734
|
+
* counts as none, and none means the frame is the whole image.
|
|
11735
|
+
*
|
|
11731
11736
|
* @example
|
|
11732
11737
|
* ```ts
|
|
11733
11738
|
* const frame: SliceFrame = { x: 583, y: 595, width: 256, height: 128 };
|
|
11739
|
+
* // A 300 x 200 image packed without its transparent margin: 256 x 128 of it, from column 9 and row 9.
|
|
11740
|
+
* const trimmed: SliceFrame = {
|
|
11741
|
+
* x: 583, y: 595, width: 256, height: 128, offsetX: 9, offsetY: 9, origWidth: 300, origHeight: 200
|
|
11742
|
+
* };
|
|
11734
11743
|
* ```
|
|
11735
11744
|
*/
|
|
11736
11745
|
type SliceFrame = {
|
|
11737
|
-
x: number;
|
|
11738
|
-
y: number;
|
|
11739
|
-
width: number;
|
|
11740
|
-
height: number;
|
|
11746
|
+
/** Column of the frame's first pixel on the page. */x: number; /** Row of the frame's first pixel on the page. */
|
|
11747
|
+
y: number; /** Width of the frame on the page, in pixels. */
|
|
11748
|
+
width: number; /** Height of the frame on the page, in pixels. */
|
|
11749
|
+
height: number; /** Column of the frame's first pixel inside the original image, for a trimmed frame. */
|
|
11750
|
+
offsetX?: number; /** Row of the frame's first pixel inside the original image, for a trimmed frame. */
|
|
11751
|
+
offsetY?: number; /** Width of the original image, for a trimmed frame. */
|
|
11752
|
+
origWidth?: number; /** Height of the original image, for a trimmed frame. */
|
|
11753
|
+
origHeight?: number;
|
|
11741
11754
|
};
|
|
11742
11755
|
/**
|
|
11743
11756
|
* The texture registry `assets` drives, `app.renderer.sync.textures`. The renderer makes and
|
|
@@ -11791,15 +11804,19 @@ type TexturesApi = {
|
|
|
11791
11804
|
/**
|
|
11792
11805
|
* Cuts a texture out of an atlas page, so `assets` never imports Pixi. The slice shares the
|
|
11793
11806
|
* page's source: no pixel is copied, and the page keeps the GPU memory. A frame is measured
|
|
11794
|
-
* from the page's own frame, so a slice of a slice lands where it should.
|
|
11807
|
+
* from the page's own frame, so a slice of a slice lands where it should. A trimmed frame (one
|
|
11808
|
+
* with `offsetX`, `offsetY`, `origWidth` and `origHeight`) keeps its original size: the slice
|
|
11809
|
+
* answers `width` and `height` of the original, and Pixi draws the cropped pixels at the offset,
|
|
11810
|
+
* so a sprite keeps its size and place.
|
|
11795
11811
|
*
|
|
11796
11812
|
* @param page - The page texture `create` made.
|
|
11797
|
-
* @param frame - The frame in page pixels
|
|
11813
|
+
* @param frame - The frame in page pixels; with the four trim fields, also where it lies in its
|
|
11814
|
+
* original image.
|
|
11798
11815
|
* @param options - `nine` is left, top, right and bottom in pixels; it becomes the slice's
|
|
11799
11816
|
* default nine-slice borders.
|
|
11800
11817
|
* @returns The slice. `destroy` frees only this wrapper, never the page's source.
|
|
11801
11818
|
* @throws {Error} When the renderer does not draw, and when the frame does not fit in the page
|
|
11802
|
-
* (a manifest packed for other pages).
|
|
11819
|
+
* (a manifest packed for other pages) or a trimmed frame does not fit in its original.
|
|
11803
11820
|
* @example
|
|
11804
11821
|
* ```ts
|
|
11805
11822
|
* // `assets`: the page "ui/main-0" landed; the packed button texture is cut out of it with its borders.
|
|
@@ -11808,6 +11825,13 @@ type TexturesApi = {
|
|
|
11808
11825
|
* button.width; // 256
|
|
11809
11826
|
* button.defaultBorders; // { left: 24, top: 24, right: 24, bottom: 24 }
|
|
11810
11827
|
* renderer.sync.textures.destroy(button); // the wrapper goes, the page's source stays
|
|
11828
|
+
*
|
|
11829
|
+
* // A 300 x 200 leaf packed without its transparent margin: 256 x 128 of it lie on the page.
|
|
11830
|
+
* const leaf = renderer.sync.textures.slice(page, {
|
|
11831
|
+
* x: 0, y: 0, width: 256, height: 128, offsetX: 9, offsetY: 9, origWidth: 300, origHeight: 200
|
|
11832
|
+
* });
|
|
11833
|
+
* leaf.width; // 300
|
|
11834
|
+
* leaf.trim; // Rectangle { x: 9, y: 9, width: 256, height: 128 }
|
|
11811
11835
|
* ```
|
|
11812
11836
|
*/
|
|
11813
11837
|
slice(page: PixiTexture, frame: SliceFrame, options?: CreateTextureOptions$1): PixiTexture;
|
|
@@ -14164,7 +14188,9 @@ type AssetsIo = {
|
|
|
14164
14188
|
* `atlas` frame is passed as it is.
|
|
14165
14189
|
*
|
|
14166
14190
|
* @param page - The page texture, made by `createTexture`.
|
|
14167
|
-
* @param frame - Where the file lies on the page, in page pixels.
|
|
14191
|
+
* @param frame - Where the file lies on the page, in page pixels. A trimmed file's frame also
|
|
14192
|
+
* carries `offsetX`, `offsetY`, `origWidth` and `origHeight`: the slice then answers the size of
|
|
14193
|
+
* the original and draws the cut at its offset.
|
|
14168
14194
|
* @param options - `nine` becomes the default nine-slice borders of the slice.
|
|
14169
14195
|
* @returns The new texture over the page's source.
|
|
14170
14196
|
*/
|
|
@@ -14194,12 +14220,29 @@ type NineSlice = {
|
|
|
14194
14220
|
};
|
|
14195
14221
|
/**
|
|
14196
14222
|
* Where a packed file lies: `page` is the id of a page of the same bundle, never a file name, and
|
|
14197
|
-
* the frame is in page pixels. `width` and `height` equal the file's own,
|
|
14198
|
-
* valid as it is.
|
|
14223
|
+
* the frame is in page pixels. Without the trim fields `width` and `height` equal the file's own,
|
|
14224
|
+
* so its `nine` stays valid as it is. With them the file was trimmed to its visible pixels: the
|
|
14225
|
+
* frame is the cut, `offsetX` and `offsetY` say where the cut's first column and row lay in the
|
|
14226
|
+
* original image, and `origWidth` and `origHeight` are the size of that original (the file's own
|
|
14227
|
+
* `width` and `height`). All four are there together or none is; a texture with `nine` is never
|
|
14228
|
+
* trimmed. The packer writes it; the loader cuts the file out of the page.
|
|
14199
14229
|
*
|
|
14200
14230
|
* @example
|
|
14201
14231
|
* ```ts
|
|
14202
14232
|
* const frame: AtlasFrame = { page: "ui/main-0", x: 583, y: 595, width: 256, height: 128 };
|
|
14233
|
+
*
|
|
14234
|
+
* // A 300×200 icon trimmed to its visible 256×128, which started at (20, 36) of the original.
|
|
14235
|
+
* const trimmed: AtlasFrame = {
|
|
14236
|
+
* page: "ui/main-0",
|
|
14237
|
+
* x: 583,
|
|
14238
|
+
* y: 595,
|
|
14239
|
+
* width: 256,
|
|
14240
|
+
* height: 128,
|
|
14241
|
+
* offsetX: 20,
|
|
14242
|
+
* offsetY: 36,
|
|
14243
|
+
* origWidth: 300,
|
|
14244
|
+
* origHeight: 200
|
|
14245
|
+
* };
|
|
14203
14246
|
* ```
|
|
14204
14247
|
*/
|
|
14205
14248
|
type AtlasFrame = {
|
|
@@ -14207,7 +14250,11 @@ type AtlasFrame = {
|
|
|
14207
14250
|
x: number;
|
|
14208
14251
|
y: number;
|
|
14209
14252
|
width: number;
|
|
14210
|
-
height: number;
|
|
14253
|
+
height: number; /** x of the frame's first column inside the original image. */
|
|
14254
|
+
offsetX?: number; /** y of the frame's first row inside the original image. */
|
|
14255
|
+
offsetY?: number; /** Width of the original image (the file's own `width`). */
|
|
14256
|
+
origWidth?: number; /** Height of the original image (the file's own `height`). */
|
|
14257
|
+
origHeight?: number;
|
|
14211
14258
|
};
|
|
14212
14259
|
/**
|
|
14213
14260
|
* One atlas page of a packed bundle. `id` is `<bundle>/<group>-<index>`, the name an `atlas`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as ChangeHook, Ar as Api$2, D as AxisPose, Fr as Api$5, Jn as Hint, Q as Api$3, Qn as AnchorTarget, Wn as Descriptor, Wr as Json, Y as TransformValue, Zn as Answered, ar as NumericFields, bi as Require, br as Entity, cr as ReducedMotion, fr as ViewHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, kr as TagType, mn as Api$1, mr as AnyComponentType, nr as Motion, or as ProjectionMotion, pr as AnyComponent, rr as MotionCause, s as Events$1, t as Api$4, tr as Ease, tt as PixiContainer, ui as Api, vr as ComponentType, yt as ViewportSize } from "./types-
|
|
1
|
+
import { $n as ChangeHook, Ar as Api$2, D as AxisPose, Fr as Api$5, Jn as Hint, Q as Api$3, Qn as AnchorTarget, Wn as Descriptor, Wr as Json, Y as TransformValue, Zn as Answered, ar as NumericFields, bi as Require, br as Entity, cr as ReducedMotion, fr as ViewHandle, hr as AnyComponentValue, ir as MotionHandle, it as PixiModule, kr as TagType, mn as Api$1, mr as AnyComponentType, nr as Motion, or as ProjectionMotion, pr as AnyComponent, rr as MotionCause, s as Events$1, t as Api$4, tr as Ease, tt as PixiContainer, ui as Api, vr as ComponentType, yt as ViewportSize } from "./types-NOciAl87.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";
|