@oasiz/sdk 1.6.0 → 1.6.2
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/README.md +540 -82
- package/dist/index.cjs +3076 -215
- package/dist/index.d.cts +304 -110
- package/dist/index.d.ts +304 -110
- package/dist/index.js +3064 -204
- package/package.json +14 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,143 @@
|
|
|
1
|
+
type GraphicsPerformanceTier = "minimal" | "low" | "medium" | "high";
|
|
2
|
+
interface GraphicsPerformanceMetric {
|
|
3
|
+
/** Recommended graphics/rendering frame-rate target for the current device. */
|
|
4
|
+
fps: number;
|
|
5
|
+
/** Suggested graphics/rendering tier for the current device. */
|
|
6
|
+
tier: GraphicsPerformanceTier;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Return the current device's recommended graphics performance profile.
|
|
10
|
+
*
|
|
11
|
+
* Hosts can provide an FPS/tier recommendation through
|
|
12
|
+
* `window.getGraphicsPerformance()` or `window.__OASIZ_GRAPHICS_PERFORMANCE__`.
|
|
13
|
+
* When no host value exists, the SDK estimates from browser/device/WebGL
|
|
14
|
+
* capability signals so games still get a usable recommendation in local
|
|
15
|
+
* development and unsupported hosts.
|
|
16
|
+
*/
|
|
17
|
+
declare function getGraphicsPerformance(): GraphicsPerformanceMetric;
|
|
18
|
+
|
|
19
|
+
type ViewportInsetSide = "top" | "right" | "bottom" | "left";
|
|
20
|
+
interface ViewportInsetEdges {
|
|
21
|
+
top: number;
|
|
22
|
+
right: number;
|
|
23
|
+
bottom: number;
|
|
24
|
+
left: number;
|
|
25
|
+
}
|
|
26
|
+
interface ViewportInsets {
|
|
27
|
+
pixels: ViewportInsetEdges;
|
|
28
|
+
percent: ViewportInsetEdges;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Effective viewport insets that game UI should avoid.
|
|
32
|
+
*
|
|
33
|
+
* `top` preserves the existing Oasiz game-safe top behavior: host chrome and
|
|
34
|
+
* invite/leaderboard clearance can contribute to it. Other sides are device
|
|
35
|
+
* safe-area insets today, and can include future host UI obstructions.
|
|
36
|
+
*/
|
|
37
|
+
declare function getViewportInsets(): ViewportInsets;
|
|
38
|
+
/**
|
|
39
|
+
* Legacy alias for the top entry of `getViewportInsets().percent`.
|
|
40
|
+
*/
|
|
41
|
+
declare function getSafeAreaTop(): number;
|
|
42
|
+
declare function setLeaderboardVisible(visible: boolean): void;
|
|
43
|
+
|
|
44
|
+
type Unsubscribe = () => void;
|
|
45
|
+
declare function onPause(callback: () => void): Unsubscribe;
|
|
46
|
+
declare function onResume(callback: () => void): Unsubscribe;
|
|
47
|
+
|
|
48
|
+
interface BackButtonTestingOptions {
|
|
49
|
+
/**
|
|
50
|
+
* When true, pressing Escape dispatches the same event the host app sends for
|
|
51
|
+
* back actions. Defaults to true.
|
|
52
|
+
*/
|
|
53
|
+
keyboard?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* When true, the SDK traps one browser-history entry while back override is
|
|
56
|
+
* active, so the browser Back button can be used for local testing. Defaults
|
|
57
|
+
* to true.
|
|
58
|
+
*/
|
|
59
|
+
browserHistory?: boolean;
|
|
60
|
+
/** Log setup details to the console. Defaults to false. */
|
|
61
|
+
log?: boolean;
|
|
62
|
+
}
|
|
63
|
+
interface BackButtonTestingHandle {
|
|
64
|
+
destroy: () => void;
|
|
65
|
+
isBackOverrideActive: () => boolean;
|
|
66
|
+
triggerBack: () => void;
|
|
67
|
+
triggerLeave: () => void;
|
|
68
|
+
}
|
|
69
|
+
declare function enableBackButtonTesting(options?: BackButtonTestingOptions): BackButtonTestingHandle;
|
|
70
|
+
declare function onBackButton(callback: () => void): Unsubscribe;
|
|
71
|
+
declare function onLeaveGame(callback: () => void): Unsubscribe;
|
|
72
|
+
declare function leaveGame(): void;
|
|
73
|
+
|
|
74
|
+
type AppSimulatorDeviceName = "iphone-11" | "iphone-11-pro" | "iphone-11-pro-max" | "iphone-12-mini" | "iphone-12" | "iphone-12-pro" | "iphone-12-pro-max" | "iphone-13-mini" | "iphone-13" | "iphone-13-pro" | "iphone-13-pro-max" | "iphone-14" | "iphone-14-plus" | "iphone-14-pro" | "iphone-14-pro-max" | "iphone-15" | "iphone-15-plus" | "iphone-15-pro" | "iphone-15-pro-max" | "iphone-16" | "iphone-16-plus" | "iphone-16-pro" | "iphone-16-pro-max" | "iphone-16e" | "iphone-17" | "iphone-17-pro" | "iphone-17-pro-max" | "iphone-17e" | "iphone-air" | "iphone-se" | "pixel-8";
|
|
75
|
+
type AppSimulatorOrientation = "portrait" | "landscape";
|
|
76
|
+
interface AppSimulatorDevice {
|
|
77
|
+
height: number;
|
|
78
|
+
name?: string;
|
|
79
|
+
safeArea?: Partial<ViewportInsetEdges>;
|
|
80
|
+
width: number;
|
|
81
|
+
}
|
|
82
|
+
interface AppSimulatorOptions {
|
|
83
|
+
browserHistoryBack?: BackButtonTestingOptions["browserHistory"];
|
|
84
|
+
comments?: number;
|
|
85
|
+
device?: AppSimulatorDeviceName | AppSimulatorDevice;
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* When true, the SDK tries to place the current game DOM inside a centered
|
|
89
|
+
* phone viewport on desktop. Use false if your game already runs in browser
|
|
90
|
+
* device emulation or owns its own preview frame. Defaults to true.
|
|
91
|
+
*/
|
|
92
|
+
frame?: boolean | "auto";
|
|
93
|
+
keyboardBack?: BackButtonTestingOptions["keyboard"];
|
|
94
|
+
leaderboardVisible?: boolean;
|
|
95
|
+
likes?: number;
|
|
96
|
+
log?: boolean;
|
|
97
|
+
orientation?: AppSimulatorOrientation;
|
|
98
|
+
score?: number;
|
|
99
|
+
title?: string;
|
|
100
|
+
}
|
|
101
|
+
interface AppSimulatorHandle {
|
|
102
|
+
closeSheet: () => void;
|
|
103
|
+
destroy: () => void;
|
|
104
|
+
getViewportInsets: () => ViewportInsets;
|
|
105
|
+
hide: () => void;
|
|
106
|
+
isVisible: () => boolean;
|
|
107
|
+
openComments: () => void;
|
|
108
|
+
openLeaderboard: () => void;
|
|
109
|
+
setCounts: (counts: {
|
|
110
|
+
comments?: number;
|
|
111
|
+
likes?: number;
|
|
112
|
+
}) => void;
|
|
113
|
+
setLeaderboardVisible: (visible: boolean) => void;
|
|
114
|
+
setLiked: (liked: boolean) => void;
|
|
115
|
+
show: () => void;
|
|
116
|
+
triggerBack: () => void;
|
|
117
|
+
triggerLeave: () => void;
|
|
118
|
+
}
|
|
119
|
+
declare function enableAppSimulator(options?: AppSimulatorOptions): AppSimulatorHandle;
|
|
120
|
+
|
|
1
121
|
type HapticType = "light" | "medium" | "heavy" | "success" | "error";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
122
|
+
type LogOverlayLevel = "debug" | "log" | "info" | "warn" | "error";
|
|
123
|
+
interface LogOverlayEntry {
|
|
124
|
+
id: number;
|
|
125
|
+
level: LogOverlayLevel;
|
|
126
|
+
message: string;
|
|
127
|
+
timestamp: number;
|
|
5
128
|
}
|
|
6
|
-
interface
|
|
7
|
-
|
|
129
|
+
interface LogOverlayOptions {
|
|
130
|
+
collapsed?: boolean;
|
|
131
|
+
enabled?: boolean;
|
|
132
|
+
maxEntries?: number;
|
|
133
|
+
title?: string;
|
|
134
|
+
}
|
|
135
|
+
interface LogOverlayHandle {
|
|
136
|
+
clear: () => void;
|
|
137
|
+
destroy: () => void;
|
|
138
|
+
hide: () => void;
|
|
139
|
+
isVisible: () => boolean;
|
|
140
|
+
show: () => void;
|
|
8
141
|
}
|
|
9
142
|
type GameState = Record<string, unknown>;
|
|
10
143
|
interface ShareRequest {
|
|
@@ -12,88 +145,166 @@ interface ShareRequest {
|
|
|
12
145
|
score?: number;
|
|
13
146
|
text?: string;
|
|
14
147
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
interface StorePurchaseFailure {
|
|
63
|
-
attemptId: string;
|
|
64
|
-
code: "ALREADY_OWNED" | "INSUFFICIENT_JEMS" | "INVALID_PRODUCT" | "PRODUCT_DISABLED" | "INVALID_QUANTITY" | "ENTITLEMENT_EXHAUSTED" | "STALE_CATALOG_VERSION" | "UNAUTHORIZED";
|
|
65
|
-
jemBalance: number;
|
|
66
|
-
message: string;
|
|
67
|
-
ok: false;
|
|
68
|
-
state?: StoreStateSnapshot;
|
|
69
|
-
topUpIntentId?: string;
|
|
70
|
-
topUpRedirectUrl?: string;
|
|
71
|
-
}
|
|
72
|
-
type StorePurchaseResult = StorePurchaseSuccess | StorePurchaseFailure;
|
|
73
|
-
interface StoreConsumeSuccess {
|
|
74
|
-
entitlement: StoreEntitlement;
|
|
75
|
-
ok: true;
|
|
76
|
-
state: StoreStateSnapshot;
|
|
77
|
-
}
|
|
78
|
-
interface StoreConsumeFailure {
|
|
79
|
-
code: "INVALID_PRODUCT" | "INVALID_QUANTITY" | "NOT_CONSUMABLE" | "ENTITLEMENT_EXHAUSTED";
|
|
80
|
-
jemBalance: number;
|
|
81
|
-
message: string;
|
|
82
|
-
ok: false;
|
|
83
|
-
state?: StoreStateSnapshot;
|
|
148
|
+
/**
|
|
149
|
+
* One frame in a texture atlas. Coordinates are in pixels, top-left origin
|
|
150
|
+
* (matches HTML canvas / WebGL texture coordinates after Y-flip).
|
|
151
|
+
*/
|
|
152
|
+
interface TextureAtlasFrame {
|
|
153
|
+
name: string;
|
|
154
|
+
x: number;
|
|
155
|
+
y: number;
|
|
156
|
+
width: number;
|
|
157
|
+
height: number;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Per-direction frame indexes inside an animation. `left` is either an
|
|
161
|
+
* integer index or the literal string `"mirror"`, indicating the renderer
|
|
162
|
+
* should mirror the right-facing frame instead of using a dedicated one.
|
|
163
|
+
*/
|
|
164
|
+
interface FacingFrameMap {
|
|
165
|
+
front: number;
|
|
166
|
+
back: number;
|
|
167
|
+
right: number;
|
|
168
|
+
left: number | "mirror";
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* One named animation in a texture atlas. `frames` is the playback-ordered
|
|
172
|
+
* list of frame names; resolve each name against the parent atlas's
|
|
173
|
+
* `frames` array to get pixel coordinates.
|
|
174
|
+
*/
|
|
175
|
+
interface TextureAtlasAnimation {
|
|
176
|
+
animationId: string;
|
|
177
|
+
role: string | null;
|
|
178
|
+
group: string | null;
|
|
179
|
+
direction: string | null;
|
|
180
|
+
frameRate: number;
|
|
181
|
+
frames: string[];
|
|
182
|
+
facingFrameMap: FacingFrameMap | null;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* TexturePacker / Phaser-style texture atlas describing a baked sprite
|
|
186
|
+
* image. Drop-in compatible with Phaser via `addAtlas(key, img, atlas)`
|
|
187
|
+
* after a tiny shape transform; usable directly in custom GL renderers.
|
|
188
|
+
*/
|
|
189
|
+
interface TextureAtlas {
|
|
190
|
+
imageUrl: string;
|
|
191
|
+
imageWidth: number;
|
|
192
|
+
imageHeight: number;
|
|
193
|
+
frames: TextureAtlasFrame[];
|
|
194
|
+
animations: TextureAtlasAnimation[];
|
|
84
195
|
}
|
|
85
|
-
|
|
196
|
+
/**
|
|
197
|
+
* The authenticated player's character, returned by `getPlayerCharacter()`.
|
|
198
|
+
* `editorTextureAtlas` is the higher-detail variant intended for character
|
|
199
|
+
* previews / customizer UI and may be `null`.
|
|
200
|
+
*/
|
|
201
|
+
interface PlayerCharacter {
|
|
202
|
+
characterName: string | null;
|
|
203
|
+
baseCharacterId: string;
|
|
204
|
+
compositionCode: string;
|
|
205
|
+
textureAtlas: TextureAtlas;
|
|
206
|
+
editorTextureAtlas: TextureAtlas | null;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Result of `addScore(delta)` / `setScore(score)`. Returns `null` when the
|
|
210
|
+
* host bridge is unavailable (e.g. local development) or when the backend
|
|
211
|
+
* refused the request; production code should treat `null` as "no change
|
|
212
|
+
* was persisted, do not update local UI".
|
|
213
|
+
*/
|
|
214
|
+
interface ScoreEditResult {
|
|
215
|
+
playerId: string;
|
|
216
|
+
previousScore: number;
|
|
217
|
+
newScore: number;
|
|
218
|
+
previousWeeklyScore: number;
|
|
219
|
+
newWeeklyScore: number;
|
|
220
|
+
normalizedScore: number | null;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Fetch the authenticated player's character, including a TexturePacker /
|
|
225
|
+
* Phaser-style texture atlas describing the baked sprite image.
|
|
226
|
+
*
|
|
227
|
+
* Returns:
|
|
228
|
+
* - `null` when the user has no character composition yet, OR
|
|
229
|
+
* - `null` when the host bridge is unavailable (local dev / unauthenticated)
|
|
230
|
+
*
|
|
231
|
+
* The host transparently caches and proxies to `GET /api/sdk/me/character`,
|
|
232
|
+
* so calling this multiple times in a session is cheap. The returned
|
|
233
|
+
* `imageUrl` is content-addressed (R2 key derives from the composition
|
|
234
|
+
* hash), so games can safely cache the downloaded texture by `compositionCode`.
|
|
235
|
+
*
|
|
236
|
+
* Example (Phaser):
|
|
237
|
+
*
|
|
238
|
+
* const character = await oasiz.getPlayerCharacter();
|
|
239
|
+
* if (!character) return;
|
|
240
|
+
* const atlas = character.textureAtlas;
|
|
241
|
+
* scene.load.image("player-tex", atlas.imageUrl);
|
|
242
|
+
* scene.load.atlas("player", atlas.imageUrl, {
|
|
243
|
+
* frames: Object.fromEntries(
|
|
244
|
+
* atlas.frames.map((f) => [f.name, { frame: { x: f.x, y: f.y, w: f.width, h: f.height } }]),
|
|
245
|
+
* ),
|
|
246
|
+
* });
|
|
247
|
+
*/
|
|
248
|
+
declare function getPlayerCharacter(): Promise<PlayerCharacter | null>;
|
|
86
249
|
|
|
87
250
|
declare function triggerHaptic(type: HapticType): void;
|
|
88
251
|
|
|
89
|
-
declare function
|
|
252
|
+
declare function enableLogOverlay(options?: LogOverlayOptions): LogOverlayHandle;
|
|
253
|
+
|
|
254
|
+
interface ShareRoomCodeOptions {
|
|
255
|
+
inviteOverride?: boolean;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Notify the platform of the active multiplayer room so friends can join.
|
|
259
|
+
* Pass `{ inviteOverride: true }` when the game wants to hide the platform
|
|
260
|
+
* invite pill and own the invite UI itself.
|
|
261
|
+
*/
|
|
262
|
+
declare function shareRoomCode(roomCode: string | null, options?: ShareRoomCodeOptions): void;
|
|
263
|
+
/**
|
|
264
|
+
* Ask the platform to open the invite-friends modal for the current game room.
|
|
265
|
+
* Only has effect when the platform has a room code (game has called shareRoomCode).
|
|
266
|
+
* No-op when the bridge is unavailable (e.g. local development).
|
|
267
|
+
*/
|
|
268
|
+
declare function openInviteModal(): void;
|
|
90
269
|
declare function getGameId(): string | undefined;
|
|
91
270
|
declare function getRoomCode(): string | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Stable, unique, opaque identifier for the authenticated player, injected
|
|
273
|
+
* by the platform. Safe to use as a primary key for save slots, matchmaking,
|
|
274
|
+
* per-player analytics, or anywhere you need a reliable per-user key —
|
|
275
|
+
* unlike `getPlayerName()` (mutable, not unique).
|
|
276
|
+
*
|
|
277
|
+
* Mirrors the backend's `playerId` field returned by `GET /api/sdk/me`
|
|
278
|
+
* (= the Better Auth `user.id`). Returns `undefined` when the platform
|
|
279
|
+
* has not injected an identity (e.g. unauthenticated preview).
|
|
280
|
+
*/
|
|
281
|
+
declare function getPlayerId(): string | undefined;
|
|
92
282
|
declare function getPlayerName(): string | undefined;
|
|
93
283
|
declare function getPlayerAvatar(): string | undefined;
|
|
94
284
|
|
|
95
285
|
declare function submitScore(score: number): void;
|
|
96
|
-
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Add (or subtract) `delta` from the player's current score for this game.
|
|
289
|
+
* The new score is clamped to >= 0 server-side.
|
|
290
|
+
*
|
|
291
|
+
* Unlike `submitScore()` (which is high-water and only ever raises the
|
|
292
|
+
* score), this endpoint always overwrites the row. Use it for game models
|
|
293
|
+
* where the leaderboard tracks an accumulator, balance, or persistent state
|
|
294
|
+
* instead of a single best-run value.
|
|
295
|
+
*
|
|
296
|
+
* Returns the resulting score values, or `null` when the bridge is
|
|
297
|
+
* unavailable. The integer must be a non-zero integer (positive or negative).
|
|
298
|
+
*/
|
|
299
|
+
declare function addScore(delta: number): Promise<ScoreEditResult | null>;
|
|
300
|
+
/**
|
|
301
|
+
* Force the player's score to an absolute value (clamped to >= 0).
|
|
302
|
+
*
|
|
303
|
+
* Same overwrite semantics as `addScore`. Use when the game has computed
|
|
304
|
+
* the authoritative score locally (e.g. after offline play) and wants to
|
|
305
|
+
* sync it back to the leaderboard.
|
|
306
|
+
*/
|
|
307
|
+
declare function setScore(score: number): Promise<ScoreEditResult | null>;
|
|
97
308
|
|
|
98
309
|
declare function share(options: ShareRequest): Promise<void>;
|
|
99
310
|
|
|
@@ -101,55 +312,38 @@ declare function loadGameState(): GameState;
|
|
|
101
312
|
declare function saveGameState(state: GameState): void;
|
|
102
313
|
declare function flushGameState(): void;
|
|
103
314
|
|
|
104
|
-
type Unsubscribe = () => void;
|
|
105
|
-
declare function onPause(callback: () => void): Unsubscribe;
|
|
106
|
-
declare function onResume(callback: () => void): Unsubscribe;
|
|
107
|
-
|
|
108
|
-
declare function onBackButton(callback: () => void): Unsubscribe;
|
|
109
|
-
declare function onLeaveGame(callback: () => void): Unsubscribe;
|
|
110
|
-
declare function leaveGame(): void;
|
|
111
|
-
|
|
112
|
-
declare function syncProducts(products: StoreManifestProduct[], expectedVersion?: number | null): Promise<StoreStateSnapshot>;
|
|
113
|
-
declare function getProducts(): Promise<StoreProduct[]>;
|
|
114
|
-
declare function getEntitlements(): Promise<StoreEntitlement[]>;
|
|
115
|
-
declare function hasEntitlement(productId: string): Promise<boolean>;
|
|
116
|
-
declare function getQuantity(productId: string): Promise<number>;
|
|
117
|
-
declare function purchase(productId: string, quantity?: number): Promise<StorePurchaseResult>;
|
|
118
|
-
declare function consume(productId: string, quantity?: number): Promise<StoreConsumeResult>;
|
|
119
|
-
declare function getJemBalance(): Promise<number>;
|
|
120
|
-
declare function onEntitlementsChanged(callback: (entitlements: StoreEntitlement[]) => void): () => void;
|
|
121
|
-
declare function onJemBalanceChanged(callback: (jemBalance: number) => void): () => void;
|
|
122
|
-
|
|
123
315
|
declare const oasiz: {
|
|
124
316
|
submitScore: typeof submitScore;
|
|
125
|
-
|
|
317
|
+
enableAppSimulator: typeof enableAppSimulator;
|
|
318
|
+
addScore: typeof addScore;
|
|
319
|
+
setScore: typeof setScore;
|
|
320
|
+
getPlayerCharacter: typeof getPlayerCharacter;
|
|
126
321
|
share: typeof share;
|
|
127
322
|
triggerHaptic: typeof triggerHaptic;
|
|
323
|
+
enableLogOverlay: typeof enableLogOverlay;
|
|
128
324
|
loadGameState: typeof loadGameState;
|
|
129
325
|
saveGameState: typeof saveGameState;
|
|
130
326
|
flushGameState: typeof flushGameState;
|
|
131
327
|
shareRoomCode: typeof shareRoomCode;
|
|
328
|
+
openInviteModal: typeof openInviteModal;
|
|
132
329
|
onPause: typeof onPause;
|
|
133
330
|
onResume: typeof onResume;
|
|
331
|
+
getSafeAreaTop: typeof getSafeAreaTop;
|
|
332
|
+
getViewportInsets: typeof getViewportInsets;
|
|
333
|
+
setLeaderboardVisible: typeof setLeaderboardVisible;
|
|
334
|
+
getGraphicsPerformance: typeof getGraphicsPerformance;
|
|
335
|
+
enableBackButtonTesting: typeof enableBackButtonTesting;
|
|
134
336
|
onBackButton: typeof onBackButton;
|
|
135
337
|
onLeaveGame: typeof onLeaveGame;
|
|
136
338
|
leaveGame: typeof leaveGame;
|
|
137
|
-
store: {
|
|
138
|
-
syncProducts: typeof syncProducts;
|
|
139
|
-
getProducts: typeof getProducts;
|
|
140
|
-
getEntitlements: typeof getEntitlements;
|
|
141
|
-
hasEntitlement: typeof hasEntitlement;
|
|
142
|
-
getQuantity: typeof getQuantity;
|
|
143
|
-
purchase: typeof purchase;
|
|
144
|
-
consume: typeof consume;
|
|
145
|
-
getJemBalance: typeof getJemBalance;
|
|
146
|
-
onEntitlementsChanged: typeof onEntitlementsChanged;
|
|
147
|
-
onJemBalanceChanged: typeof onJemBalanceChanged;
|
|
148
|
-
};
|
|
149
339
|
readonly gameId: string | undefined;
|
|
150
340
|
readonly roomCode: string | undefined;
|
|
341
|
+
readonly playerId: string | undefined;
|
|
151
342
|
readonly playerName: string | undefined;
|
|
152
343
|
readonly playerAvatar: string | undefined;
|
|
344
|
+
readonly safeAreaTop: number;
|
|
345
|
+
readonly viewportInsets: ViewportInsets;
|
|
346
|
+
readonly graphicsPerformance: GraphicsPerformanceMetric;
|
|
153
347
|
};
|
|
154
348
|
|
|
155
|
-
export { type
|
|
349
|
+
export { type AppSimulatorDevice, type AppSimulatorDeviceName, type AppSimulatorHandle, type AppSimulatorOptions, type AppSimulatorOrientation, type BackButtonTestingHandle, type BackButtonTestingOptions, type FacingFrameMap, type GameState, type GraphicsPerformanceMetric, type GraphicsPerformanceTier, type HapticType, type LogOverlayEntry, type LogOverlayHandle, type LogOverlayLevel, type LogOverlayOptions, type PlayerCharacter, type ScoreEditResult, type ShareRequest, type ShareRoomCodeOptions, type TextureAtlas, type TextureAtlasAnimation, type TextureAtlasFrame, type Unsubscribe, type ViewportInsetEdges, type ViewportInsetSide, type ViewportInsets, addScore, enableAppSimulator, enableBackButtonTesting, enableLogOverlay, flushGameState, getGameId, getGraphicsPerformance, getPlayerAvatar, getPlayerCharacter, getPlayerId, getPlayerName, getRoomCode, getSafeAreaTop, getViewportInsets, leaveGame, loadGameState, oasiz, onBackButton, onLeaveGame, onPause, onResume, openInviteModal, saveGameState, setLeaderboardVisible, setScore, share, shareRoomCode, submitScore, triggerHaptic };
|