@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.
- package/LICENSE +21 -0
- package/NOTICE +10 -0
- package/NOTICE.md +1 -0
- package/README.md +25 -2
- package/dist/AnimationMilestones.d.ts +17 -0
- package/dist/BattleActionMotionMath.d.ts +24 -0
- package/dist/BattleActionPresentationRecipes.d.ts +11 -0
- package/dist/BattleFxLibrary.d.ts +16 -0
- package/dist/BattlePresentationEngine.d.ts +26 -0
- package/dist/BattlePresentationPoseRegistry.d.ts +25 -0
- package/dist/BattlePresentationRecipe.d.ts +48 -0
- package/dist/BattleSequenceScheduler.d.ts +11 -0
- package/dist/DisplayEventQueue.d.ts +24 -0
- package/dist/PixiAnimationActivity.d.ts +7 -0
- package/dist/PixiAnimationDirector.d.ts +21 -0
- package/dist/PixiApplicationFactory.d.ts +17 -0
- package/dist/PixiAssetManager.d.ts +70 -0
- package/dist/PixiBattleActionRecipes.d.ts +75 -0
- package/dist/PixiBattleCinematicSurface.d.ts +23 -0
- package/dist/PixiBattleEntryTransition.d.ts +87 -0
- package/dist/PixiBattleFieldSurface.d.ts +125 -0
- package/dist/PixiBattleFxResources.d.ts +154 -0
- package/dist/PixiBattleGrid.d.ts +13 -0
- package/dist/PixiBattleHudPorts.d.ts +192 -0
- package/dist/PixiBattleHudSurface.d.ts +159 -0
- package/dist/PixiBattleLightningResources.d.ts +57 -0
- package/dist/PixiBattleMapDissolve.d.ts +38 -0
- package/dist/PixiBattleSceneTransition.d.ts +30 -0
- package/dist/PixiBattleTokenLifecycleCoordinator.d.ts +44 -0
- package/dist/PixiBattleVisualLayout.d.ts +284 -0
- package/dist/PixiBattleWhipGeometry.d.ts +18 -0
- package/dist/PixiBattleWhipMotion.d.ts +63 -0
- package/dist/PixiBattleWhipResources.d.ts +53 -0
- package/dist/PixiCameraFocusController.d.ts +40 -0
- package/dist/PixiCombatMotion.d.ts +223 -0
- package/dist/PixiCurrentActorCardGlow.d.ts +37 -0
- package/dist/PixiCurrentActorHalo.d.ts +55 -0
- package/dist/PixiDirectionalMotionBlur.d.ts +12 -0
- package/dist/PixiDisplayRenderer.d.ts +85 -0
- package/dist/PixiEffectPlugin.d.ts +25 -0
- package/dist/PixiEndingSurface.d.ts +104 -0
- package/dist/PixiInvestigatorDossierInsanityFilter.d.ts +14 -0
- package/dist/PixiLocalGlowMesh.d.ts +38 -0
- package/dist/PixiMapEdgeShadow.d.ts +36 -0
- package/dist/PixiMapMediaSurface.d.ts +71 -0
- package/dist/PixiMapWorldUtils.d.ts +24 -0
- package/dist/PixiMediaBreathRuntime.d.ts +69 -0
- package/dist/PixiMotion.d.ts +42 -0
- package/dist/PixiObjectiveBreathingGlow.d.ts +39 -0
- package/dist/PixiPartyHudSurface.d.ts +58 -0
- package/dist/PixiPersistentEffectTransition.d.ts +23 -0
- package/dist/PixiPortraitResourceCard.d.ts +147 -0
- package/dist/PixiPreludeStoryTransition.d.ts +35 -0
- package/dist/PixiPreludeSurface.d.ts +203 -0
- package/dist/PixiProgressCinematic.d.ts +65 -0
- package/dist/PixiResultEffectSurface.d.ts +101 -0
- package/dist/PixiRetainedMeterAnimator.d.ts +44 -0
- package/dist/PixiRuntimeContext.d.ts +21 -0
- package/dist/PixiSceneGraph.d.ts +42 -0
- package/dist/PixiSceneMotion.d.ts +41 -0
- package/dist/PixiSceneMotionPorts.d.ts +83 -0
- package/dist/PixiScenePresentationDirector.d.ts +118 -0
- package/dist/PixiSessionLayout.d.ts +61 -0
- package/dist/PixiSessionSkin.d.ts +30 -0
- package/dist/PixiShaderRuntime.d.ts +191 -0
- package/dist/PixiStageFontLoader.d.ts +2 -0
- package/dist/PixiStageMetrics.d.ts +25 -0
- package/dist/PixiStageTheme.d.ts +26 -0
- package/dist/PixiStoryArchiveMotion.d.ts +19 -0
- package/dist/PixiStoryCardCut.d.ts +58 -0
- package/dist/PixiStorySurface.d.ts +285 -0
- package/dist/PixiStoryWorkspaceSurface.d.ts +64 -0
- package/dist/PixiSummaryBoardSurface.d.ts +112 -0
- package/dist/PixiSystemHudSurface.d.ts +73 -0
- package/dist/PixiTeamCheckCinematic.d.ts +34 -0
- package/dist/PixiTextTransitionEffect.d.ts +54 -0
- package/dist/PixiTokenPersistentStatus.d.ts +101 -0
- package/dist/PixiTokenWorld.d.ts +170 -0
- package/dist/PixiTypography.d.ts +96 -0
- package/dist/PixiVideoRuntime.d.ts +61 -0
- package/dist/PixiViewportController.d.ts +25 -0
- package/dist/ResultEffectTuning.d.ts +57 -0
- package/dist/RetainedStageSurface.d.ts +50 -0
- package/dist/SessionFieldEffectRuntime.d.ts +45 -0
- package/dist/SessionSceneHistory.d.ts +10 -0
- package/dist/SessionSceneRegistry.d.ts +31 -0
- package/dist/StoryEventCoordinator.d.ts +61 -0
- package/dist/effects/PixiEffectLayerRegistry.d.ts +54 -0
- package/dist/effects/PixiEffectScope.d.ts +20 -0
- package/dist/effects/PixiStableRandom.d.ts +2 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.js +24184 -0
- package/dist/index.js.map +7 -0
- package/dist/recipes/EffectPrimitiveRuntimeRegistry.d.ts +28 -0
- package/dist/recipes/EffectRecipeExecutor.d.ts +73 -0
- package/dist/recipes/primitives.d.ts +39 -0
- package/dist/recipes/registry.d.ts +57 -0
- package/dist/recipes/schema.d.ts +93 -0
- package/dist/recipes.d.ts +5 -0
- package/dist/recipes.js +1384 -0
- package/dist/recipes.js.map +7 -0
- package/dist/story/PixiStoryPresentationEngine.d.ts +90 -0
- package/dist/story/StoryContentSurface.d.ts +34 -0
- package/dist/story/StoryImageFilter.d.ts +15 -0
- package/dist/story/StoryTimelineClock.d.ts +22 -0
- package/dist/story/StoryVisualMath.d.ts +6 -0
- package/dist/tuning/SessionTuningResolver.d.ts +1 -0
- package/dist/tuning/SessionTuningTypes.d.ts +1 -0
- package/dist/ui/PixiStagePrimitives.d.ts +36 -0
- package/dist/uniforms.d.ts +1 -0
- package/package.json +44 -4
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
export interface StoryMediaContent {
|
|
2
|
+
key: string;
|
|
3
|
+
kind: 'portrait' | 'card' | 'image';
|
|
4
|
+
sourceId: string;
|
|
5
|
+
title: string;
|
|
6
|
+
imageUrl: string;
|
|
7
|
+
videoUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GalleryEntry {
|
|
10
|
+
id: string;
|
|
11
|
+
kind: 'portrait' | 'card';
|
|
12
|
+
sourceType?: 'portrait' | 'card';
|
|
13
|
+
sourceId?: string;
|
|
14
|
+
title: string;
|
|
15
|
+
imageUrl: string;
|
|
16
|
+
thumbUrl?: string;
|
|
17
|
+
enterRotationDeg: number;
|
|
18
|
+
stackRotationDeg: number;
|
|
19
|
+
}
|
|
20
|
+
export interface GalleryDisplayState {
|
|
21
|
+
current: GalleryEntry | null;
|
|
22
|
+
phase: 'enter' | 'display' | 'exit' | 'idle';
|
|
23
|
+
stackedImages: GalleryEntry[];
|
|
24
|
+
}
|
|
25
|
+
export interface StorySurfaceLayout {
|
|
26
|
+
media: PixiLayoutRect;
|
|
27
|
+
leftPanel: PixiLayoutRect;
|
|
28
|
+
rightPanel: PixiLayoutRect;
|
|
29
|
+
revealCard: PixiLayoutRect;
|
|
30
|
+
thumbnailGrid: {
|
|
31
|
+
capacity: number;
|
|
32
|
+
padding: number;
|
|
33
|
+
gapX: number;
|
|
34
|
+
leftScale: number;
|
|
35
|
+
rightScale: number;
|
|
36
|
+
columns: number;
|
|
37
|
+
rows: number;
|
|
38
|
+
aspectRatio: number;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface StorySurfacePorts {
|
|
42
|
+
logger: RuntimeLogger;
|
|
43
|
+
stage: {
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
};
|
|
47
|
+
layout: StorySurfaceLayout;
|
|
48
|
+
displayDurationMs: (scene: string) => number;
|
|
49
|
+
colors: {
|
|
50
|
+
mask: string;
|
|
51
|
+
transition: string;
|
|
52
|
+
};
|
|
53
|
+
photo: {
|
|
54
|
+
thumbnailInset: number;
|
|
55
|
+
revealFramePadding: number;
|
|
56
|
+
shadow: string;
|
|
57
|
+
shadowWarm: string;
|
|
58
|
+
paper: string;
|
|
59
|
+
paperEdge: string;
|
|
60
|
+
thumbnailBorder: string;
|
|
61
|
+
thumbnailBorderWidth: number;
|
|
62
|
+
thumbnailBorderAlpha: number;
|
|
63
|
+
revealBorderWidth: number;
|
|
64
|
+
};
|
|
65
|
+
media: {
|
|
66
|
+
backdrop: {
|
|
67
|
+
blurStrength: number;
|
|
68
|
+
alpha: number;
|
|
69
|
+
};
|
|
70
|
+
frame: {
|
|
71
|
+
shadowOffsetFar: {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
};
|
|
75
|
+
shadowOffsetNear: {
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
};
|
|
79
|
+
borderColor: string;
|
|
80
|
+
borderWidth: number;
|
|
81
|
+
borderAlpha: number;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
import type { PreparedStoryContentTransition } from './story/StoryContentSurface.js';
|
|
86
|
+
import type { BlurFilter, Container, Filter, Graphics, Rectangle, Sprite, Text, Texture } from 'pixi.js';
|
|
87
|
+
import type { RuntimeLogger } from '@bardway/trpg-media';
|
|
88
|
+
import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
|
|
89
|
+
import type { PixiAssetManager } from './PixiAssetManager.js';
|
|
90
|
+
import { type PixiLayoutRect } from './PixiSessionLayout.js';
|
|
91
|
+
import type { PixiSceneGraph } from './PixiSceneGraph.js';
|
|
92
|
+
import type { SessionTuningResolver } from './tuning/SessionTuningResolver.js';
|
|
93
|
+
import type { PixiMediaBreathRuntime } from './PixiMediaBreathRuntime.js';
|
|
94
|
+
import type { PixiVideoRuntime } from './PixiVideoRuntime.js';
|
|
95
|
+
interface Constructors {
|
|
96
|
+
BlurFilter: typeof BlurFilter;
|
|
97
|
+
Container: typeof Container;
|
|
98
|
+
Filter?: typeof Filter;
|
|
99
|
+
Graphics: typeof Graphics;
|
|
100
|
+
Rectangle?: typeof Rectangle;
|
|
101
|
+
Sprite: new (texture?: Texture | import('pixi.js').SpriteOptions) => Sprite;
|
|
102
|
+
Text: new (options: import('pixi.js').TextOptions) => Text;
|
|
103
|
+
}
|
|
104
|
+
export interface PixiStoryPresentationContent {
|
|
105
|
+
readonly key: string;
|
|
106
|
+
readonly imageUrl: string;
|
|
107
|
+
readonly videoUrl?: string;
|
|
108
|
+
readonly kind?: StoryMediaContent['kind'];
|
|
109
|
+
readonly sourceId?: string;
|
|
110
|
+
readonly title?: string;
|
|
111
|
+
}
|
|
112
|
+
export type PixiStorySurfaceMode = 'story' | 'battle' | 'hidden';
|
|
113
|
+
export interface PixiStoryPresentationTargets {
|
|
114
|
+
currentContent?: Container | null;
|
|
115
|
+
readonly contentRoot: Container;
|
|
116
|
+
readonly overlayRoot: Container;
|
|
117
|
+
readonly backdropSprite: Sprite;
|
|
118
|
+
readonly backdropBlur: BlurFilter;
|
|
119
|
+
readonly shadowBlur: BlurFilter;
|
|
120
|
+
}
|
|
121
|
+
export declare class PixiStorySurface {
|
|
122
|
+
private readonly scene;
|
|
123
|
+
private readonly assets;
|
|
124
|
+
private readonly constructors;
|
|
125
|
+
private readonly animation;
|
|
126
|
+
private readonly requestRender;
|
|
127
|
+
private readonly ports;
|
|
128
|
+
private tuning?;
|
|
129
|
+
private readonly mediaBreath?;
|
|
130
|
+
private readonly setStoryEntranceActive;
|
|
131
|
+
private readonly videoRuntime?;
|
|
132
|
+
private disposed;
|
|
133
|
+
private readonly resourceScope;
|
|
134
|
+
readonly node: Container;
|
|
135
|
+
private readonly mainVisualShakeLayer;
|
|
136
|
+
readonly mainImageAnchor: Container;
|
|
137
|
+
readonly mainImageOverlay: Container;
|
|
138
|
+
readonly leftPanelNode: Container;
|
|
139
|
+
readonly rightPanelNode: Container;
|
|
140
|
+
readonly mainBackdrop: Sprite;
|
|
141
|
+
private readonly mainBackdropMask;
|
|
142
|
+
private readonly mainBackdropBlur;
|
|
143
|
+
private readonly mainMediaShadow;
|
|
144
|
+
private readonly mainMediaShadowBlur;
|
|
145
|
+
private readonly mainMediaShadowFilterArea;
|
|
146
|
+
private readonly cardCutBackLayer;
|
|
147
|
+
private readonly cardCutFrontLayer;
|
|
148
|
+
private readonly cardCut;
|
|
149
|
+
private readonly mainImageContentLayer;
|
|
150
|
+
private readonly presentationTargets;
|
|
151
|
+
readonly leftPanelMask: Graphics;
|
|
152
|
+
readonly rightPanelMask: Graphics;
|
|
153
|
+
private readonly reveal;
|
|
154
|
+
private readonly revealShade;
|
|
155
|
+
private readonly revealCard;
|
|
156
|
+
private readonly revealShadow;
|
|
157
|
+
private readonly revealShadowBlur;
|
|
158
|
+
private readonly revealShadowFilterArea;
|
|
159
|
+
private readonly revealContent;
|
|
160
|
+
private readonly archiveMotionFilter;
|
|
161
|
+
private readonly archiveMotionFilterArea;
|
|
162
|
+
private readonly archiveMotionFrame;
|
|
163
|
+
private readonly revealFrame;
|
|
164
|
+
private readonly revealMask;
|
|
165
|
+
private readonly clueThumbnails;
|
|
166
|
+
private readonly peopleThumbnails;
|
|
167
|
+
private mainPhoto;
|
|
168
|
+
private pendingMainPhoto;
|
|
169
|
+
private mainImage;
|
|
170
|
+
private mainPosterTexture;
|
|
171
|
+
private mainPreparedTransition;
|
|
172
|
+
private revealPreparedTransition;
|
|
173
|
+
private mainImageContent;
|
|
174
|
+
private mainImageKey;
|
|
175
|
+
private mainImageReadyKey;
|
|
176
|
+
private mainImageLoadingKey;
|
|
177
|
+
private renderedImageRect;
|
|
178
|
+
private readonly mainImageReadyWaiters;
|
|
179
|
+
private revealImage;
|
|
180
|
+
private revealKind;
|
|
181
|
+
private revealKey;
|
|
182
|
+
private revealExitingKey;
|
|
183
|
+
private archiveHandoffComplete;
|
|
184
|
+
private lifecycleVersion;
|
|
185
|
+
private mainVersion;
|
|
186
|
+
private revealVersion;
|
|
187
|
+
private mainImageAbort;
|
|
188
|
+
private reducedMotion;
|
|
189
|
+
private revealAttempt;
|
|
190
|
+
private revealAbort;
|
|
191
|
+
private mode;
|
|
192
|
+
private readonly mediaBreathBindings;
|
|
193
|
+
private lastClueState;
|
|
194
|
+
private readonly publishedEntryWaiters;
|
|
195
|
+
private readonly reservedPublishedSources;
|
|
196
|
+
private readonly manualArchivedEntries;
|
|
197
|
+
constructor(scene: PixiSceneGraph, assets: PixiAssetManager, constructors: Constructors, animation: PixiAnimationDirector, requestRender: () => void, ports: StorySurfacePorts, tuning?: SessionTuningResolver | undefined, mediaBreath?: PixiMediaBreathRuntime | undefined, setStoryEntranceActive?: (active: boolean) => void, videoRuntime?: PixiVideoRuntime | undefined);
|
|
198
|
+
sync(content: StoryMediaContent | PixiStoryPresentationContent | string | null, clueState: GalleryDisplayState, mode: PixiStorySurfaceMode): void;
|
|
199
|
+
resetTransitionPose(): void;
|
|
200
|
+
setEarthquakeTransform(x: number, y: number, rotation: number, scale: number): void;
|
|
201
|
+
isPlayerShareReserved(sourceType: 'portrait' | 'card', sourceId: string): boolean;
|
|
202
|
+
preparePreludeStoryBase(content: StoryMediaContent | PixiStoryPresentationContent | string | null): void;
|
|
203
|
+
preparePreludeStoryHandoff(): void;
|
|
204
|
+
restorePreludeStoryTransition(visible: boolean): void;
|
|
205
|
+
getMainBackdropTargetAlpha(): number;
|
|
206
|
+
getRenderedImageRect(): PixiLayoutRect | null;
|
|
207
|
+
getPresentationTargets(): PixiStoryPresentationTargets;
|
|
208
|
+
prepareContentTransition(content: StoryMediaContent | PixiStoryPresentationContent, signal: AbortSignal): Promise<PreparedStoryContentTransition | null>;
|
|
209
|
+
private preparePublishedContentTransition;
|
|
210
|
+
setPresentationContent(content: StoryMediaContent | PixiStoryPresentationContent | string | null, options?: {
|
|
211
|
+
animate?: boolean;
|
|
212
|
+
signal?: AbortSignal;
|
|
213
|
+
}): Promise<boolean>;
|
|
214
|
+
primePresentationVideo(content: StoryMediaContent | PixiStoryPresentationContent, signal: AbortSignal): Promise<boolean>;
|
|
215
|
+
waitForMainImageReady(imageUrl: string | null, signal: AbortSignal): Promise<boolean>;
|
|
216
|
+
waitForPresentationContentReady(content: StoryMediaContent | PixiStoryPresentationContent | string | null, signal: AbortSignal | null): Promise<boolean>;
|
|
217
|
+
setReducedMotion(reducedMotion: boolean): void;
|
|
218
|
+
reset(): void;
|
|
219
|
+
destroy(): void;
|
|
220
|
+
updateTuning(tuning: SessionTuningResolver | undefined): void;
|
|
221
|
+
private syncMainImage;
|
|
222
|
+
private cancelMainImageTransition;
|
|
223
|
+
private cancelRevealTransition;
|
|
224
|
+
private commitMainImage;
|
|
225
|
+
private startMainPhotoVideoUpgrade;
|
|
226
|
+
private upgradeMainPhotoToVideo;
|
|
227
|
+
private ownsMainPhotoVideo;
|
|
228
|
+
private activateMainPhotoVideo;
|
|
229
|
+
private restoreMainPhotoPoster;
|
|
230
|
+
private settleMainImageReadyWaiters;
|
|
231
|
+
private syncRail;
|
|
232
|
+
private syncArchiveRails;
|
|
233
|
+
private hideReservedArchiveThumbnails;
|
|
234
|
+
private contentSourceKey;
|
|
235
|
+
private reservePublishedSource;
|
|
236
|
+
private releasePublishedSource;
|
|
237
|
+
private entrySourceKey;
|
|
238
|
+
private entryMatchesContent;
|
|
239
|
+
private findPublishedEntry;
|
|
240
|
+
private waitForPublishedEntry;
|
|
241
|
+
private settlePublishedEntryWaiters;
|
|
242
|
+
private resolveArchivedEntries;
|
|
243
|
+
private createThumbnailNode;
|
|
244
|
+
private syncThumbnailGeometry;
|
|
245
|
+
private syncThumbnailImage;
|
|
246
|
+
private invalidateThumbnailLoads;
|
|
247
|
+
private commitThumbnailTexture;
|
|
248
|
+
private applyThumbnailImageGeometry;
|
|
249
|
+
private playReveal;
|
|
250
|
+
private animateRevealCardEntrance;
|
|
251
|
+
private archiveReveal;
|
|
252
|
+
private applyArchiveMotionFrame;
|
|
253
|
+
private syncArchiveMotionFilterArea;
|
|
254
|
+
private resolveArchivePlacement;
|
|
255
|
+
private completeArchiveThumbnail;
|
|
256
|
+
private resolveRevealDuration;
|
|
257
|
+
private resolveArchiveDuration;
|
|
258
|
+
private resolveMainImageCutOptions;
|
|
259
|
+
private resolveMainImageRect;
|
|
260
|
+
private createMainPhotoNode;
|
|
261
|
+
private syncMainPhotoGeometry;
|
|
262
|
+
private normalizeMainPhotoNode;
|
|
263
|
+
private destroyMainPhotoNode;
|
|
264
|
+
private attachMediaBreath;
|
|
265
|
+
private destroyMediaSprite;
|
|
266
|
+
private syncMainBackdrop;
|
|
267
|
+
private syncMainImageGeometry;
|
|
268
|
+
private syncLayout;
|
|
269
|
+
private syncRevealCardGeometry;
|
|
270
|
+
private restoreRevealCardPose;
|
|
271
|
+
private resolveTuningNumber;
|
|
272
|
+
}
|
|
273
|
+
export interface StoryThumbnailGridLayout {
|
|
274
|
+
columns: number;
|
|
275
|
+
rows: number;
|
|
276
|
+
gapX: number;
|
|
277
|
+
gapY: number;
|
|
278
|
+
thumbnailWidth: number;
|
|
279
|
+
thumbnailHeight: number;
|
|
280
|
+
capacity: number;
|
|
281
|
+
rects: PixiLayoutRect[];
|
|
282
|
+
}
|
|
283
|
+
export type StoryThumbnailFlow = 'top-down-left-to-right' | 'top-down-right-to-left';
|
|
284
|
+
export declare const resolveStoryThumbnailGrid: (panel: PixiLayoutRect, count: number, flow: StoryThumbnailFlow | undefined, itemScale: number | undefined, options: StorySurfaceLayout["thumbnailGrid"]) => StoryThumbnailGridLayout;
|
|
285
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { BlurFilter, Container, Graphics, Rectangle, Sprite, Texture } from 'pixi.js';
|
|
2
|
+
import type { PixiLayoutRect } from './PixiSessionLayout.js';
|
|
3
|
+
import type { PixiSceneGraph } from './PixiSceneGraph.js';
|
|
4
|
+
import type { SessionDisplayCaseWorkspaceTextures } from './PixiSessionSkin.js';
|
|
5
|
+
import type { SessionTuningResolver } from './tuning/SessionTuningResolver.js';
|
|
6
|
+
interface Constructors {
|
|
7
|
+
BlurFilter: typeof BlurFilter;
|
|
8
|
+
Container: typeof Container;
|
|
9
|
+
Graphics: typeof Graphics;
|
|
10
|
+
Rectangle: typeof Rectangle;
|
|
11
|
+
Sprite: new (texture?: Texture | import('pixi.js').SpriteOptions) => Sprite;
|
|
12
|
+
}
|
|
13
|
+
/** Stable Story shell with retained side panels and legacy case-workspace tuning keys. */
|
|
14
|
+
export declare class PixiStoryWorkspaceSurface {
|
|
15
|
+
private readonly constructors;
|
|
16
|
+
private readonly textures;
|
|
17
|
+
private readonly requestRender;
|
|
18
|
+
private readonly ports;
|
|
19
|
+
private tuning?;
|
|
20
|
+
readonly node: Container;
|
|
21
|
+
readonly leftPanelGroup: Container;
|
|
22
|
+
readonly rightPanelGroup: Container;
|
|
23
|
+
private readonly shellShadow;
|
|
24
|
+
private readonly shellShadowMask;
|
|
25
|
+
private readonly shellShadowBlur;
|
|
26
|
+
private readonly shell;
|
|
27
|
+
private readonly leftPanelShadow;
|
|
28
|
+
private readonly rightPanelShadow;
|
|
29
|
+
private readonly panelShadowBlur;
|
|
30
|
+
private readonly leftPanel;
|
|
31
|
+
private readonly rightPanel;
|
|
32
|
+
private storyCluePanel;
|
|
33
|
+
private storyPeoplePanel;
|
|
34
|
+
private transition;
|
|
35
|
+
constructor(scene: PixiSceneGraph, constructors: Constructors, textures: SessionDisplayCaseWorkspaceTextures, requestRender: () => void, ports: {
|
|
36
|
+
layout: {
|
|
37
|
+
shell: PixiLayoutRect;
|
|
38
|
+
leftPanelFrame: PixiLayoutRect;
|
|
39
|
+
rightPanelFrame: PixiLayoutRect;
|
|
40
|
+
};
|
|
41
|
+
hudTop: number;
|
|
42
|
+
shadowColor: string;
|
|
43
|
+
maskColor: string;
|
|
44
|
+
stage: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
}, tuning?: SessionTuningResolver | undefined);
|
|
49
|
+
attachStoryPanels(cluePanel: Container, clueMask: Graphics, peoplePanel: Container, peopleMask: Graphics): void;
|
|
50
|
+
sync(): void;
|
|
51
|
+
setVisible(visible: boolean): void;
|
|
52
|
+
updateTuning(tuning: SessionTuningResolver | undefined): void;
|
|
53
|
+
preparePreludeStoryBase(): void;
|
|
54
|
+
preparePreludeStoryHandoff(): void;
|
|
55
|
+
restorePreludeStoryTransition(visible: boolean): void;
|
|
56
|
+
destroy(): void;
|
|
57
|
+
private syncLayout;
|
|
58
|
+
private restoreStaticStoryPose;
|
|
59
|
+
getMotionNumber(key: string, fallback: number): number;
|
|
60
|
+
getMotionString(key: string, fallback: string): string;
|
|
61
|
+
private motionNumber;
|
|
62
|
+
private visualNumber;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { Container, Graphics, Sprite, Text, Texture } from 'pixi.js';
|
|
2
|
+
import type { RuntimeLogger } from '@bardway/trpg-media';
|
|
3
|
+
import type { TokenAvatarCrop } from './PixiMapWorldUtils.js';
|
|
4
|
+
import type { PixiAssetManager } from './PixiAssetManager.js';
|
|
5
|
+
export interface SummaryBoardParticipant {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
avatarUrl?: string;
|
|
9
|
+
avatarCrop?: TokenAvatarCrop;
|
|
10
|
+
}
|
|
11
|
+
export interface SummaryBoardRankingEntry extends SummaryBoardParticipant {
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SummaryBoardData {
|
|
15
|
+
owner: string;
|
|
16
|
+
primaryValue: string;
|
|
17
|
+
secondaryValue: string;
|
|
18
|
+
ranking: readonly SummaryBoardRankingEntry[];
|
|
19
|
+
participants: readonly SummaryBoardParticipant[];
|
|
20
|
+
}
|
|
21
|
+
import type { PixiSceneGraph } from './PixiSceneGraph.js';
|
|
22
|
+
import type { TextStyleOptions } from 'pixi.js';
|
|
23
|
+
import type { SessionTuningResolver } from '@bardway/trpg-media/tuning';
|
|
24
|
+
interface Constructors {
|
|
25
|
+
Container: typeof Container;
|
|
26
|
+
Graphics: typeof Graphics;
|
|
27
|
+
Sprite?: new (texture?: Texture | import('pixi.js').SpriteOptions) => Sprite;
|
|
28
|
+
Text: new (options: import('pixi.js').TextOptions) => Text;
|
|
29
|
+
}
|
|
30
|
+
interface LayoutRect {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
}
|
|
36
|
+
export interface SummaryBoardPorts {
|
|
37
|
+
scope: string;
|
|
38
|
+
logger: RuntimeLogger;
|
|
39
|
+
boardSize: {
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
};
|
|
43
|
+
rankCapacity: number;
|
|
44
|
+
participantCapacity: number;
|
|
45
|
+
participantColumns: number;
|
|
46
|
+
layout: {
|
|
47
|
+
board: LayoutRect;
|
|
48
|
+
primaryValue: LayoutRect;
|
|
49
|
+
secondaryValue: LayoutRect;
|
|
50
|
+
rankingArea: LayoutRect;
|
|
51
|
+
participantArea: LayoutRect;
|
|
52
|
+
rankingAvatarSize: number;
|
|
53
|
+
participantAvatarSize: number;
|
|
54
|
+
rankingRowGap: number;
|
|
55
|
+
participantRowGap: number;
|
|
56
|
+
statFontSize: number;
|
|
57
|
+
rankingNameFontSize: number;
|
|
58
|
+
rankingValueFontSize: number;
|
|
59
|
+
participantNameFontSize: number;
|
|
60
|
+
};
|
|
61
|
+
typography: {
|
|
62
|
+
damage: TextStyleOptions;
|
|
63
|
+
data: TextStyleOptions;
|
|
64
|
+
caption: TextStyleOptions;
|
|
65
|
+
sectionTitle: TextStyleOptions;
|
|
66
|
+
};
|
|
67
|
+
colors: {
|
|
68
|
+
panel: string;
|
|
69
|
+
border: string;
|
|
70
|
+
mask: string;
|
|
71
|
+
primaryValue: string;
|
|
72
|
+
secondaryValue: string;
|
|
73
|
+
primaryText: string;
|
|
74
|
+
secondaryText: string;
|
|
75
|
+
rankColors: readonly string[];
|
|
76
|
+
avatarFallback: string;
|
|
77
|
+
avatarBorder: string;
|
|
78
|
+
avatarGlyph: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export declare class PixiSummaryBoardSurface {
|
|
82
|
+
private readonly constructors;
|
|
83
|
+
private readonly ports;
|
|
84
|
+
private readonly assets?;
|
|
85
|
+
private readonly requestRender?;
|
|
86
|
+
readonly node: Container;
|
|
87
|
+
private readonly boardRoot;
|
|
88
|
+
private readonly primaryValue;
|
|
89
|
+
private readonly secondaryValue;
|
|
90
|
+
private readonly rankingRows;
|
|
91
|
+
private readonly participantRows;
|
|
92
|
+
private avatarScope;
|
|
93
|
+
private tuning;
|
|
94
|
+
constructor(scene: PixiSceneGraph, constructors: Constructors, ports: SummaryBoardPorts, assets?: PixiAssetManager | undefined, boardTexture?: Texture | null, tuning?: SessionTuningResolver, requestRender?: (() => void) | undefined);
|
|
95
|
+
sync(summary: SummaryBoardData): void;
|
|
96
|
+
updateTuning(tuning: SessionTuningResolver): void;
|
|
97
|
+
setVisible(visible: boolean): void;
|
|
98
|
+
destroy(): void;
|
|
99
|
+
private createRow;
|
|
100
|
+
private syncLayout;
|
|
101
|
+
private syncRankingLayout;
|
|
102
|
+
private syncParticipantLayout;
|
|
103
|
+
private syncRankingRow;
|
|
104
|
+
private syncParticipantRow;
|
|
105
|
+
private syncAvatar;
|
|
106
|
+
private resizeAvatar;
|
|
107
|
+
private drawAvatarPlaceholder;
|
|
108
|
+
private clearAvatar;
|
|
109
|
+
private resolveRankingAvatarSize;
|
|
110
|
+
private resolveParticipantAvatarSize;
|
|
111
|
+
}
|
|
112
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Container, Graphics, Sprite, Texture, Ticker } from 'pixi.js';
|
|
2
|
+
export type HudConnectionState = 'live' | 'offline' | 'connecting' | 'degraded';
|
|
3
|
+
type SessionDisplayScene = string;
|
|
4
|
+
import type { DisplayAudioState } from '@bardway/trpg-media';
|
|
5
|
+
import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
|
|
6
|
+
import type { PixiSceneGraph } from './PixiSceneGraph.js';
|
|
7
|
+
export interface SystemHudPorts {
|
|
8
|
+
layout: {
|
|
9
|
+
iconSize: number;
|
|
10
|
+
gap: number;
|
|
11
|
+
padding: number;
|
|
12
|
+
};
|
|
13
|
+
rectForScene(scene: string): {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
colors: {
|
|
20
|
+
panel: string;
|
|
21
|
+
border: string;
|
|
22
|
+
text: string;
|
|
23
|
+
live: string;
|
|
24
|
+
offline: string;
|
|
25
|
+
connecting: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface SystemHudTextures {
|
|
29
|
+
networkBars?: Texture | null;
|
|
30
|
+
speaker?: Texture | null;
|
|
31
|
+
speakerOff?: Texture | null;
|
|
32
|
+
}
|
|
33
|
+
interface PixiSystemHudConstructors {
|
|
34
|
+
Container: typeof Container;
|
|
35
|
+
Graphics: typeof Graphics;
|
|
36
|
+
Sprite: new (texture?: Texture | import('pixi.js').SpriteOptions) => Sprite;
|
|
37
|
+
}
|
|
38
|
+
export interface PixiSystemHudState {
|
|
39
|
+
scene: SessionDisplayScene;
|
|
40
|
+
connectionState: HudConnectionState;
|
|
41
|
+
audioState: DisplayAudioState;
|
|
42
|
+
onEnableAudio: () => void;
|
|
43
|
+
}
|
|
44
|
+
export declare class PixiSystemHudSurface {
|
|
45
|
+
private readonly ticker;
|
|
46
|
+
private readonly activity;
|
|
47
|
+
private readonly requestRender;
|
|
48
|
+
private readonly ports;
|
|
49
|
+
private readonly node;
|
|
50
|
+
private readonly groupFrame;
|
|
51
|
+
private readonly connectionSlot;
|
|
52
|
+
private readonly audioSlot;
|
|
53
|
+
private readonly connectionIcon;
|
|
54
|
+
private readonly speakerIcon;
|
|
55
|
+
private readonly speakerOffIcon;
|
|
56
|
+
private onEnableAudio;
|
|
57
|
+
private stopPulse;
|
|
58
|
+
private pulseDirection;
|
|
59
|
+
constructor(scene: PixiSceneGraph, constructors: PixiSystemHudConstructors, ticker: Ticker, activity: PixiAnimationActivity, requestRender: () => void, ports: SystemHudPorts, textures: SystemHudTextures);
|
|
60
|
+
sync(state: PixiSystemHudState): void;
|
|
61
|
+
activateAudio(): void;
|
|
62
|
+
updateTuning(): void;
|
|
63
|
+
reset(): void;
|
|
64
|
+
destroy(): void;
|
|
65
|
+
private createSprite;
|
|
66
|
+
private syncLayout;
|
|
67
|
+
private createConnectionFallback;
|
|
68
|
+
private createSpeakerFallback;
|
|
69
|
+
private drawConnection;
|
|
70
|
+
private drawAudio;
|
|
71
|
+
private syncPulse;
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PixiLayoutRect } from './PixiSessionLayout.js';
|
|
2
|
+
export interface TeamCheckLampLayout {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
size: number;
|
|
6
|
+
}
|
|
7
|
+
export interface TeamCheckLampRowOptions {
|
|
8
|
+
centerX: number;
|
|
9
|
+
width: number;
|
|
10
|
+
y: number;
|
|
11
|
+
minSize: number;
|
|
12
|
+
maxSize: number;
|
|
13
|
+
maxGap: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class PixiTeamCheckCinematic {
|
|
16
|
+
static readonly panel: {
|
|
17
|
+
readonly x: number;
|
|
18
|
+
readonly y: number;
|
|
19
|
+
readonly width: 960;
|
|
20
|
+
readonly height: number;
|
|
21
|
+
readonly radius: 5;
|
|
22
|
+
};
|
|
23
|
+
static readonly enterMs = 460;
|
|
24
|
+
static readonly lampMs = 280;
|
|
25
|
+
static readonly successInMs = 140;
|
|
26
|
+
static readonly successOutMs = 380;
|
|
27
|
+
static readonly failureStepMs = 60;
|
|
28
|
+
static readonly failureOutMs = 260;
|
|
29
|
+
static resolveFrameRect(source: {
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
}, panel?: PixiLayoutRect): PixiLayoutRect;
|
|
33
|
+
static resolveLampLayout(totalLights: number, options?: TeamCheckLampRowOptions): TeamCheckLampLayout[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Container, Text, type Renderer } from 'pixi.js';
|
|
2
|
+
import type { PixiAnimationActivity } from './PixiAnimationActivity.js';
|
|
3
|
+
import type { PixiAnimationDirector } from './PixiAnimationDirector.js';
|
|
4
|
+
/** Host-owned visual limits and timing. No content or identity policy is embedded. */
|
|
5
|
+
export interface PixiTextTransitionSettings {
|
|
6
|
+
readonly durationMs: number;
|
|
7
|
+
readonly holdMs: number;
|
|
8
|
+
readonly incomingStartMs: number;
|
|
9
|
+
readonly incomingDurationMs: number;
|
|
10
|
+
readonly reducedMotionMs: number;
|
|
11
|
+
readonly maxTextureWidth: number;
|
|
12
|
+
readonly maxTextureHeight: number;
|
|
13
|
+
readonly maxParticles: number;
|
|
14
|
+
readonly grainSize: number;
|
|
15
|
+
readonly driftX: number;
|
|
16
|
+
readonly driftY: number;
|
|
17
|
+
readonly dustColor: string;
|
|
18
|
+
readonly edgeSoftness: number;
|
|
19
|
+
}
|
|
20
|
+
export interface PixiTextTransitionTarget {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly text: Text;
|
|
23
|
+
readonly overlay: Container;
|
|
24
|
+
readonly isCurrent: () => boolean;
|
|
25
|
+
readonly reserveWidth?: (fromText: string, toText: string) => () => void;
|
|
26
|
+
}
|
|
27
|
+
export interface PreparedPixiTextTransition {
|
|
28
|
+
play(signal: AbortSignal, onStarted?: () => void): Promise<void>;
|
|
29
|
+
cancel(): void;
|
|
30
|
+
}
|
|
31
|
+
export interface PixiTextTransitionEffectOptions {
|
|
32
|
+
readonly settings: PixiTextTransitionSettings;
|
|
33
|
+
readonly renderer: Pick<Renderer, 'generateTexture'>;
|
|
34
|
+
readonly director: PixiAnimationDirector;
|
|
35
|
+
readonly requestRender: () => void;
|
|
36
|
+
readonly activity?: PixiAnimationActivity;
|
|
37
|
+
}
|
|
38
|
+
export declare const TEXT_TRANSITION_FRAGMENT = "\nprecision highp float;\nin vec2 vTextureCoord;\nout vec4 finalColor;\nuniform sampler2D uTexture;\nuniform vec4 uInputSize;\nuniform float uProgress;\nuniform float uSeed;\nuniform float uGrain;\nuniform float uSoftness;\nfloat noise(vec2 cell) {\n return fract(sin(dot(cell, vec2(127.1, 311.7)) + uSeed) * 43758.5453);\n}\nvoid main() {\n vec4 source = texture(uTexture, vTextureCoord);\n vec2 cell = floor(vTextureCoord * uInputSize.xy / uGrain);\n float threshold = 0.08 + noise(cell) * 0.84;\n float keep = 1.0 - smoothstep(threshold - uSoftness, threshold + uSoftness, uProgress);\n finalColor = source * keep;\n}";
|
|
39
|
+
/** Shared clock, two small glyph snapshots, bounded glyph-derived sand; no GPU readback or RAF. */
|
|
40
|
+
export declare class PixiTextTransitionEffect {
|
|
41
|
+
private readonly options;
|
|
42
|
+
private readonly runs;
|
|
43
|
+
private reducedMotion;
|
|
44
|
+
private destroyed;
|
|
45
|
+
private readonly settings;
|
|
46
|
+
constructor(options: PixiTextTransitionEffectOptions);
|
|
47
|
+
setReducedMotion(reducedMotion: boolean): void;
|
|
48
|
+
prepare(targets: readonly PixiTextTransitionTarget[], fromText: string, toText: string, seed: string): PreparedPixiTextTransition | null;
|
|
49
|
+
reset(): void;
|
|
50
|
+
destroy(): void;
|
|
51
|
+
private createSurface;
|
|
52
|
+
private updateSurface;
|
|
53
|
+
private releaseSurface;
|
|
54
|
+
}
|