@bardway/trpg-pixi 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +10 -0
  3. package/NOTICE.md +1 -0
  4. package/README.md +25 -2
  5. package/dist/AnimationMilestones.d.ts +17 -0
  6. package/dist/BattleActionMotionMath.d.ts +24 -0
  7. package/dist/BattleActionPresentationRecipes.d.ts +11 -0
  8. package/dist/BattleFxLibrary.d.ts +16 -0
  9. package/dist/BattlePresentationEngine.d.ts +26 -0
  10. package/dist/BattlePresentationPoseRegistry.d.ts +25 -0
  11. package/dist/BattlePresentationRecipe.d.ts +48 -0
  12. package/dist/BattleSequenceScheduler.d.ts +11 -0
  13. package/dist/DisplayEventQueue.d.ts +24 -0
  14. package/dist/PixiAnimationActivity.d.ts +7 -0
  15. package/dist/PixiAnimationDirector.d.ts +21 -0
  16. package/dist/PixiApplicationFactory.d.ts +17 -0
  17. package/dist/PixiAssetManager.d.ts +70 -0
  18. package/dist/PixiBattleActionRecipes.d.ts +75 -0
  19. package/dist/PixiBattleCinematicSurface.d.ts +23 -0
  20. package/dist/PixiBattleEntryTransition.d.ts +87 -0
  21. package/dist/PixiBattleFieldSurface.d.ts +125 -0
  22. package/dist/PixiBattleFxResources.d.ts +154 -0
  23. package/dist/PixiBattleGrid.d.ts +13 -0
  24. package/dist/PixiBattleHudPorts.d.ts +192 -0
  25. package/dist/PixiBattleHudSurface.d.ts +159 -0
  26. package/dist/PixiBattleLightningResources.d.ts +57 -0
  27. package/dist/PixiBattleMapDissolve.d.ts +38 -0
  28. package/dist/PixiBattleSceneTransition.d.ts +30 -0
  29. package/dist/PixiBattleTokenLifecycleCoordinator.d.ts +44 -0
  30. package/dist/PixiBattleVisualLayout.d.ts +284 -0
  31. package/dist/PixiBattleWhipGeometry.d.ts +18 -0
  32. package/dist/PixiBattleWhipMotion.d.ts +63 -0
  33. package/dist/PixiBattleWhipResources.d.ts +53 -0
  34. package/dist/PixiCameraFocusController.d.ts +40 -0
  35. package/dist/PixiCombatMotion.d.ts +223 -0
  36. package/dist/PixiCurrentActorCardGlow.d.ts +37 -0
  37. package/dist/PixiCurrentActorHalo.d.ts +55 -0
  38. package/dist/PixiDirectionalMotionBlur.d.ts +12 -0
  39. package/dist/PixiDisplayRenderer.d.ts +85 -0
  40. package/dist/PixiEffectPlugin.d.ts +25 -0
  41. package/dist/PixiEndingSurface.d.ts +104 -0
  42. package/dist/PixiInvestigatorDossierInsanityFilter.d.ts +14 -0
  43. package/dist/PixiLocalGlowMesh.d.ts +38 -0
  44. package/dist/PixiMapEdgeShadow.d.ts +36 -0
  45. package/dist/PixiMapMediaSurface.d.ts +71 -0
  46. package/dist/PixiMapWorldUtils.d.ts +24 -0
  47. package/dist/PixiMediaBreathRuntime.d.ts +69 -0
  48. package/dist/PixiMotion.d.ts +42 -0
  49. package/dist/PixiObjectiveBreathingGlow.d.ts +39 -0
  50. package/dist/PixiPartyHudSurface.d.ts +58 -0
  51. package/dist/PixiPersistentEffectTransition.d.ts +23 -0
  52. package/dist/PixiPortraitResourceCard.d.ts +147 -0
  53. package/dist/PixiPreludeStoryTransition.d.ts +35 -0
  54. package/dist/PixiPreludeSurface.d.ts +203 -0
  55. package/dist/PixiProgressCinematic.d.ts +65 -0
  56. package/dist/PixiResultEffectSurface.d.ts +101 -0
  57. package/dist/PixiRetainedMeterAnimator.d.ts +44 -0
  58. package/dist/PixiRuntimeContext.d.ts +21 -0
  59. package/dist/PixiSceneGraph.d.ts +42 -0
  60. package/dist/PixiSceneMotion.d.ts +41 -0
  61. package/dist/PixiSceneMotionPorts.d.ts +83 -0
  62. package/dist/PixiScenePresentationDirector.d.ts +118 -0
  63. package/dist/PixiSessionLayout.d.ts +61 -0
  64. package/dist/PixiSessionSkin.d.ts +30 -0
  65. package/dist/PixiShaderRuntime.d.ts +191 -0
  66. package/dist/PixiStageFontLoader.d.ts +2 -0
  67. package/dist/PixiStageMetrics.d.ts +25 -0
  68. package/dist/PixiStageTheme.d.ts +26 -0
  69. package/dist/PixiStoryArchiveMotion.d.ts +19 -0
  70. package/dist/PixiStoryCardCut.d.ts +58 -0
  71. package/dist/PixiStorySurface.d.ts +285 -0
  72. package/dist/PixiStoryWorkspaceSurface.d.ts +64 -0
  73. package/dist/PixiSummaryBoardSurface.d.ts +112 -0
  74. package/dist/PixiSystemHudSurface.d.ts +73 -0
  75. package/dist/PixiTeamCheckCinematic.d.ts +34 -0
  76. package/dist/PixiTextTransitionEffect.d.ts +54 -0
  77. package/dist/PixiTokenPersistentStatus.d.ts +101 -0
  78. package/dist/PixiTokenWorld.d.ts +170 -0
  79. package/dist/PixiTypography.d.ts +96 -0
  80. package/dist/PixiVideoRuntime.d.ts +61 -0
  81. package/dist/PixiViewportController.d.ts +25 -0
  82. package/dist/ResultEffectTuning.d.ts +57 -0
  83. package/dist/RetainedStageSurface.d.ts +50 -0
  84. package/dist/SessionFieldEffectRuntime.d.ts +45 -0
  85. package/dist/SessionSceneHistory.d.ts +10 -0
  86. package/dist/SessionSceneRegistry.d.ts +31 -0
  87. package/dist/StoryEventCoordinator.d.ts +61 -0
  88. package/dist/effects/PixiEffectLayerRegistry.d.ts +54 -0
  89. package/dist/effects/PixiEffectScope.d.ts +20 -0
  90. package/dist/effects/PixiStableRandom.d.ts +2 -0
  91. package/dist/index.d.ts +92 -0
  92. package/dist/index.js +24184 -0
  93. package/dist/index.js.map +7 -0
  94. package/dist/recipes/EffectPrimitiveRuntimeRegistry.d.ts +28 -0
  95. package/dist/recipes/EffectRecipeExecutor.d.ts +73 -0
  96. package/dist/recipes/primitives.d.ts +39 -0
  97. package/dist/recipes/registry.d.ts +57 -0
  98. package/dist/recipes/schema.d.ts +93 -0
  99. package/dist/recipes.d.ts +5 -0
  100. package/dist/recipes.js +1384 -0
  101. package/dist/recipes.js.map +7 -0
  102. package/dist/story/PixiStoryPresentationEngine.d.ts +90 -0
  103. package/dist/story/StoryContentSurface.d.ts +34 -0
  104. package/dist/story/StoryImageFilter.d.ts +15 -0
  105. package/dist/story/StoryTimelineClock.d.ts +22 -0
  106. package/dist/story/StoryVisualMath.d.ts +6 -0
  107. package/dist/tuning/SessionTuningResolver.d.ts +1 -0
  108. package/dist/tuning/SessionTuningTypes.d.ts +1 -0
  109. package/dist/ui/PixiStagePrimitives.d.ts +36 -0
  110. package/dist/uniforms.d.ts +1 -0
  111. package/package.json +44 -4
