@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,203 @@
1
+ import type { RuntimeLogger } from '@bardway/trpg-media';
2
+ import type { PixiLayoutRect } from './PixiSessionLayout.js';
3
+ export interface PreludeSurfaceLayout {
4
+ participantArea: PixiLayoutRect;
5
+ participantPhoto: {
6
+ width: number;
7
+ height: number;
8
+ };
9
+ participantFrame: {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ participantImageRect: PixiLayoutRect;
14
+ participantLabel: PixiLayoutRect & {
15
+ fontSize: number;
16
+ };
17
+ modulePhoto: PixiLayoutRect;
18
+ moduleFrame: PixiLayoutRect;
19
+ moduleImageRect: PixiLayoutRect;
20
+ smokeOrigin: {
21
+ x: number;
22
+ y: number;
23
+ };
24
+ lampLightArea: PixiLayoutRect;
25
+ }
26
+ export interface PreludeSurfacePorts {
27
+ logger: RuntimeLogger;
28
+ stage: {
29
+ width: number;
30
+ height: number;
31
+ };
32
+ layout: PreludeSurfaceLayout;
33
+ maxParticipants: number;
34
+ portraitColumns: number;
35
+ portraitGap: number;
36
+ typography: ReturnType<typeof createPixiTypography>;
37
+ colors: {
38
+ desk: string;
39
+ mask: string;
40
+ text: string;
41
+ };
42
+ photoColors: {
43
+ preludeParticipantLabel: string;
44
+ };
45
+ ambient: {
46
+ lamp: {
47
+ baseAlpha: number;
48
+ color: string;
49
+ flickerBurstGapMaxMs: number;
50
+ flickerBurstGapMinMs: number;
51
+ flickerBurstMaxPulses: number;
52
+ flickerBurstMinPulses: number;
53
+ flickerDimming: number;
54
+ flickerDurationMs: number;
55
+ flickerIntervalMaxMs: number;
56
+ flickerIntervalMinMs: number;
57
+ flickerTransitionMs: number;
58
+ };
59
+ smoke: {
60
+ blurStrength: number;
61
+ color: string;
62
+ fillAlpha: number;
63
+ riseDistance: number;
64
+ };
65
+ };
66
+ }
67
+ import type { BlurFilter, ColorMatrixFilter, Container, Graphics, Mesh, MeshGeometry, Shader, Sprite, Text, Texture, Ticker, UniformGroup } from 'pixi.js';
68
+ export interface PreludeParticipant {
69
+ id: string;
70
+ name: string;
71
+ avatarUrl?: string;
72
+ }
73
+ import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
74
+ import type { PixiAssetManager } from './PixiAssetManager.js';
75
+ import type { createPixiTypography } from './PixiTypography.js';
76
+ import type { PixiSceneGraph } from './PixiSceneGraph.js';
77
+ import { type SessionDisplayPreludeFrameTextures } from './PixiSessionSkin.js';
78
+ import type { SessionTuningResolver } from './tuning/SessionTuningResolver.js';
79
+ import type { PixiMediaBreathRuntime } from './PixiMediaBreathRuntime.js';
80
+ import type { PixiVideoRuntime } from './PixiVideoRuntime.js';
81
+ interface Constructors {
82
+ BlurFilter: typeof BlurFilter;
83
+ ColorMatrixFilter: typeof ColorMatrixFilter;
84
+ Container: typeof Container;
85
+ Graphics: typeof Graphics;
86
+ Mesh: typeof Mesh;
87
+ MeshGeometry: typeof MeshGeometry;
88
+ Shader: typeof Shader;
89
+ Sprite: new (texture?: Texture | import('pixi.js').SpriteOptions) => Sprite;
90
+ Text: new (options: import('pixi.js').TextOptions) => Text;
91
+ UniformGroup: typeof UniformGroup;
92
+ }
93
+ export interface PreludeStoryPortraitProxy {
94
+ readonly id: string;
95
+ readonly root: Container;
96
+ }
97
+ export interface PreludeStoryTransitionArtwork {
98
+ readonly root: Container;
99
+ readonly module: {
100
+ readonly root: Container;
101
+ readonly image: Sprite | null;
102
+ readonly width: number;
103
+ readonly height: number;
104
+ readonly textureSize: {
105
+ readonly width: number;
106
+ readonly height: number;
107
+ } | null;
108
+ readonly targetImagePosition: {
109
+ readonly x: number;
110
+ readonly y: number;
111
+ } | null;
112
+ readonly targetImageScale: {
113
+ readonly x: number;
114
+ readonly y: number;
115
+ } | null;
116
+ };
117
+ readonly portraits: readonly PreludeStoryPortraitProxy[];
118
+ readonly releaseMediaBreath?: () => void;
119
+ }
120
+ export declare class PixiPreludeSurface {
121
+ private readonly assets;
122
+ private readonly constructors;
123
+ private readonly ticker;
124
+ private readonly activity;
125
+ private readonly requestRender;
126
+ private readonly ports;
127
+ private readonly frameTextures;
128
+ private tuning?;
129
+ private readonly mediaBreath?;
130
+ private readonly videoRuntime?;
131
+ private disposed;
132
+ private readonly resourceScope;
133
+ readonly node: Container;
134
+ readonly modulePhotoAnchor: Container;
135
+ private readonly photos;
136
+ private readonly photosMask;
137
+ private readonly photoLampOverlayLayer;
138
+ private readonly photoNodes;
139
+ private readonly dust;
140
+ private readonly smoke;
141
+ private readonly smokeLayer;
142
+ private readonly smokeBlur;
143
+ private readonly lampLayer;
144
+ private readonly lampGlow;
145
+ private readonly photoLampGlow;
146
+ private readonly backgroundSprite;
147
+ private readonly ambientFilter;
148
+ private readonly moduleMask;
149
+ private readonly moduleFrame;
150
+ private active;
151
+ private elapsed;
152
+ private nextLampBurstAt;
153
+ private nextLampPulseAt;
154
+ private lampDimUntil;
155
+ private lampBurstPulsesRemaining;
156
+ private lampTargetAlpha;
157
+ private lampCurrentAlpha;
158
+ private ambientRandomStep;
159
+ private releaseActivity;
160
+ private moduleImage;
161
+ private moduleMediaBreath;
162
+ private moduleVideoBinding;
163
+ private moduleMediaReady;
164
+ private moduleMediaFailed;
165
+ private moduleKey;
166
+ private moduleVersion;
167
+ private participants;
168
+ private storyTransitionActive;
169
+ private uiHighlightMultiplier;
170
+ private readonly releaseUiHighlight;
171
+ constructor(scene: PixiSceneGraph, assets: PixiAssetManager, constructors: Constructors, ticker: Ticker, activity: PixiAnimationActivity, requestRender: () => void, skinTexture: Texture | null, ports: PreludeSurfacePorts, frameTextures?: SessionDisplayPreludeFrameTextures, tuning?: SessionTuningResolver | undefined, mediaBreath?: PixiMediaBreathRuntime | undefined, videoRuntime?: PixiVideoRuntime | undefined);
172
+ sync(participants: PreludeParticipant[], moduleImageUrl: string | null, moduleVideoUrlOrVisible: string | null | boolean, visibleValue?: boolean): void;
173
+ updateTuning(tuning: SessionTuningResolver | undefined): void;
174
+ previewAmbient(): void;
175
+ createStoryTransitionArtwork(): PreludeStoryTransitionArtwork;
176
+ restoreStoryTransitionPose(): void;
177
+ reset(): void;
178
+ destroy(): void;
179
+ private syncParticipants;
180
+ private createPhotoNode;
181
+ private syncParticipantAvatar;
182
+ private syncStoryTransitionPortraitSources;
183
+ private loadModuleImage;
184
+ waitForVideoReady(imageUrl: string | null, videoUrl: string, signal: AbortSignal): Promise<boolean>;
185
+ private upgradeModuleImageToVideo;
186
+ private syncActivity;
187
+ private update;
188
+ private resolveLampFlickerInterval;
189
+ private syncLayout;
190
+ private resolveModuleFrame;
191
+ private resolveModuleImageRect;
192
+ private configureLampGlow;
193
+ private resolveLampLightArea;
194
+ private resolveTuningNumber;
195
+ private triggerLampPulse;
196
+ private nextAmbientRandom;
197
+ }
198
+ export declare const resolvePreludePhotoRects: (participantIds: readonly string[], layout: PreludeSurfaceLayout, options: {
199
+ maxCount: number;
200
+ columns: number;
201
+ gap: number;
202
+ }) => PixiLayoutRect[];
203
+ export {};
@@ -0,0 +1,65 @@
1
+ import type { Container, Texture } from 'pixi.js';
2
+ import type { PixiSceneGraph } from './PixiSceneGraph.js';
3
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
4
+ import type { SessionTuningResolver, SessionTuningPath } from '@bardway/trpg-media/tuning';
5
+ export interface ProgressCinematicInstruction {
6
+ id: string;
7
+ label: string;
8
+ kind: 'start' | 'progress' | 'success' | 'failure';
9
+ totalCount: number;
10
+ fromCount: number;
11
+ toCount: number;
12
+ }
13
+ export interface ProgressCinematicContext {
14
+ scene: PixiSceneGraph;
15
+ director: PixiAnimationDirector;
16
+ constructors: Pick<typeof import('pixi.js'), 'Container' | 'Sprite' | 'Graphics' | 'Text' | 'BlurFilter' | 'Rectangle'>;
17
+ getTuning(): SessionTuningResolver | undefined;
18
+ stage: {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ maxCount: number;
23
+ defaultLabel: string;
24
+ fontFamily: string;
25
+ titleColor: string;
26
+ panelColor: string;
27
+ borderColor: string;
28
+ panel: {
29
+ x: number;
30
+ y: number;
31
+ width: number;
32
+ height: number;
33
+ };
34
+ frameTexture: Texture | null;
35
+ createBackdrop(): Container;
36
+ releaseBackdrop(node: Container): void;
37
+ playCue(kind: 'start' | 'increment' | 'decrement' | 'success' | 'failure'): void;
38
+ resolveColor(path: SessionTuningPath, fallback: string | number): string | number;
39
+ }
40
+ export declare class PixiProgressCinematic {
41
+ private readonly context;
42
+ private lifetime;
43
+ private teamCheckRoot;
44
+ private teamCheckStrands;
45
+ private teamCheckGlowLayer;
46
+ private teamCheckGlowFilter;
47
+ private teamCheckOwnerKey;
48
+ private teamCheckTitle;
49
+ private teamCheckLights;
50
+ private uiHighlightMultiplier;
51
+ constructor(context: ProgressCinematicContext);
52
+ setHighlightMultiplier(value: number): void;
53
+ reset(): void;
54
+ destroy(): void;
55
+ play(event: ProgressCinematicInstruction, signal: AbortSignal): Promise<void>;
56
+ private ensureTeamCheck;
57
+ private createTeamCheckFrame;
58
+ private createTeamCheckFallbackPanel;
59
+ private createTeamCheckLamp;
60
+ private syncTeamCheckLights;
61
+ private resolveTeamCheckFailureKeyframes;
62
+ private resolveTuningNumber;
63
+ private resolveTuningColor;
64
+ private releaseTeamCheck;
65
+ }
@@ -0,0 +1,101 @@
1
+ import type { Container } from 'pixi.js';
2
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
3
+ import type { PixiAssetManager } from './PixiAssetManager.js';
4
+ import type { RuntimeLogger } from '@bardway/trpg-media';
5
+ export interface ResultLandingPoint {
6
+ id: string;
7
+ x: number;
8
+ y: number;
9
+ }
10
+ import { type ResultEffectTuning, type VisualResultEffect } from './ResultEffectTuning.js';
11
+ export interface PixiResultEffectConstructors {
12
+ readonly Container: typeof import('pixi.js').Container;
13
+ readonly Mesh: typeof import('pixi.js').Mesh;
14
+ readonly MeshGeometry: typeof import('pixi.js').MeshGeometry;
15
+ readonly Shader: typeof import('pixi.js').Shader;
16
+ readonly Sprite: typeof import('pixi.js').Sprite;
17
+ readonly UniformGroup: typeof import('pixi.js').UniformGroup;
18
+ }
19
+ export interface PixiResultEffectSurfaceOptions {
20
+ readonly parent: Container;
21
+ readonly constructors: PixiResultEffectConstructors;
22
+ readonly director: PixiAnimationDirector;
23
+ readonly assets: PixiAssetManager;
24
+ readonly requestRender: () => void;
25
+ readonly tuning: ResultEffectTuning;
26
+ readonly stage: {
27
+ width: number;
28
+ height: number;
29
+ };
30
+ readonly imageUrl: string;
31
+ readonly scope: string;
32
+ readonly targetCount: number;
33
+ readonly logger: RuntimeLogger;
34
+ }
35
+ export interface ResultEffectDiagnostics {
36
+ readonly activeEffect: VisualResultEffect | null;
37
+ readonly objectCount: number;
38
+ readonly estimatedDrawCalls: number;
39
+ readonly pixelCoverageRatio: number;
40
+ }
41
+ export declare const hashResultEffectSeed: (seed: string) => number;
42
+ export declare const sampleRectangularEdgeAlpha: (x: number, y: number, edgeDepthPx: number, softnessPx: number, stage: {
43
+ width: number;
44
+ height: number;
45
+ }) => number;
46
+ export declare const sampleImageBurstUnfold: (elapsedMs: number, revealMs: number, expandMs: number, endScale: number) => {
47
+ envelope: number;
48
+ rotation: number;
49
+ scale: number;
50
+ };
51
+ export declare const normalizeResultLandingPoints: (points: readonly ResultLandingPoint[], tuning: ResultEffectTuning, count: number) => readonly ResultLandingPoint[];
52
+ /** Retained Pixi result FX placed below the Three dice canvas and system HUD. */
53
+ export declare class PixiResultEffectSurface {
54
+ private readonly options;
55
+ private readonly root;
56
+ private readonly edgeMesh;
57
+ private readonly edgeGeometry;
58
+ private readonly edgeShader;
59
+ private readonly edgeUniformGroup;
60
+ private readonly burstMeshes;
61
+ private readonly burstGeometries;
62
+ private readonly burstShaders;
63
+ private readonly burstUniformGroups;
64
+ private failureSprites;
65
+ private failureTexture;
66
+ private failureTexturePromise;
67
+ private assetWarningLogged;
68
+ private activeController;
69
+ private activeEffect;
70
+ private activeLandingPoints;
71
+ private sourceLandingPoints;
72
+ private edgeEnvelope;
73
+ private failureEnvelope;
74
+ private failureScaleFactor;
75
+ private failureRotation;
76
+ private reducedMotion;
77
+ private destroyed;
78
+ private tuning;
79
+ constructor(options: PixiResultEffectSurfaceOptions);
80
+ prewarm(): Promise<void>;
81
+ play(effect: VisualResultEffect, landingPoints: readonly ResultLandingPoint[], seed: string, signal: AbortSignal): Promise<void>;
82
+ updateTuning(tuning: ResultEffectTuning): void;
83
+ setReducedMotion(reducedMotion: boolean): void;
84
+ reset(): void;
85
+ diagnostics(): ResultEffectDiagnostics;
86
+ destroy(): void;
87
+ private playEdge;
88
+ private playCriticalFailure;
89
+ private playCriticalSuccess;
90
+ private wait;
91
+ private waitForFailureTexture;
92
+ private applyEdgeVisuals;
93
+ private applyFailureLayout;
94
+ private applyFailureVisuals;
95
+ private failureBaseScale;
96
+ private applyBurstVisuals;
97
+ private ensureFailureSprites;
98
+ private hideAll;
99
+ private createEdgeMesh;
100
+ private createBurstMesh;
101
+ }
@@ -0,0 +1,44 @@
1
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
2
+ export interface PixiRetainedMeterView {
3
+ setRatio(ratio: number): void;
4
+ setFlashAlpha(alpha: number): void;
5
+ }
6
+ export interface PixiRetainedMeterSnapshot {
7
+ readonly displayedRatio: number;
8
+ readonly targetRatio: number;
9
+ readonly initialized: boolean;
10
+ }
11
+ export interface PixiRetainedMeterAnimationOptions {
12
+ readonly flashDuration: number;
13
+ readonly transitionDuration: number;
14
+ }
15
+ /**
16
+ * Animates a retained meter from its currently rendered value. Snapshot syncs
17
+ * may replace the target while a tween is active without snapping back to the
18
+ * prior authoritative value.
19
+ */
20
+ export declare class PixiRetainedMeterAnimator {
21
+ private readonly animation;
22
+ private readonly view;
23
+ private readonly requestRender;
24
+ private displayedRatio;
25
+ private targetRatio;
26
+ private initialized;
27
+ private reducedMotion;
28
+ private controller;
29
+ private options;
30
+ constructor(animation: PixiAnimationDirector, view: PixiRetainedMeterView, requestRender: () => void, options?: Partial<PixiRetainedMeterAnimationOptions>);
31
+ updateOptions(options: Partial<PixiRetainedMeterAnimationOptions>): void;
32
+ sync(ratio: number, options?: {
33
+ immediate?: boolean;
34
+ }): void;
35
+ setReducedMotion(reducedMotion: boolean): void;
36
+ settle(ratio?: number): void;
37
+ reset(): void;
38
+ destroy(): void;
39
+ getSnapshot(): PixiRetainedMeterSnapshot;
40
+ private play;
41
+ private applyRatio;
42
+ private applyFlash;
43
+ private normalizeOptions;
44
+ }
@@ -0,0 +1,21 @@
1
+ import type { Application, Assets } from 'pixi.js';
2
+ import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
3
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
4
+ import type { PixiAssetManager } from './PixiAssetManager.js';
5
+ import type { PixiSceneGraph } from './PixiSceneGraph.js';
6
+ import type { PixiViewportController } from './PixiViewportController.js';
7
+ import type { StageRenderQuality } from './PixiApplicationFactory.js';
8
+ export type PixiRuntimeApi = typeof import('pixi.js');
9
+ export interface PixiRuntimeContext {
10
+ readonly app: Application;
11
+ readonly pixi: PixiRuntimeApi;
12
+ readonly assetsApi: typeof Assets;
13
+ readonly scene: PixiSceneGraph;
14
+ readonly activity: PixiAnimationActivity;
15
+ readonly assets: PixiAssetManager;
16
+ readonly animation: PixiAnimationDirector;
17
+ readonly viewport: PixiViewportController;
18
+ readonly quality: StageRenderQuality;
19
+ requestRender(): void;
20
+ }
21
+ export declare const createPixiRuntimeContext: (context: PixiRuntimeContext) => PixiRuntimeContext;
@@ -0,0 +1,42 @@
1
+ import type { Container } from 'pixi.js';
2
+ export type PixiContainerConstructor = new () => Container;
3
+ export interface PixiSceneGraph {
4
+ readonly root: Container;
5
+ readonly backgroundLayer: Container;
6
+ /** Battle-world shake transform. The semantic camera remains its child. */
7
+ readonly worldShakeLayer: Container;
8
+ /** Additive hit reaction between field shake and semantic camera transforms. */
9
+ readonly cameraImpactLayer: Container;
10
+ readonly cameraContainer: Container;
11
+ readonly viewportMaskLayer: Container;
12
+ readonly mapLayer: Container;
13
+ readonly gridLayer: Container;
14
+ readonly worldUnderlayFxLayer: Container;
15
+ readonly tokenLayer: Container;
16
+ readonly tokenStatusLayer: Container;
17
+ readonly worldOverlayFxLayer: Container;
18
+ readonly fieldFxLayer: Container;
19
+ readonly cinematicLayer: Container;
20
+ /** Top-level transient battle illustration surface. */
21
+ readonly battlePictureFxLayer: Container;
22
+ /** Top-level combo photo surface, above battle illustrations. */
23
+ readonly comboFxLayer: Container;
24
+ readonly globalFxLayer: Container;
25
+ /** Fixed-stage surfaces that are not part of the battle camera. */
26
+ readonly presentationLayer: Container;
27
+ readonly screenFxLayer: Container;
28
+ readonly sceneHudLayer: Container;
29
+ /** @deprecated Migration-only alias. New scene UI must use sceneHudLayer. */
30
+ readonly modalLayer: Container;
31
+ readonly systemHudLayer: Container;
32
+ /** Unmasked Story illustration entrance, above UI and below active Global FX. */
33
+ readonly storyEntranceLayer: Container;
34
+ readonly debugLayer: Container;
35
+ }
36
+ export interface PixiSessionEffectLayerPlacement {
37
+ readonly fieldAboveUi: boolean;
38
+ readonly globalAboveUi: boolean;
39
+ }
40
+ export declare const DEFAULT_PIXI_SESSION_EFFECT_LAYER_PLACEMENT: PixiSessionEffectLayerPlacement;
41
+ export declare const placePixiSessionEffectLayers: (scene: PixiSceneGraph, profile: "story" | "battle", placement?: PixiSessionEffectLayerPlacement, storyEntranceActive?: boolean) => void;
42
+ export declare const createPixiSceneGraph: (ContainerConstructor: PixiContainerConstructor) => PixiSceneGraph;
@@ -0,0 +1,41 @@
1
+ import type { ScenePictureInstruction, ImageBurstInstruction, PixiSceneMotionContext, PixiSceneMotionPorts } from './PixiSceneMotionPorts.js';
2
+ export declare function resolveScenePictureLayout(stage: {
3
+ width: number;
4
+ height: number;
5
+ }, source: {
6
+ width: number;
7
+ height: number;
8
+ }, direction: -1 | 1, bounds: {
9
+ maxWidth: number;
10
+ maxHeight: number;
11
+ allowUpscale?: boolean;
12
+ }): {
13
+ width: number;
14
+ height: number;
15
+ centerX: number;
16
+ centerY: number;
17
+ entryX: number;
18
+ driftX: number;
19
+ exitX: number;
20
+ };
21
+ export declare class PixiSceneMotion {
22
+ private readonly context;
23
+ private readonly ports;
24
+ private readonly active;
25
+ private closed;
26
+ private scopeSequence;
27
+ private readonly fxResources;
28
+ constructor(context: PixiSceneMotionContext, ports: PixiSceneMotionPorts);
29
+ playPicture(event: ScenePictureInstruction, signal: AbortSignal): Promise<void>;
30
+ playImageBurst(event: ImageBurstInstruction, signal: AbortSignal): Promise<void>;
31
+ playTitle(label: string, signal: AbortSignal): Promise<void>;
32
+ playCounter(label: string, signal: AbortSignal): Promise<void>;
33
+ reset(): void;
34
+ destroy(): void;
35
+ private run;
36
+ private resolveTuningNumber;
37
+ private playBattlePicture;
38
+ private playBurst;
39
+ private playCinematicTitle;
40
+ private playRoundFlip;
41
+ }
@@ -0,0 +1,83 @@
1
+ import type { TextStyleOptions } from 'pixi.js';
2
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
3
+ import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
4
+ import type { PixiAssetManager } from './PixiAssetManager.js';
5
+ import type { PixiBattleFxResourceOwner } from './PixiBattleFxResources.js';
6
+ import type { PixiSceneGraph } from './PixiSceneGraph.js';
7
+ import type { PixiShaderRuntime } from './PixiShaderRuntime.js';
8
+ import type { PixiVideoRuntime } from './PixiVideoRuntime.js';
9
+ import type { PixiMediaBreathRuntime } from './PixiMediaBreathRuntime.js';
10
+ import type { PixiLayoutRect } from './PixiSessionLayout.js';
11
+ import type { SessionTuningPath } from './tuning/SessionTuningTypes.js';
12
+ export interface ScenePictureInstruction {
13
+ id: string;
14
+ imageUrl: string;
15
+ mediaKind: 'image' | 'video';
16
+ videoUrl?: string;
17
+ direction: -1 | 1;
18
+ rotationRadians: number;
19
+ /** Host-supplied deterministic visual random seed, 0..1. */
20
+ seed: number;
21
+ }
22
+ export interface ImageBurstInstruction {
23
+ id: string;
24
+ participants: readonly {
25
+ id: string;
26
+ imageUrl?: string;
27
+ tint: string;
28
+ }[];
29
+ seed: number;
30
+ }
31
+ export interface PixiSceneMotionPorts {
32
+ stage: {
33
+ width: number;
34
+ height: number;
35
+ };
36
+ /** Unique for instances sharing an AssetManager. */
37
+ assetScopePrefix: string;
38
+ defaultImageUrl: string;
39
+ reducedMotion(): boolean;
40
+ number?(path: SessionTuningPath): unknown;
41
+ colors: {
42
+ cinematic: string;
43
+ transition: string;
44
+ borderStrong: string;
45
+ pictureVeil: string;
46
+ shadow: string;
47
+ mask: string;
48
+ roundShade: string;
49
+ roundDepth: string;
50
+ };
51
+ typography: {
52
+ title: TextStyleOptions;
53
+ round: TextStyleOptions;
54
+ };
55
+ burstBounds: PixiLayoutRect;
56
+ burstEntryMargin: number;
57
+ roundShade: PixiLayoutRect;
58
+ roundEntryY: number;
59
+ roundExitY: number;
60
+ lightning: {
61
+ offsetY: number;
62
+ amplitude: number;
63
+ hue: number;
64
+ speed: number;
65
+ intensity: number;
66
+ size: number;
67
+ alpha: number;
68
+ };
69
+ playPictureSound?(): void;
70
+ playBurstSound?(): void;
71
+ }
72
+ export interface PixiSceneMotionContext {
73
+ constructors: Pick<typeof import('pixi.js'), 'Container' | 'Graphics' | 'Sprite' | 'Text' | 'BlurFilter' | 'Rectangle'>;
74
+ scene: Pick<PixiSceneGraph, 'battlePictureFxLayer' | 'comboFxLayer' | 'cinematicLayer'>;
75
+ assets: Pick<PixiAssetManager, 'loadTexture' | 'releaseScope'>;
76
+ director: PixiAnimationDirector;
77
+ activity?: PixiAnimationActivity;
78
+ fxResources: Pick<PixiBattleFxResourceOwner, 'acquireSpeedLines' | 'getSpeedLineUniforms' | 'release' | 'acquireBlurFilter' | 'releaseBlurFilter'>;
79
+ shaderRuntime: Pick<PixiShaderRuntime, 'create' | 'release'>;
80
+ videoRuntime?: Pick<PixiVideoRuntime, 'loadBinding'>;
81
+ mediaBreath?: Pick<PixiMediaBreathRuntime, 'attach'>;
82
+ requestRender(): void;
83
+ }