@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,223 @@
1
+ import type { RuntimeLogger } from '@bardway/trpg-media';
2
+ import type { TextStyleOptions } from 'pixi.js';
3
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
4
+ import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
5
+ import type { PixiAssetManager } from './PixiAssetManager.js';
6
+ import type { PixiSceneGraph } from './PixiSceneGraph.js';
7
+ import { PixiTokenWorld } from './PixiTokenWorld.js';
8
+ import { type PixiBattleFxCapabilities } from './PixiBattleFxResources.js';
9
+ import { type BattleFxPoint, type BattlePassByPath } from './BattleActionMotionMath.js';
10
+ import type { SessionTuningResolver } from '@bardway/trpg-media/tuning';
11
+ export interface VisualFloatInstruction {
12
+ id: string;
13
+ tokenId: string;
14
+ text: string;
15
+ color: string;
16
+ delay: number;
17
+ outward: boolean;
18
+ }
19
+ export interface VisualChargeMotion {
20
+ outcome: 'hit' | 'dodge' | 'miss' | 'blocked';
21
+ attackerFrom: {
22
+ col: number;
23
+ row: number;
24
+ };
25
+ attackerTo: {
26
+ col: number;
27
+ row: number;
28
+ };
29
+ targetFrom: {
30
+ col: number;
31
+ row: number;
32
+ };
33
+ targetTo: {
34
+ col: number;
35
+ row: number;
36
+ };
37
+ displacedTokens?: readonly {
38
+ tokenId: string;
39
+ from: {
40
+ col: number;
41
+ row: number;
42
+ };
43
+ to: {
44
+ col: number;
45
+ row: number;
46
+ };
47
+ }[];
48
+ }
49
+ export interface VisualAttackInstruction {
50
+ id: string;
51
+ attackerId: string;
52
+ targetId: string;
53
+ actionType: 'shoot' | 'throw' | 'melee' | 'electric' | 'swing' | 'blade' | 'charge' | 'whip';
54
+ evaded: boolean;
55
+ recovering: boolean;
56
+ hitIndex?: number;
57
+ resultFeedback: 'miss' | 'other';
58
+ feedbackText: string;
59
+ damageFloats: readonly VisualFloatInstruction[];
60
+ durations: {
61
+ line: number;
62
+ };
63
+ chargeMotion?: VisualChargeMotion;
64
+ }
65
+ export interface CombatMotionContext {
66
+ logger: RuntimeLogger;
67
+ scene: PixiSceneGraph;
68
+ world: PixiTokenWorld;
69
+ assets: PixiAssetManager;
70
+ director: PixiAnimationDirector;
71
+ constructors: Pick<typeof import('pixi.js'), 'Container' | 'Graphics' | 'Sprite' | 'Text' | 'Rectangle' | 'BlurFilter'>;
72
+ fxCapabilities: PixiBattleFxCapabilities;
73
+ getTuning(): SessionTuningResolver | undefined;
74
+ getAudio(): {
75
+ playCue(id: string): void;
76
+ } | null;
77
+ activity?: PixiAnimationActivity;
78
+ typography: {
79
+ data: TextStyleOptions;
80
+ damage: TextStyleOptions;
81
+ };
82
+ projectileImageUrl?: string;
83
+ colors: {
84
+ fx_attackLineColors_blade: string;
85
+ fx_attackLineColors_swing: string;
86
+ fx_attackLineColors_throw: string;
87
+ pixi_effect_attackLine: string;
88
+ pixi_effect_cinematic: string;
89
+ pixi_effect_damage: string;
90
+ pixi_effect_electric: string;
91
+ pixi_effect_miss: string;
92
+ pixi_effect_recover: string;
93
+ pixi_sessionGraybox_transition: string;
94
+ };
95
+ }
96
+ type CameraImpactShakeProfile = 'hit' | 'explosion';
97
+ export declare class PixiCombatMotion {
98
+ private readonly context;
99
+ private readonly statusScope;
100
+ private lifetime;
101
+ private readonly fxResources;
102
+ private readonly presentationEngine;
103
+ private readonly cameraImpactShakes;
104
+ private readonly heldChargeDodges;
105
+ private electricGroupActive;
106
+ private electricGroupFlashPlayed;
107
+ constructor(context: CombatMotionContext);
108
+ setElectricGroup(active: boolean): void;
109
+ reset(): void;
110
+ destroy(): void;
111
+ playShatter(tokenId: string, target: {
112
+ x: number;
113
+ y: number;
114
+ }, signal: AbortSignal): Promise<void>;
115
+ playIconScatter(imageUrl: string, target: {
116
+ x: number;
117
+ y: number;
118
+ }, signal: AbortSignal): Promise<void>;
119
+ playCover(imageUrl: string, tokenId: string, _target: {
120
+ x: number;
121
+ y: number;
122
+ }, signal: AbortSignal): Promise<void>;
123
+ private resetCamera;
124
+ private resetCameraImpactShake;
125
+ playCameraImpactShake(impactKey: string, profile: CameraImpactShakeProfile, signal: AbortSignal): Promise<void>;
126
+ playVisualDash(tokenId: string, to: BattleFxPoint, signal: AbortSignal, returning: boolean): Promise<void>;
127
+ private createChargeTrail;
128
+ playDirectionalRecoil(tokenId: string, from: {
129
+ x: number;
130
+ y: number;
131
+ }, target: {
132
+ x: number;
133
+ y: number;
134
+ }, signal: AbortSignal): Promise<void>;
135
+ playLocalResourceLossShake(tokenId: string, signal: AbortSignal): Promise<void>;
136
+ runSidecarActivity(id: string, run: () => Promise<void>): Promise<void>;
137
+ playSupportPulse(from: {
138
+ x: number;
139
+ y: number;
140
+ }, target: {
141
+ x: number;
142
+ y: number;
143
+ }, durationMs: number, firstAid: boolean, signal: AbortSignal): Promise<void>;
144
+ playExplosion(from: {
145
+ x: number;
146
+ y: number;
147
+ }, target: {
148
+ x: number;
149
+ y: number;
150
+ }, signal: AbortSignal, coverageRadius?: number, impactTokenIds?: readonly string[], cameraImpactKey?: string): Promise<void>;
151
+ playMeleeMotion(action: VisualAttackInstruction, attackerPoint: {
152
+ x: number;
153
+ y: number;
154
+ }, targetPoint: {
155
+ x: number;
156
+ y: number;
157
+ }, signal: AbortSignal): Promise<void>;
158
+ playRangedApproach(action: VisualAttackInstruction, from: BattleFxPoint, target: BattleFxPoint, signal: AbortSignal): Promise<void>;
159
+ playSwingArc(action: VisualAttackInstruction, center: {
160
+ x: number;
161
+ y: number;
162
+ }, signal: AbortSignal): Promise<void>;
163
+ playSwingTargetReaction(action: VisualAttackInstruction, from: {
164
+ x: number;
165
+ y: number;
166
+ }, target: {
167
+ x: number;
168
+ y: number;
169
+ }, signal: AbortSignal, impactKey: string): Promise<void>;
170
+ playBladeSlash(action: VisualAttackInstruction, target: {
171
+ x: number;
172
+ y: number;
173
+ }, signal: AbortSignal, impactKey: string): Promise<void>;
174
+ playProjectile(action: Pick<VisualAttackInstruction, 'id' | 'actionType' | 'evaded'>, from: {
175
+ x: number;
176
+ y: number;
177
+ }, to: {
178
+ x: number;
179
+ y: number;
180
+ }, signal: AbortSignal, shortRange?: boolean, passBy?: {
181
+ path: BattlePassByPath;
182
+ onProgress: (progress: number) => void;
183
+ }): Promise<void>;
184
+ playElectric(action: Pick<VisualAttackInstruction, 'id'>, from: {
185
+ x: number;
186
+ y: number;
187
+ }, to: {
188
+ x: number;
189
+ y: number;
190
+ }, signal: AbortSignal): Promise<void>;
191
+ playImpact(target: {
192
+ x: number;
193
+ y: number;
194
+ }, action: VisualAttackInstruction, signal: AbortSignal, impactKey: string): Promise<void>;
195
+ playResourceFloats(floats: VisualAttackInstruction['damageFloats'], action: VisualAttackInstruction, attackerPoint: {
196
+ x: number;
197
+ y: number;
198
+ }, targetPoint: {
199
+ x: number;
200
+ y: number;
201
+ }, signal: AbortSignal): Promise<void>;
202
+ playMissFeedback(action: VisualAttackInstruction, targetPoint: {
203
+ x: number;
204
+ y: number;
205
+ }, signal: AbortSignal): Promise<void>;
206
+ private startMissFeedback;
207
+ private resolveTuningNumber;
208
+ private resolveTuningColor;
209
+ private hashActionId;
210
+ playChargeMotion(sequence: VisualAttackInstruction, attackerPoint: {
211
+ x: number;
212
+ y: number;
213
+ }, targetPoint: {
214
+ x: number;
215
+ y: number;
216
+ }, signal: AbortSignal): Promise<void>;
217
+ playChargeImpact(sequence: VisualAttackInstruction, targetPoint: {
218
+ x: number;
219
+ y: number;
220
+ }, signal: AbortSignal, impactKey: string): Promise<void>;
221
+ playChargeDisplacements(sequence: VisualAttackInstruction, signal: AbortSignal, includeTarget: boolean): Promise<void>;
222
+ }
223
+ export {};
@@ -0,0 +1,37 @@
1
+ import type { Container, Mesh, MeshGeometry, Shader } from 'pixi.js';
2
+ type PixiContainer = Container;
3
+ type PixiMesh = Mesh<MeshGeometry, Shader>;
4
+ export interface PixiCurrentActorCardGlowConstructors {
5
+ Mesh?: typeof import('pixi.js').Mesh;
6
+ MeshGeometry?: typeof import('pixi.js').MeshGeometry;
7
+ Shader?: typeof import('pixi.js').Shader;
8
+ UniformGroup?: typeof import('pixi.js').UniformGroup;
9
+ }
10
+ export interface CurrentActorCardGlowLayout {
11
+ readonly width: number;
12
+ readonly height: number;
13
+ readonly intensity: number;
14
+ readonly softness: number;
15
+ readonly color: string;
16
+ }
17
+ /** One retained rounded-rectangle shader surface for the active roster card. */
18
+ export declare class PixiCurrentActorCardGlow {
19
+ private readonly constructors;
20
+ private mesh;
21
+ private geometry;
22
+ private shader;
23
+ private uniformGroup;
24
+ constructor(constructors: PixiCurrentActorCardGlowConstructors);
25
+ configure(parent: PixiContainer, before: PixiContainer, layout: CurrentActorCardGlowLayout): void;
26
+ setFrame(progress: number, staticPresentation?: boolean): void;
27
+ hide(): void;
28
+ hideIfAttachedTo(parent: PixiContainer): void;
29
+ detachFrom(parent?: PixiContainer): void;
30
+ destroy(): void;
31
+ getMesh(): PixiMesh | null;
32
+ getProgress(): number | null;
33
+ private ensureMesh;
34
+ private attachBefore;
35
+ private getUniformValues;
36
+ }
37
+ export {};
@@ -0,0 +1,55 @@
1
+ import type { Container, Mesh, MeshGeometry, Shader } from 'pixi.js';
2
+ type PixiContainer = Container;
3
+ type PixiMesh = Mesh<MeshGeometry, Shader>;
4
+ export interface PixiCurrentActorHaloConstructors {
5
+ Mesh?: typeof import('pixi.js').Mesh;
6
+ MeshGeometry?: typeof import('pixi.js').MeshGeometry;
7
+ Shader?: typeof import('pixi.js').Shader;
8
+ UniformGroup?: typeof import('pixi.js').UniformGroup;
9
+ }
10
+ export interface CurrentActorHaloLayout {
11
+ readonly ringDiameter: number;
12
+ readonly avatarAperture: number;
13
+ readonly range: number;
14
+ readonly brightness: number;
15
+ readonly innerBrightness: number;
16
+ readonly innerThickness: number;
17
+ readonly innerSoftness: number;
18
+ readonly waveScale: number;
19
+ readonly color: string;
20
+ }
21
+ export declare const resolveCurrentActorHaloSoftness: (range: number) => number;
22
+ export declare const resolveCurrentActorHaloBrightness: (brightness: number) => number;
23
+ export declare const resolveCurrentActorHaloEnvelope: (progress: number) => number;
24
+ export declare const resolveCurrentActorHaloPeakRadius: (tokenRadius: number, waveScale: number, progress: number) => number;
25
+ /** One retained, local shader surface for the active battle Token. */
26
+ export declare class PixiCurrentActorHalo {
27
+ private readonly constructors;
28
+ private mesh;
29
+ private geometry;
30
+ private shader;
31
+ private innerMesh;
32
+ private innerGeometry;
33
+ private innerShader;
34
+ private uniformGroup;
35
+ private presentationAlpha;
36
+ private highlightMultiplier;
37
+ constructor(constructors: PixiCurrentActorHaloConstructors);
38
+ configure(parent: PixiContainer, shadow: PixiContainer, avatarLayer: PixiContainer, layout: CurrentActorHaloLayout): void;
39
+ setProgress(progress: number): void;
40
+ setStaticPresentation(): void;
41
+ setAnimatedPresentation(): void;
42
+ setHighlightMultiplier(multiplier: number): void;
43
+ hide(): void;
44
+ detachFrom(parent?: PixiContainer): void;
45
+ isAttachedTo(parent: PixiContainer): boolean;
46
+ destroy(): void;
47
+ getMesh(): PixiMesh | null;
48
+ getInnerMesh(): PixiMesh | null;
49
+ private ensureMesh;
50
+ private ensureInnerMesh;
51
+ private attachBehindShadow;
52
+ private attachAfterAvatar;
53
+ private getUniformValues;
54
+ }
55
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { Filter } from 'pixi.js';
2
+ export interface PixiDirectionalMotionBlur {
3
+ readonly filter: Filter;
4
+ update(velocityX: number, velocityY: number): void;
5
+ reset(): void;
6
+ destroy(): void;
7
+ }
8
+ /** Retained, single-pass directional trail. Mutates the original typed uniform without allocation. */
9
+ export declare const createPixiDirectionalMotionBlur: (FilterConstructor: typeof Filter, options?: {
10
+ resolution?: number;
11
+ padding?: number;
12
+ }) => PixiDirectionalMotionBlur;
@@ -0,0 +1,85 @@
1
+ import type { Application } from 'pixi.js';
2
+ import { type DisplaySnapshot, type PresentationEvent } from '@bardway/trpg-display';
3
+ import type { RuntimeLogger } from '@bardway/trpg-media';
4
+ import { type StageRenderQuality } from './PixiApplicationFactory.js';
5
+ import { type PixiAnimationActivity } from './PixiAnimationActivity.js';
6
+ import { type PixiAnimationDirector } from './PixiAnimationDirector.js';
7
+ import { PixiAssetManager } from './PixiAssetManager.js';
8
+ import { type PixiSceneGraph } from './PixiSceneGraph.js';
9
+ import { PixiVideoRuntime } from './PixiVideoRuntime.js';
10
+ import { StoryTimelineClock } from './story/StoryTimelineClock.js';
11
+ export interface PixiDisplayContext {
12
+ readonly app: Application;
13
+ readonly pixi: typeof import('pixi.js');
14
+ readonly scene: PixiSceneGraph;
15
+ readonly assets: PixiAssetManager;
16
+ readonly animation: PixiAnimationDirector;
17
+ readonly activity: PixiAnimationActivity;
18
+ readonly video: PixiVideoRuntime;
19
+ readonly clock: StoryTimelineClock;
20
+ readonly stage: {
21
+ readonly width: number;
22
+ readonly height: number;
23
+ };
24
+ readonly signal: AbortSignal;
25
+ readonly logger: RuntimeLogger;
26
+ requestRender(): void;
27
+ }
28
+ /** The host owns the visual policy and exposes already adjudicated public data. */
29
+ export interface PixiDisplaySurface {
30
+ applySnapshot(snapshot: DisplaySnapshot, signal: AbortSignal): void | Promise<void>;
31
+ play(event: PresentationEvent, signal: AbortSignal): Promise<void>;
32
+ setPaused?(paused: boolean): void;
33
+ setReducedMotion?(reducedMotion: boolean): void;
34
+ resize?(): void;
35
+ reset(): void;
36
+ destroy(): void;
37
+ }
38
+ export interface PixiDisplayRendererOptions {
39
+ readonly logger: RuntimeLogger;
40
+ readonly stage: {
41
+ readonly width: number;
42
+ readonly height: number;
43
+ };
44
+ readonly quality?: StageRenderQuality;
45
+ readonly resolveAssetUrl: (uri: string) => string;
46
+ readonly createSurface: (context: PixiDisplayContext) => PixiDisplaySurface;
47
+ readonly blocking?: (event: PresentationEvent) => boolean;
48
+ readonly onCommitted?: (snapshot: DisplaySnapshot) => void;
49
+ }
50
+ /** One Application, one private ticker and a renderer-owned logical animation clock. */
51
+ export declare class PixiDisplayRenderer {
52
+ private readonly options;
53
+ private app;
54
+ private mountPromise;
55
+ private viewport;
56
+ private context;
57
+ private surface;
58
+ private queue;
59
+ private lifecycle;
60
+ private snapshotController;
61
+ private latest;
62
+ private committed;
63
+ private seen;
64
+ private pendingApply;
65
+ private paused;
66
+ private reducedMotion;
67
+ private lost;
68
+ private destroyed;
69
+ private epoch;
70
+ constructor(options: PixiDisplayRendererOptions);
71
+ mount(host: HTMLElement): Promise<void>;
72
+ private initialize;
73
+ private createRuntime;
74
+ applySnapshot(input: unknown): Promise<void>;
75
+ play(input: unknown): Promise<'completed' | 'aborted' | 'ignored'>;
76
+ pause(paused?: boolean): void;
77
+ setReducedMotion(reduced: boolean): void;
78
+ resize(width: number, height: number): void;
79
+ reset(): Promise<void>;
80
+ destroy(): Promise<void>;
81
+ private disposeRuntime;
82
+ private readonly advanceClock;
83
+ private readonly onContextLost;
84
+ private readonly onContextRestored;
85
+ }
@@ -0,0 +1,25 @@
1
+ import type { PresentationEvent, DisplaySnapshot } from '@bardway/trpg-display';
2
+ /**
3
+ * Renderer-local effect boundary. Plugins receive only already-adjudicated
4
+ * events and must resolve after abort so the shared display queue can advance.
5
+ */
6
+ export interface PixiEffectPlugin<TEvent = PresentationEvent, TSnapshot = DisplaySnapshot> {
7
+ readonly id: string;
8
+ canPlay(event: TEvent): boolean;
9
+ play(event: TEvent, signal: AbortSignal): Promise<void>;
10
+ applySnapshot?(snapshot: TSnapshot): void;
11
+ setPaused(paused: boolean): void;
12
+ reset(): void;
13
+ abortSceneTransients?(): void;
14
+ destroy(): void;
15
+ }
16
+ export declare class PixiEffectRegistry<TEvent = PresentationEvent, TSnapshot = DisplaySnapshot> {
17
+ private readonly plugins;
18
+ constructor(plugins: readonly PixiEffectPlugin<TEvent, TSnapshot>[]);
19
+ play(event: TEvent, signal: AbortSignal): Promise<boolean>;
20
+ setPaused(paused: boolean): void;
21
+ applySnapshot(snapshot: TSnapshot): void;
22
+ reset(): void;
23
+ abortSceneTransients(): void;
24
+ destroy(): void;
25
+ }
@@ -0,0 +1,104 @@
1
+ import type { Container, Graphics, Mesh, MeshGeometry, Shader, Sprite, Texture, Ticker, UniformGroup } from 'pixi.js';
2
+ import type { RuntimeLogger } from '@bardway/trpg-media';
3
+ import type { PixiAssetManager } from './PixiAssetManager.js';
4
+ import type { PixiSceneGraph } from './PixiSceneGraph.js';
5
+ import type { SessionTuningResolver } from './tuning/SessionTuningResolver.js';
6
+ import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
7
+ import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
8
+ import type { PixiMediaBreathRuntime } from './PixiMediaBreathRuntime.js';
9
+ import type { PixiVideoRuntime } from './PixiVideoRuntime.js';
10
+ interface Constructors {
11
+ Container: typeof Container;
12
+ Graphics: typeof Graphics;
13
+ Mesh: typeof Mesh;
14
+ MeshGeometry: typeof MeshGeometry;
15
+ Shader: typeof Shader;
16
+ Sprite: new (texture?: Texture | import('pixi.js').SpriteOptions) => Sprite;
17
+ UniformGroup: typeof UniformGroup;
18
+ }
19
+ export declare const DEFAULT_ENDING_TIMELINE: {
20
+ readonly veilInDuration: 0.65;
21
+ readonly photoAppearDuration: 0.12;
22
+ readonly fullscreenHoldDuration: 2.77;
23
+ readonly photoSettleDuration: 3.85;
24
+ readonly backgroundRevealDuration: 3.35;
25
+ readonly veilOutDuration: 1.25;
26
+ };
27
+ interface EndingLayoutRect {
28
+ readonly x: number;
29
+ readonly y: number;
30
+ readonly width: number;
31
+ readonly height: number;
32
+ }
33
+ export declare class PixiEndingSurface {
34
+ private readonly assets;
35
+ private readonly constructors;
36
+ private readonly requestRender;
37
+ private readonly ports;
38
+ private tuning?;
39
+ private readonly ticker?;
40
+ private readonly activity?;
41
+ private readonly mediaBreath?;
42
+ private readonly videoRuntime?;
43
+ private disposed;
44
+ private readonly resourceScope;
45
+ readonly node: Container;
46
+ private readonly photoAnchor;
47
+ private readonly photoFrame;
48
+ private readonly photoMask;
49
+ private readonly photoGlow;
50
+ private readonly dust;
51
+ private active;
52
+ private elapsed;
53
+ private releaseActivity;
54
+ private photoImage;
55
+ private photoMediaBreath;
56
+ private photoVideoBinding;
57
+ private photoMediaReady;
58
+ private photoMediaFailed;
59
+ private photoKey;
60
+ private photoVideoUrl;
61
+ private photoReadyKey;
62
+ private readonly photoReadyWaiters;
63
+ private photoVersion;
64
+ private timelineActive;
65
+ private activeProxy;
66
+ private activeProxyMediaBreath;
67
+ private uiHighlightMultiplier;
68
+ private readonly releaseUiHighlight;
69
+ constructor(scene: PixiSceneGraph, assets: PixiAssetManager, constructors: Constructors, skinTexture: Texture | null, photoFrameTexture: Texture | null, requestRender: () => void, ports: {
70
+ logger: RuntimeLogger;
71
+ stage: {
72
+ width: number;
73
+ height: number;
74
+ };
75
+ layout: {
76
+ photoFrame: EndingLayoutRect;
77
+ photoImageRect: EndingLayoutRect;
78
+ };
79
+ stageColor: string;
80
+ paperColor: string;
81
+ paperEdgeColor: string;
82
+ }, tuning?: SessionTuningResolver | undefined, ticker?: Ticker | undefined, activity?: PixiAnimationActivity | undefined, mediaBreath?: PixiMediaBreathRuntime | undefined, videoRuntime?: PixiVideoRuntime | undefined);
83
+ sync(imageUrl: string | null, videoUrlOrVisible: string | null | boolean, visibleValue?: boolean): void;
84
+ playTimeline(animation: PixiAnimationDirector, signal: AbortSignal, reducedMotion: boolean, overlayLayer: Container): Promise<void>;
85
+ waitForPhotoReady(imageUrl: string | null, signal: AbortSignal): Promise<boolean>;
86
+ updateTuning(tuning: SessionTuningResolver | undefined): void;
87
+ reset(): void;
88
+ private loadPhoto;
89
+ waitForVideoReady(imageUrl: string | null, videoUrl: string, signal: AbortSignal): Promise<boolean>;
90
+ private upgradePhotoToVideo;
91
+ private clearPhoto;
92
+ private clearPhotoProxy;
93
+ private settlePhotoReadyWaiters;
94
+ private createPhotoProxy;
95
+ private syncLayout;
96
+ private syncPhotoImageLayout;
97
+ private resolveTuningNumber;
98
+ private resolveTuningRect;
99
+ private configurePhotoGlow;
100
+ private syncActivity;
101
+ private update;
102
+ destroy(): void;
103
+ }
104
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { Filter, UniformGroup } from 'pixi.js';
2
+ export declare const DOSSIER_INSANITY_MODES: readonly ["mosaic", "ripple", "chromatic", "shatter"];
3
+ export type DossierInsanityMode = (typeof DOSSIER_INSANITY_MODES)[number];
4
+ export interface DossierInsanityFilter {
5
+ readonly filter: Filter;
6
+ update(mode: DossierInsanityMode, intensity: number, seed: number): void;
7
+ destroy(): void;
8
+ }
9
+ export interface DossierInsanityFilterConstructors {
10
+ Filter: typeof Filter;
11
+ UniformGroup: typeof UniformGroup;
12
+ tearGapColor: Float32Array;
13
+ }
14
+ export declare const createDossierInsanityFilter: ({ Filter, UniformGroup, tearGapColor, }: DossierInsanityFilterConstructors) => DossierInsanityFilter;
@@ -0,0 +1,38 @@
1
+ import type { Container, Mesh, MeshGeometry, Shader } from 'pixi.js';
2
+ type PixiMesh = Mesh<MeshGeometry, Shader>;
3
+ export interface PixiLocalGlowConstructors {
4
+ Mesh?: typeof import('pixi.js').Mesh;
5
+ MeshGeometry?: typeof import('pixi.js').MeshGeometry;
6
+ Shader?: typeof import('pixi.js').Shader;
7
+ UniformGroup?: typeof import('pixi.js').UniformGroup;
8
+ }
9
+ export interface PixiLocalGlowLayout {
10
+ x: number;
11
+ y: number;
12
+ width: number;
13
+ height: number;
14
+ color: string;
15
+ intensity: number;
16
+ softness: number;
17
+ edge: number;
18
+ edgeIntensity?: number;
19
+ shape: 'ellipse' | 'rounded-rect';
20
+ }
21
+ /** Retained, tightly bounded glow surface shared by non-battle scene composition. */
22
+ export declare class PixiLocalGlowMesh {
23
+ private readonly constructors;
24
+ private readonly label;
25
+ private mesh;
26
+ private geometry;
27
+ private shader;
28
+ private uniforms;
29
+ constructor(constructors: PixiLocalGlowConstructors, label: string);
30
+ configure(parent: Container, layout: PixiLocalGlowLayout): PixiMesh | null;
31
+ setProgress(progress: number): void;
32
+ setIntensity(intensity: number): void;
33
+ setVisible(visible: boolean): void;
34
+ destroy(): void;
35
+ get node(): PixiMesh | null;
36
+ private ensureMesh;
37
+ }
38
+ export {};
@@ -0,0 +1,36 @@
1
+ import type { Container } from 'pixi.js';
2
+ import type { PixiBattleFxCapabilities } from './PixiBattleFxResources.js';
3
+ export interface MapEdgeShadowStyle {
4
+ color: string;
5
+ top: {
6
+ depth: number;
7
+ alpha: number;
8
+ power: number;
9
+ };
10
+ side: {
11
+ depth: number;
12
+ alpha: number;
13
+ power: number;
14
+ };
15
+ bottom: {
16
+ depth: number;
17
+ alpha: number;
18
+ power: number;
19
+ };
20
+ }
21
+ export declare class PixiMapEdgeShadow {
22
+ private readonly constructors;
23
+ private mesh;
24
+ private geometry;
25
+ private shader;
26
+ private uniforms;
27
+ constructor(constructors: PixiBattleFxCapabilities);
28
+ sync(parent: Container, rect: {
29
+ x: number;
30
+ y: number;
31
+ width: number;
32
+ height: number;
33
+ }, style: MapEdgeShadowStyle): void;
34
+ destroy(): void;
35
+ private ensure;
36
+ }