@@ -0,0 +1,125 @@
1
+ export type FieldVisualId = 'heavyRain' | 'fire' | 'thunderstorm' | 'earthquake' | 'arcaneVeil' | 'denseFog' | 'dark';
2
+ import type { BlurFilter, Container, Graphics, Particle, ParticleContainer, Rectangle, Texture, Ticker } from 'pixi.js';
3
+ import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
4
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
5
+ import type { PixiSceneGraph } from './PixiSceneGraph.js';
6
+ import type { PixiShaderRuntime } from './PixiShaderRuntime.js';
7
+ import type { SessionTuningResolver } from './tuning/SessionTuningResolver.js';
8
+ interface Constructors {
9
+ BlurFilter: typeof BlurFilter;
10
+ Container: new (options?: {
11
+ label?: string;
12
+ }) => Container;
13
+ Graphics: new (options?: {
14
+ label?: string;
15
+ }) => Graphics;
16
+ Particle: new (options: ConstructorParameters<typeof Particle>[0]) => Particle;
17
+ ParticleContainer: new (options: ConstructorParameters<typeof ParticleContainer>[0]) => ParticleContainer;
18
+ Rectangle: typeof Rectangle;
19
+ Texture: typeof Texture;
20
+ }
21
+ export interface PixiBattleFieldSurfaceOptions {
22
+ readonly stage: {
23
+ width: number;
24
+ height: number;
25
+ };
26
+ readonly intensity: number;
27
+ readonly colors: {
28
+ rainOverlay: string;
29
+ rainColor: string;
30
+ lightningOverlay: string;
31
+ lightningColor: string;
32
+ emberColor: string;
33
+ ashColor: string;
34
+ };
35
+ readonly scene: PixiSceneGraph;
36
+ readonly shaderRuntime: PixiShaderRuntime;
37
+ readonly director: PixiAnimationDirector;
38
+ readonly ticker: Ticker;
39
+ readonly activity: PixiAnimationActivity;
40
+ readonly constructors: Constructors;
41
+ readonly getTuning: () => SessionTuningResolver | undefined;
42
+ readonly requestRender: () => void;
43
+ readonly setRosterShake: (x: number, y: number, rotation: number, scale: number) => void;
44
+ readonly setStoryShake: (transforms: readonly [
45
+ StoryShakeTransform,
46
+ StoryShakeTransform,
47
+ StoryShakeTransform,
48
+ StoryShakeTransform
49
+ ]) => void;
50
+ }
51
+ export interface StoryShakeTransform {
52
+ readonly x: number;
53
+ readonly y: number;
54
+ readonly rotation: number;
55
+ readonly scale: number;
56
+ }
57
+ export declare class PixiBattleFieldSurface {
58
+ private readonly options;
59
+ private profile;
60
+ setProfile(profile: 'story' | 'battle'): void;
61
+ diagnostics(): string;
62
+ private active;
63
+ private exitingField;
64
+ private exitPromise;
65
+ private readonly releasedFields;
66
+ private readonly persistentTransition;
67
+ private suspended;
68
+ private motionSuspended;
69
+ private paused;
70
+ private reducedMotion;
71
+ private elapsedMs;
72
+ private lightningStep;
73
+ private lightningAtMs;
74
+ private lightningVisibleUntilMs;
75
+ private lightningFadeDurationMs;
76
+ private lightningSecondFlashAtMs;
77
+ private lightningSecondFlashUntilMs;
78
+ private rainGustStep;
79
+ private rainGustStartsAtMs;
80
+ private rainGustEndsAtMs;
81
+ private rainGustAddedSpeed;
82
+ private rainNextGustAtMs;
83
+ private rainAngleFromRad;
84
+ private rainAngleToRad;
85
+ private rainCurrentAngleRad;
86
+ private rainCurrentAddedSpeed;
87
+ private rainCurrentGustRatio;
88
+ private releaseActivity;
89
+ private generation;
90
+ constructor(options: PixiBattleFieldSurfaceOptions);
91
+ replace(effectId: FieldVisualId | null, signal: AbortSignal, onMounted?: () => void): Promise<void>;
92
+ /** Snapshot restore has no outgoing fade or effect entrance. Called only at the scene commit. */
93
+ hydrate(effectId: FieldVisualId | null): void;
94
+ private replaceEffect;
95
+ setPaused(paused: boolean): void;
96
+ setSuspended(suspended: boolean): void;
97
+ setReducedMotion(reducedMotion: boolean): void;
98
+ reset(): void;
99
+ destroy(): void;
100
+ refreshTuning(): void;
101
+ private createActive;
102
+ private createRain;
103
+ private createEmbers;
104
+ private createAsh;
105
+ private createRisingParticles;
106
+ private addParticleContainer;
107
+ private startTicker;
108
+ private stopTicker;
109
+ private tick;
110
+ private tickRain;
111
+ private updateRainBlur;
112
+ private resetRainBlur;
113
+ private updateRainWind;
114
+ private tickRising;
115
+ private tickThunder;
116
+ private beginLightning;
117
+ private tickEarthquake;
118
+ private resetEarthquakeTransform;
119
+ private createOverlay;
120
+ private releaseActive;
121
+ private releaseField;
122
+ private destroyActive;
123
+ private number;
124
+ }
125
+ export {};
@@ -0,0 +1,154 @@
1
+ import type { BlurFilter, Container, Graphics, Mesh, MeshGeometry, Shader, Sprite, UniformGroup } from 'pixi.js';
2
+ import { PixiBattleWhipResources } from './PixiBattleWhipResources.js';
3
+ import { PixiBattleLightningResources, type PixiBattleLightningHandle } from './PixiBattleLightningResources.js';
4
+ export type { PixiBattleLightningHandle } from './PixiBattleLightningResources.js';
5
+ type PixiMesh = Mesh<MeshGeometry, Shader>;
6
+ export interface PixiBattleFxCapabilities {
7
+ writeColor?: (value: string, out: Float32Array) => void;
8
+ BlurFilter?: typeof import('pixi.js').BlurFilter;
9
+ Filter?: typeof import('pixi.js').Filter;
10
+ Container?: typeof import('pixi.js').Container;
11
+ Graphics?: typeof import('pixi.js').Graphics;
12
+ Mesh?: typeof import('pixi.js').Mesh;
13
+ MeshGeometry?: typeof import('pixi.js').MeshGeometry;
14
+ Shader?: typeof import('pixi.js').Shader;
15
+ UniformGroup?: typeof import('pixi.js').UniformGroup;
16
+ Sprite?: typeof import('pixi.js').Sprite;
17
+ Texture?: {
18
+ WHITE: import('pixi.js').Texture;
19
+ };
20
+ generateTexture?: (target: Container) => import('pixi.js').Texture;
21
+ }
22
+ export type PixiBattleTrailMode = 'shoot' | 'melee' | 'electric' | 'charge' | 'support';
23
+ export interface SpeedLineUniforms {
24
+ uFxColor: Float32Array;
25
+ uTime: number;
26
+ uCycleA: number;
27
+ uCycleB: number;
28
+ uCycleC: number;
29
+ uSeed: number;
30
+ uDensity: number;
31
+ uMinLength: number;
32
+ uMaxLength: number;
33
+ uMotionBlur: number;
34
+ uThicknessScale: number;
35
+ }
36
+ export interface PixiBattleFxHandle {
37
+ readonly mesh: PixiMesh;
38
+ readonly geometry: MeshGeometry;
39
+ readonly shader: Shader;
40
+ readonly kind: 'trail' | 'burst' | 'speed-lines';
41
+ readonly uniforms: UniformGroup;
42
+ released: boolean;
43
+ }
44
+ /** Owns the small retained Mesh pool used by battle action FX. */
45
+ export declare class PixiBattleFxResourceOwner {
46
+ private readonly capabilities;
47
+ private readonly availableTrails;
48
+ private readonly availableBursts;
49
+ private readonly availableSpeedLines;
50
+ private readonly active;
51
+ private readonly owned;
52
+ private readonly availableDebris;
53
+ private readonly activeDebris;
54
+ private readonly ownedDebris;
55
+ private readonly availableSnapshots;
56
+ private readonly activeSnapshots;
57
+ private readonly ownedSnapshots;
58
+ private readonly snapshotTextures;
59
+ private readonly availableBlurFilters;
60
+ private readonly activeBlurFilters;
61
+ private readonly ownedBlurFilters;
62
+ private readonly irregularContexts;
63
+ private readonly availableIrregularDebris;
64
+ private readonly activeIrregularDebris;
65
+ private readonly ownedIrregularDebris;
66
+ private readonly availableScreenFlashes;
67
+ private readonly activeScreenFlashes;
68
+ private readonly ownedScreenFlashes;
69
+ private readonly availableActionGraphics;
70
+ private readonly activeActionGraphics;
71
+ private readonly ownedActionGraphics;
72
+ readonly whips: PixiBattleWhipResources;
73
+ readonly lightning: PixiBattleLightningResources;
74
+ constructor(capabilities?: PixiBattleFxCapabilities);
75
+ acquireTrail(parent: Container, from: {
76
+ x: number;
77
+ y: number;
78
+ }, to: {
79
+ x: number;
80
+ y: number;
81
+ }, options: {
82
+ color: string;
83
+ mode: PixiBattleTrailMode;
84
+ seed: number;
85
+ width: number;
86
+ softness: number;
87
+ initialLengthRatio?: number;
88
+ tailBlurStrength?: number;
89
+ }): PixiBattleFxHandle | null;
90
+ acquireSpeedLines(parent: Container, color: string, cycles: readonly [number, number, number], options?: {
91
+ seed?: number;
92
+ density?: number;
93
+ minLength?: number;
94
+ maxLength?: number;
95
+ motionBlur?: number;
96
+ thicknessScale?: number;
97
+ }): PixiBattleFxHandle | null;
98
+ getSpeedLineUniforms(handle: PixiBattleFxHandle): SpeedLineUniforms;
99
+ acquireLightning(parent: Container, from: {
100
+ x: number;
101
+ y: number;
102
+ }, to: {
103
+ x: number;
104
+ y: number;
105
+ }, options: Parameters<PixiBattleLightningResources['acquire']>[3]): PixiBattleLightningHandle | null;
106
+ releaseLightning(handle: PixiBattleLightningHandle | null, generation?: number | undefined): void;
107
+ acquireIrregularDebris(parent: Container, center: {
108
+ x: number;
109
+ y: number;
110
+ }, options: {
111
+ color: string;
112
+ templateIndex: number;
113
+ size: number;
114
+ }): Graphics | null;
115
+ releaseIrregularDebris(node: Graphics | null): void;
116
+ acquireBurst(parent: Container, center: {
117
+ x: number;
118
+ y: number;
119
+ }, options: {
120
+ color: string;
121
+ radius: number;
122
+ seed: number;
123
+ ring: number;
124
+ }): PixiBattleFxHandle | null;
125
+ release(handle: PixiBattleFxHandle | null): void;
126
+ acquireDebris(parent: Container, center: {
127
+ x: number;
128
+ y: number;
129
+ }, options: {
130
+ color: string;
131
+ angle: number;
132
+ length: number;
133
+ thickness: number;
134
+ }): Sprite | null;
135
+ releaseDebris(debris: Sprite | null): void;
136
+ acquireTokenSnapshot(parent: Container, key: string, target: Container): Sprite | null;
137
+ releaseTokenSnapshot(snapshot: Sprite | null): void;
138
+ acquireBlurFilter(strength: number): BlurFilter | null;
139
+ releaseBlurFilter(filter: BlurFilter | null): void;
140
+ acquireScreenFlash(parent: Container, color: number): Graphics | null;
141
+ releaseScreenFlash(flash: Graphics | null): void;
142
+ acquireActionGraphic(parent: Container): Graphics | null;
143
+ releaseActionGraphic(graphic: Graphics | null): void;
144
+ reset(): void;
145
+ destroy(): void;
146
+ get activeCount(): number;
147
+ private activate;
148
+ private createTrail;
149
+ private createSpeedLines;
150
+ private ensureIrregularContexts;
151
+ private createBurst;
152
+ private createUniformGroup;
153
+ private createHandle;
154
+ }
@@ -0,0 +1,13 @@
1
+ import type { Graphics } from 'pixi.js';
2
+ import type { BattleViewportGridLayout } from './PixiSessionLayout.js';
3
+ type GridGraphics = Pick<Graphics, 'rect' | 'fill'>;
4
+ export interface BattleGridStyle {
5
+ overlayColor: string;
6
+ overlayAlpha: number;
7
+ lineColor: string;
8
+ lineAlpha: number;
9
+ lineWidth: number;
10
+ }
11
+ /** Draws the single formal battle grid geometry used by both the World and entry transition. */
12
+ export declare const drawBattleGrid: <T extends GridGraphics>(grid: T, layout: BattleViewportGridLayout, style: BattleGridStyle) => T;
13
+ export {};
@@ -0,0 +1,192 @@
1
+ import type { Texture } from 'pixi.js';
2
+ import type { TokenAvatarCrop } from './PixiMapWorldUtils.js';
3
+ import type { createPixiTypography } from './PixiTypography.js';
4
+ import type { BattleTypographyTuning, OBJECTIVE_LAYOUT, OBJECTIVE_PROGRESS_STYLE } from './PixiBattleVisualLayout.js';
5
+ import type { PixiLayoutRect } from './PixiSessionLayout.js';
6
+ type Widen<T> = T extends number ? number : T extends string ? string : T extends readonly (infer V)[] ? readonly Widen<V>[] : T extends object ? {
7
+ readonly [K in keyof T]: Widen<T[K]>;
8
+ } : T;
9
+ export interface HudRosterView {
10
+ id: string;
11
+ name: string;
12
+ avatarUrl?: string;
13
+ avatarCrop?: TokenAvatarCrop;
14
+ order: string | number;
15
+ gray: boolean;
16
+ tint: string;
17
+ meter?: {
18
+ label: string;
19
+ ratio: number;
20
+ color: string;
21
+ };
22
+ statuses: readonly string[];
23
+ visualState: {
24
+ distorted?: boolean;
25
+ stained?: boolean;
26
+ tilted?: boolean;
27
+ };
28
+ }
29
+ export interface HudObjectiveView {
30
+ id: string;
31
+ name: string;
32
+ progress: number;
33
+ progressLabel: string;
34
+ }
35
+ export interface HudIconView {
36
+ id: string;
37
+ }
38
+ export interface BattleHudSyncInput {
39
+ scopeKey: string;
40
+ hydrate?: boolean;
41
+ title: string;
42
+ roundLabel: string;
43
+ roster: readonly HudRosterView[];
44
+ objectives: readonly HudObjectiveView[];
45
+ icons: readonly HudIconView[];
46
+ currentActorTokenId: string | null;
47
+ visible: boolean;
48
+ animateLifecycle?: boolean;
49
+ }
50
+ export interface HudStatusStyle {
51
+ label: string;
52
+ surface: string;
53
+ inset: string;
54
+ border: string;
55
+ text: string;
56
+ }
57
+ export interface HudResourceFeedbackStyle {
58
+ lane: number;
59
+ negative: string;
60
+ positive: string;
61
+ shakeOnDecrease: boolean;
62
+ }
63
+ export interface HudVisualStyle {
64
+ disabled: string;
65
+ disabledBorder: string;
66
+ disabledSurface: string;
67
+ disabledText: string;
68
+ distortionTearGap: string;
69
+ assetUi: Record<'objectiveFill' | 'objectiveFillHighlight' | 'objectiveFillShadow' | 'objectiveMarker' | 'objectivePercent' | 'objectiveTick' | 'objectiveTitle' | 'objectiveTrack' | 'objectiveTrackBorder' | 'rosterActive' | 'rosterName' | 'rosterOrder', string>;
70
+ metal: {
71
+ shadow: string;
72
+ };
73
+ roster: {
74
+ resourceHighlight: string;
75
+ resourceTrack: string;
76
+ };
77
+ rosterStatus: {
78
+ distortionIntensity: number;
79
+ stainOpacity: number;
80
+ stainStrength: number;
81
+ tiltDegrees: number;
82
+ };
83
+ statusPill: {
84
+ surface: string;
85
+ inset: string;
86
+ border: string;
87
+ text: string;
88
+ };
89
+ teamCheckStatus: {
90
+ blurStrength: number;
91
+ cycleDurationMs: number;
92
+ driftAmplitude: number;
93
+ gap: number;
94
+ glowColor: string;
95
+ glowIntensity: number;
96
+ iconHeight: number;
97
+ silhouetteScale: number;
98
+ plumes: readonly {
99
+ x: number;
100
+ y: number;
101
+ radiusX: number;
102
+ radiusY: number;
103
+ alpha: number;
104
+ }[];
105
+ };
106
+ }
107
+ export interface HudUnitCardLayout {
108
+ source: {
109
+ width: number;
110
+ height: number;
111
+ };
112
+ rowGap: number;
113
+ maxVisibleRows: number;
114
+ avatar: PixiLayoutRect;
115
+ name: {
116
+ fontSize: number;
117
+ rightPadding: number;
118
+ };
119
+ activeOutline: {
120
+ inset: number;
121
+ width: number;
122
+ };
123
+ }
124
+ export interface HudTypographyLayout {
125
+ round: {
126
+ fontSize: number;
127
+ };
128
+ roster: {
129
+ order: BattleTypographyTuning['roster']['order'];
130
+ name: BattleTypographyTuning['roster']['name'];
131
+ resource: BattleTypographyTuning['roster']['hp'];
132
+ status: BattleTypographyTuning['roster']['status'];
133
+ };
134
+ objective: BattleTypographyTuning['objective'];
135
+ }
136
+ export interface BattleHudPorts {
137
+ defaultAvatarUrl: string;
138
+ typography: ReturnType<typeof createPixiTypography>;
139
+ colors: {
140
+ panel: string;
141
+ border: string;
142
+ mask: string;
143
+ transition: string;
144
+ };
145
+ style: HudVisualStyle;
146
+ statuses: Readonly<Record<string, HudStatusStyle>>;
147
+ resources: Readonly<Record<string, HudResourceFeedbackStyle>>;
148
+ layout: {
149
+ header: PixiLayoutRect;
150
+ headerRoundCell: PixiLayoutRect;
151
+ headerMapName: PixiLayoutRect;
152
+ headerTeamChecks: PixiLayoutRect;
153
+ roster: PixiLayoutRect;
154
+ objective: PixiLayoutRect;
155
+ typography: HudTypographyLayout;
156
+ unitCard: {
157
+ maxVisibleRows: number;
158
+ rowGap: number;
159
+ resourceBar: PixiLayoutRect;
160
+ };
161
+ };
162
+ unitCardLayout: HudUnitCardLayout;
163
+ objectiveLayout: Widen<typeof OBJECTIVE_LAYOUT>;
164
+ objectiveProgressStyle: Widen<typeof OBJECTIVE_PROGRESS_STYLE>;
165
+ textures: {
166
+ unitCard: Texture | null;
167
+ objective: Texture | null;
168
+ teamCheckIcon: Texture | null;
169
+ };
170
+ partyTextures: {
171
+ dossierCard: Texture | null;
172
+ dossierBlood: Texture | null;
173
+ };
174
+ }
175
+ export declare function resolveHudStatusVisibility<T>(statuses: readonly T[], availableWidth: number, getWidth: (status: T) => number, overflowWidth: number, gap?: number): {
176
+ visible: readonly T[];
177
+ hiddenCount: number;
178
+ };
179
+ export declare function resolveHudObjectiveCardWidth(count: number, laneWidth: number, maxWidth?: number, gap?: number): number;
180
+ export declare function validateBattleHudInput(input: BattleHudSyncInput, ports: Pick<BattleHudPorts, 'statuses'>): void;
181
+ /** Retains the source fitting algorithm while making row capacity a host choice. */
182
+ export declare function resolveHudRosterCardLayout(availableWidth: number, availableHeight: number, textureWidth: number, textureHeight: number, options: {
183
+ maxVisibleRows: number;
184
+ rowGap: number;
185
+ }): {
186
+ scale: number;
187
+ width: number;
188
+ height: number;
189
+ gap: number;
190
+ pitch: number;
191
+ };
192
+ export {};
@@ -0,0 +1,159 @@
1
+ import { type BattleHudSyncInput, type BattleHudPorts } from './PixiBattleHudPorts.js';
2
+ import type { BlurFilter, ColorMatrixFilter, Container, Filter, Graphics, Mesh, MeshGeometry, Rectangle, Shader, Sprite, Text, Texture, Ticker, UniformGroup } from 'pixi.js';
3
+ import type { PixiAssetManager } from './PixiAssetManager.js';
4
+ import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
5
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
6
+ import type { SessionTuningResolver } from './tuning/SessionTuningResolver.js';
7
+ import type { PixiMediaBreathRuntime } from './PixiMediaBreathRuntime.js';
8
+ interface Constructors {
9
+ BlurFilter: typeof BlurFilter;
10
+ ColorMatrixFilter: typeof ColorMatrixFilter;
11
+ Container: typeof Container;
12
+ Filter: typeof Filter;
13
+ Graphics: typeof Graphics;
14
+ Mesh: typeof Mesh;
15
+ MeshGeometry: typeof MeshGeometry;
16
+ Rectangle: typeof Rectangle;
17
+ Shader: typeof Shader;
18
+ Sprite: new (texture?: Texture | import('pixi.js').SpriteOptions) => Sprite;
19
+ Text: new (options: import('pixi.js').TextOptions) => Text;
20
+ UniformGroup: typeof UniformGroup;
21
+ }
22
+ export type BattleRosterResource = string;
23
+ export interface BattleRosterResourceFeedback {
24
+ tokenId: string;
25
+ resource: BattleRosterResource;
26
+ value: number;
27
+ hitIndex?: number;
28
+ emphasis?: boolean;
29
+ }
30
+ export interface BattleRosterEntryNode {
31
+ readonly id: string;
32
+ readonly root: Container;
33
+ readonly targetX: number;
34
+ readonly targetY: number;
35
+ }
36
+ export declare class PixiBattleHudSurface {
37
+ private readonly ports;
38
+ private readonly assets;
39
+ private readonly constructors;
40
+ private readonly ticker;
41
+ private readonly activity;
42
+ private readonly requestRender;
43
+ private readonly battleTextures;
44
+ private readonly partyTextures;
45
+ private readonly animation?;
46
+ readonly node: Container;
47
+ private readonly headerFrame;
48
+ private readonly roundFrame;
49
+ private readonly mapName;
50
+ private readonly round;
51
+ private readonly teamChecksRoot;
52
+ private readonly teamCheckFogRoot;
53
+ private readonly teamCheckIconRoot;
54
+ private readonly teamCheckFogBlur;
55
+ private readonly teamCheckFogFilterArea;
56
+ private readonly currentActorShadowBlur;
57
+ private currentActorShadowBlurStrength;
58
+ private readonly teamCheckNodes;
59
+ private readonly rosterHeader;
60
+ private readonly rosterCount;
61
+ private readonly rosterMask;
62
+ private readonly rosterContent;
63
+ private readonly rosterNodes;
64
+ private readonly currentActorCardGlow;
65
+ private readonly objectiveRoot;
66
+ private readonly objectiveMask;
67
+ private readonly objectiveNodes;
68
+ private stopObjectiveGlowAnimation;
69
+ private visible;
70
+ private reducedMotion;
71
+ private activeRosterId;
72
+ private activeRosterCanPulse;
73
+ private returningRosterId;
74
+ private rosterPulsePhase;
75
+ private rosterEntryElapsedMs;
76
+ private rosterReturnElapsedMs;
77
+ private stopRosterPulse;
78
+ private battleEntryActive;
79
+ private stopRosterNameMarquee;
80
+ private rosterNameScrollPhase;
81
+ private teamCheckFogElapsedMs;
82
+ private stopTeamCheckFog;
83
+ private lastInput;
84
+ private tuning;
85
+ private uiHighlightMultiplier;
86
+ private readonly releaseUiHighlight;
87
+ private readonly feedbackControllers;
88
+ constructor(ports: BattleHudPorts, scene: import('./PixiSceneGraph.js').PixiSceneGraph, assets: PixiAssetManager, constructors: Constructors, ticker: Ticker, activity: PixiAnimationActivity, requestRender: () => void, battleTextures: BattleHudPorts['textures'], tuning?: SessionTuningResolver, partyTextures?: BattleHudPorts['partyTextures'], animation?: PixiAnimationDirector | undefined, mediaBreath?: PixiMediaBreathRuntime);
89
+ sync(input: BattleHudSyncInput): void;
90
+ updateTuning(tuning: SessionTuningResolver | undefined): void;
91
+ setEarthquakeTransform(x: number, y: number, rotation: number, scale: number): void;
92
+ setReducedMotion(reducedMotion: boolean): void;
93
+ playResourceFeedback(feedback: readonly BattleRosterResourceFeedback[], signal: AbortSignal): Promise<void>;
94
+ prepareBattleEntry(seed: string, offsetX: number): readonly BattleRosterEntryNode[];
95
+ finishBattleEntry(): void;
96
+ cancelBattleEntry(): void;
97
+ reset(): void;
98
+ destroy(): void;
99
+ private syncLayout;
100
+ private syncRoster;
101
+ private syncRosterNode;
102
+ private createRosterNode;
103
+ private playRosterResourceValue;
104
+ private playRosterDamageShake;
105
+ private syncRosterName;
106
+ private syncRosterNameMarquee;
107
+ private syncRosterHpBar;
108
+ private syncAvatar;
109
+ private syncStatusPills;
110
+ private ensureStatusPill;
111
+ private createStatusPill;
112
+ private drawStatusPill;
113
+ private syncObjectives;
114
+ private drawObjectiveProgress;
115
+ private createObjectiveNode;
116
+ private playObjectiveGlow;
117
+ private configureObjectiveGlow;
118
+ private playObjectiveEntrance;
119
+ private settleObjectiveLifecycle;
120
+ private startObjectiveExit;
121
+ private restartObjectiveExit;
122
+ private destroyObjectiveNode;
123
+ private syncObjectiveGlowAnimation;
124
+ private syncTeamChecks;
125
+ private createTeamCheckNode;
126
+ private syncRosterGray;
127
+ private syncRosterStatusEffects;
128
+ private syncRosterCurrentActorVisuals;
129
+ private positionCurrentActorShadow;
130
+ private resolveCurrentActorNumber;
131
+ private applyCurrentRosterFrame;
132
+ private applyReturningRosterFrame;
133
+ private seedFor;
134
+ private resolveUnitCardMaxVisibleRows;
135
+ private resolveUnitCardRowGap;
136
+ private resolveDeadCardBrightness;
137
+ private resolveTeamCheckIconHeight;
138
+ private resolveTeamCheckIconGap;
139
+ private resolveTeamCheckGlowColor;
140
+ private resolveTeamCheckGlowIntensity;
141
+ private resolveTeamCheckFogSpeed;
142
+ private playTeamCheckEntrance;
143
+ private settleTeamCheckLifecycle;
144
+ private startTeamCheckExit;
145
+ private restartTeamCheckExit;
146
+ private resolveTuningNumber;
147
+ private resolveFiniteTuningNumber;
148
+ private resolveTuningColor;
149
+ private destroyTeamCheckNode;
150
+ private clearTeamCheckNodes;
151
+ private syncTeamCheckFogAnimation;
152
+ private stopTeamCheckFogAnimation;
153
+ private readonly updateTeamCheckFog;
154
+ private applyTeamCheckFogFrame;
155
+ private clearNodes;
156
+ private restoreBattleEntryPose;
157
+ private syncRosterPulse;
158
+ }
159
+ export {};
@@ -0,0 +1,57 @@
1
+ import type { Container, Mesh, MeshGeometry, Shader, UniformGroup } from 'pixi.js';
2
+ import type { PixiBattleFxCapabilities } from './PixiBattleFxResources.js';
3
+ import type { BattleFxPoint } from './BattleActionMotionMath.js';
4
+ export interface PixiBattleLightningHandle {
5
+ readonly root: Mesh<MeshGeometry, Shader>;
6
+ readonly geometry: MeshGeometry;
7
+ readonly shader: Shader;
8
+ readonly uniforms: UniformGroup<{
9
+ uColorFx: {
10
+ value: Float32Array;
11
+ type: 'vec3<f32>';
12
+ };
13
+ uCoreRatio: {
14
+ value: number;
15
+ type: 'f32';
16
+ };
17
+ uInnerGlowRatio: {
18
+ value: number;
19
+ type: 'f32';
20
+ };
21
+ uOuterGlowAlpha: {
22
+ value: number;
23
+ type: 'f32';
24
+ };
25
+ }>;
26
+ readonly points: Float32Array;
27
+ readonly positions: Float32Array;
28
+ from: BattleFxPoint;
29
+ to: BattleFxPoint;
30
+ width: number;
31
+ seed: number;
32
+ frame: number;
33
+ generation: number;
34
+ released: boolean;
35
+ }
36
+ /** One retained strip shades both the narrow core and soft halo in a single pass. */
37
+ export declare class PixiBattleLightningResources {
38
+ private readonly capabilities;
39
+ private readonly available;
40
+ private readonly active;
41
+ private readonly owned;
42
+ constructor(capabilities: PixiBattleFxCapabilities);
43
+ acquire(parent: Container, from: BattleFxPoint, to: BattleFxPoint, options: {
44
+ color: string;
45
+ seed: number;
46
+ width: number;
47
+ blurStrength: number;
48
+ outerGlowRadius?: number;
49
+ outerGlowAlpha?: number;
50
+ }): PixiBattleLightningHandle | null;
51
+ update(handle: PixiBattleLightningHandle, frame: number, generation?: number): void;
52
+ release(handle: PixiBattleLightningHandle | null, generation?: number | undefined): void;
53
+ reset(): void;
54
+ destroy(): void;
55
+ get activeCount(): number;
56
+ private create;
57
+ }