point-click-components 0.2.2 → 0.2.4

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.
@@ -46,7 +46,7 @@ export declare type ActorPreviewProps = {
46
46
  sprites: SpriteData[];
47
47
  };
48
48
 
49
- declare type ActorWithOrdersAndClickHandlers = {
49
+ export declare type ActorWithOrdersAndClickHandlers = {
50
50
  data: ActorData;
51
51
  orders?: Order[];
52
52
  clickHandler?: HandleClickFunction<ActorData>;
@@ -76,7 +76,7 @@ export declare const ConversationChoices: () => JSX.Element | null;
76
76
 
77
77
  export declare const DefaultLayout: () => JSX.Element;
78
78
 
79
- declare type FileAsset = {
79
+ export declare type FileAsset = {
80
80
  id: string;
81
81
  href: string;
82
82
  originalFileName?: string;
@@ -127,22 +127,23 @@ getImageAsset: GetImageAsset;
127
127
  getSoundAsset: GetSoundAsset;
128
128
  SoundHandler?: SoundPlayerComponent;
129
129
  allowLocalSaves?: boolean;
130
+ SpeechBubbleComponent?: FunctionComponent<SpeechBubbleProps>;
130
131
  }>;
131
132
 
132
133
  export declare const GameMetaControls: () => JSX.Element;
133
134
 
134
135
  export declare const GameRoom: FunctionComponent<Props_2>;
135
136
 
136
- export declare const GameRunner: ({ gameDesign, Layout, getImageAsset, getSoundAsset, SoundHandler, initialRoomSize, options }: Props_3) => JSX.Element;
137
+ export declare const GameRunner: ({ gameDesign, Layout, getImageAsset, getSoundAsset, SoundHandler, initialRoomSize, options, SpeechBubbleComponent, }: Props_3) => JSX.Element;
137
138
 
138
- declare type GameRunnerOptions = Partial<GameRuntimeOptions> & {
139
+ export declare type GameRunnerOptions = Partial<GameRuntimeOptions> & {
139
140
  eventReporter?: InGameEventReporter;
140
141
  debugLogger?: LogToDebug;
141
142
  allowLocalSaves?: boolean;
142
143
  maxCameraMove?: number;
143
144
  };
144
145
 
145
- declare type GetImageAsset = {
146
+ export declare type GetImageAsset = {
146
147
  (id: string): ImageAsset | undefined;
147
148
  };
148
149
 
@@ -155,7 +156,7 @@ export declare function getLayerHeight(parallax: number, roomData: RoomData): nu
155
156
 
156
157
  export declare function getLayerWidth(parallax: number, roomData: RoomData): number;
157
158
 
158
- declare type GetSoundAsset = {
159
+ export declare type GetSoundAsset = {
159
160
  (id: string): SoundAsset | undefined;
160
161
  };
161
162
 
@@ -163,11 +164,11 @@ export declare function getXShift(viewAngleX: number, parallax: number, roomData
163
164
 
164
165
  export declare function getYShift(viewAngleY: number, parallax: number, roomData: RoomData): number;
165
166
 
166
- declare type HandleClickFunction<T extends CommandTarget> = {
167
+ export declare type HandleClickFunction<T extends CommandTarget> = {
167
168
  (target: T, event: PointerEvent): void;
168
169
  };
169
170
 
170
- declare type HandleHoverFunction = {
171
+ export declare type HandleHoverFunction = {
171
172
  (target: CommandTarget, event: 'enter' | 'leave'): void;
172
173
  };
173
174
 
@@ -175,7 +176,7 @@ export declare const HorizontalLine: FunctionComponent<Props_4>;
175
176
 
176
177
  export declare const Hotspot: FunctionComponent<Props_5>;
177
178
 
178
- declare type ImageAsset = FileAsset & {
179
+ export declare type ImageAsset = FileAsset & {
179
180
  category: ImageAssetCategory;
180
181
  rows?: number;
181
182
  cols?: number;
@@ -184,7 +185,7 @@ declare type ImageAsset = FileAsset & {
184
185
  img?: HTMLImageElement;
185
186
  };
186
187
 
187
- declare type ImageAssetCategory = 'background' | 'item' | 'spriteSheet' | 'any';
188
+ export declare type ImageAssetCategory = 'background' | 'item' | 'spriteSheet' | 'any';
188
189
 
189
190
  /**
190
191
  * Renders a figure with the aspect ratio scaled to be contained by its parent, with the sprite
@@ -208,6 +209,8 @@ export declare function locateClickInWorld(clickXPosition: number, clickYpositio
208
209
  y: number;
209
210
  };
210
211
 
212
+ export declare function locateRoomXOnFrame(roomX: number, viewAngleX: number, roomData: RoomData): number;
213
+
211
214
  export declare const makeReducer: (gameDesign: GameDesign, options?: GameRunnerOptions) => Reducer<GameData, GameAction>;
212
215
 
213
216
  export declare const makeUiReducer: () => Reducer<UiState, UiAction>;
@@ -251,6 +254,7 @@ declare type Props_2 = {
251
254
  declare interface Props_3 {
252
255
  gameDesign: GameDesign;
253
256
  Layout?: FunctionComponent;
257
+ SpeechBubbleComponent?: FunctionComponent<SpeechBubbleProps>;
254
258
  getImageAsset: GetImageAsset;
255
259
  getSoundAsset: GetSoundAsset;
256
260
  SoundHandler?: SoundPlayerComponent;
@@ -335,7 +339,6 @@ export declare interface RoomProps {
335
339
  orderedActors?: ActorWithOrdersAndClickHandlers[];
336
340
  noSound?: boolean;
337
341
  noMargin?: boolean;
338
- fontFamily?: string;
339
342
  parallaxContent?: ReactNode;
340
343
  surfaceContent?: ReactNode;
341
344
  orderSpeed?: number;
@@ -343,6 +346,7 @@ export declare interface RoomProps {
343
346
  getImageAsset: GetImageAsset;
344
347
  getSoundAsset: GetSoundAsset;
345
348
  SoundHandler?: SoundPlayerComponent;
349
+ SpeechBubbleComponent?: FunctionComponent<SpeechBubbleProps>;
346
350
  }
347
351
 
348
352
  export declare const RoomRenderContext: Context< {
@@ -353,19 +357,28 @@ scale: number;
353
357
  orderSpeed: number;
354
358
  }>;
355
359
 
356
- declare type SoundAsset = FileAsset & {
360
+ export declare type SoundAsset = FileAsset & {
357
361
  category: SoundAssetCategory;
358
362
  };
359
363
 
360
- declare type SoundAssetCategory = 'sfx' | 'music';
364
+ export declare type SoundAssetCategory = 'sfx' | 'music';
361
365
 
362
- declare type SoundPlayerComponent = FunctionComponent<{
366
+ export declare type SoundPlayerComponent = FunctionComponent<{
363
367
  soundValues: SoundValue[];
364
368
  isPaused: boolean;
365
369
  frameIndex?: number;
366
370
  getSoundAsset: GetSoundAsset;
367
371
  }>;
368
372
 
373
+ export declare type SpeechBubbleProps = {
374
+ actorData: ActorData;
375
+ text: string;
376
+ fromTextBoxLeftToActor: number;
377
+ fontSize: number;
378
+ atLeftEdge: boolean;
379
+ atRightEdge: boolean;
380
+ };
381
+
369
382
  export declare const StoryBoardPlayer: React.FunctionComponent<Props_8>;
370
383
 
371
384
  export declare const StoryPageDisplay: FunctionComponent<Props_9>;
@@ -516,7 +529,7 @@ export declare const VerbRadioButton: () => JSX.Element;
516
529
 
517
530
  export declare const WalkableOrObstacle: ({ zone, markVertices, zoneType, zoneOptions }: Props_7) => JSX.Element;
518
531
 
519
- declare type XY = {
532
+ export declare type XY = {
520
533
  x: number;
521
534
  y: number;
522
535
  };