@oasiz/sdk 1.8.2 → 1.8.3

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 CHANGED
@@ -134,6 +134,36 @@ Supported `device` presets:
134
134
  | `iphone-17e` | `390 × 844` |
135
135
  | `iphone-air` | `420 × 912` |
136
136
 
137
+ ### Player character animations
138
+
139
+ Use the Jibble animation constants when wiring a player character atlas so you can reference known animation IDs during local development instead of publishing first and reading logs.
140
+
141
+ ```ts
142
+ import { JIBBLE_ANIMATION, getJibbleAnimationId, oasiz } from "@oasiz/sdk";
143
+
144
+ const character = await oasiz.getPlayerCharacter();
145
+ if (!character) return;
146
+
147
+ const atlas = character.textureAtlas;
148
+ const walkBack = getJibbleAnimationId("walk", "back"); // "walk_n"
149
+ const walkBackAnimation = atlas.animations.find((anim) => anim.animationId === walkBack);
150
+ const idleFrontAnimation = atlas.animations.find(
151
+ (anim) => anim.animationId === JIBBLE_ANIMATION.Idle.South,
152
+ );
153
+ ```
154
+
155
+ Supported directional IDs use compass codes: `n`, `ne`, `e`, `se`, `s`, `sw`, `w`, `nw`. The helper accepts gameplay-facing aliases too: `front` -> `s`, `back` -> `n`, `left` -> `w`, `right` -> `e`.
156
+
157
+ Unity exposes the same IDs:
158
+
159
+ ```csharp
160
+ var walkBack = JibbleAnimations.GetId(
161
+ JibbleAnimationAction.Walk,
162
+ JibbleDirection.Back);
163
+
164
+ var idleFront = JibbleAnimations.Idle.South;
165
+ ```
166
+
137
167
  ### Score
138
168
 
139
169
  #### `oasiz.submitScore(score: number)`
package/dist/index.cjs CHANGED
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ JIBBLE_ANIMATION: () => JIBBLE_ANIMATION,
24
+ JIBBLE_ANIMATION_IDS: () => JIBBLE_ANIMATION_IDS,
25
+ JIBBLE_DIRECTIONS: () => JIBBLE_DIRECTIONS,
23
26
  addScore: () => addScore,
24
27
  enableAppSimulator: () => enableAppSimulator,
25
28
  enableBackButtonTesting: () => enableBackButtonTesting,
@@ -27,6 +30,7 @@ __export(index_exports, {
27
30
  flushGameState: () => flushGameState,
28
31
  getGameId: () => getGameId,
29
32
  getGraphicsPerformance: () => getGraphicsPerformance,
33
+ getJibbleAnimationId: () => getJibbleAnimationId,
30
34
  getPlayerAvatar: () => getPlayerAvatar,
31
35
  getPlayerCharacter: () => getPlayerCharacter,
32
36
  getPlayerId: () => getPlayerId,
@@ -36,6 +40,7 @@ __export(index_exports, {
36
40
  getViewportInsets: () => getViewportInsets,
37
41
  leaveGame: () => leaveGame,
38
42
  loadGameState: () => loadGameState,
43
+ normalizeJibbleDirection: () => normalizeJibbleDirection,
39
44
  oasiz: () => oasiz,
40
45
  onBackButton: () => onBackButton,
41
46
  onLeaveGame: () => onLeaveGame,
@@ -1498,6 +1503,83 @@ function triggerHaptic(type) {
1498
1503
  }
1499
1504
  }
1500
1505
 
1506
+ // src/jibble.ts
1507
+ var JIBBLE_DIRECTIONS = [
1508
+ "n",
1509
+ "ne",
1510
+ "e",
1511
+ "se",
1512
+ "s",
1513
+ "sw",
1514
+ "w",
1515
+ "nw"
1516
+ ];
1517
+ var JIBBLE_ANIMATION = {
1518
+ Idle: {
1519
+ North: "idle_n",
1520
+ NorthEast: "idle_ne",
1521
+ East: "idle_e",
1522
+ SouthEast: "idle_se",
1523
+ South: "idle_s",
1524
+ SouthWest: "idle_sw",
1525
+ West: "idle_w",
1526
+ NorthWest: "idle_nw"
1527
+ },
1528
+ Walk: {
1529
+ North: "walk_n",
1530
+ NorthEast: "walk_ne",
1531
+ East: "walk_e",
1532
+ SouthEast: "walk_se",
1533
+ South: "walk_s",
1534
+ SouthWest: "walk_sw",
1535
+ West: "walk_w",
1536
+ NorthWest: "walk_nw"
1537
+ },
1538
+ Backflip: "backflip"
1539
+ };
1540
+ var JIBBLE_ANIMATION_IDS = [
1541
+ JIBBLE_ANIMATION.Idle.North,
1542
+ JIBBLE_ANIMATION.Idle.NorthEast,
1543
+ JIBBLE_ANIMATION.Idle.East,
1544
+ JIBBLE_ANIMATION.Idle.SouthEast,
1545
+ JIBBLE_ANIMATION.Idle.South,
1546
+ JIBBLE_ANIMATION.Idle.SouthWest,
1547
+ JIBBLE_ANIMATION.Idle.West,
1548
+ JIBBLE_ANIMATION.Idle.NorthWest,
1549
+ JIBBLE_ANIMATION.Walk.North,
1550
+ JIBBLE_ANIMATION.Walk.NorthEast,
1551
+ JIBBLE_ANIMATION.Walk.East,
1552
+ JIBBLE_ANIMATION.Walk.SouthEast,
1553
+ JIBBLE_ANIMATION.Walk.South,
1554
+ JIBBLE_ANIMATION.Walk.SouthWest,
1555
+ JIBBLE_ANIMATION.Walk.West,
1556
+ JIBBLE_ANIMATION.Walk.NorthWest,
1557
+ JIBBLE_ANIMATION.Backflip
1558
+ ];
1559
+ var JIBBLE_DIRECTION_ALIASES = {
1560
+ n: "n",
1561
+ ne: "ne",
1562
+ e: "e",
1563
+ se: "se",
1564
+ s: "s",
1565
+ sw: "sw",
1566
+ w: "w",
1567
+ nw: "nw",
1568
+ front: "s",
1569
+ back: "n",
1570
+ left: "w",
1571
+ right: "e"
1572
+ };
1573
+ function normalizeJibbleDirection(direction) {
1574
+ return JIBBLE_DIRECTION_ALIASES[direction];
1575
+ }
1576
+ function getJibbleAnimationId(action, direction = "front") {
1577
+ if (action === "backflip") {
1578
+ return JIBBLE_ANIMATION.Backflip;
1579
+ }
1580
+ return `${action}_${normalizeJibbleDirection(direction)}`;
1581
+ }
1582
+
1501
1583
  // src/log-overlay.ts
1502
1584
  var CONSOLE_METHODS = [
1503
1585
  "debug",
@@ -3344,6 +3426,10 @@ function getGraphicsPerformance() {
3344
3426
  var oasiz = {
3345
3427
  submitScore,
3346
3428
  enableAppSimulator,
3429
+ getJibbleAnimationId,
3430
+ jibbleAnimations: JIBBLE_ANIMATION,
3431
+ jibbleAnimationIds: JIBBLE_ANIMATION_IDS,
3432
+ jibbleDirections: JIBBLE_DIRECTIONS,
3347
3433
  addScore,
3348
3434
  setScore,
3349
3435
  getPlayerCharacter,
@@ -3392,6 +3478,9 @@ var oasiz = {
3392
3478
  };
3393
3479
  // Annotate the CommonJS export names for ESM import in node:
3394
3480
  0 && (module.exports = {
3481
+ JIBBLE_ANIMATION,
3482
+ JIBBLE_ANIMATION_IDS,
3483
+ JIBBLE_DIRECTIONS,
3395
3484
  addScore,
3396
3485
  enableAppSimulator,
3397
3486
  enableBackButtonTesting,
@@ -3399,6 +3488,7 @@ var oasiz = {
3399
3488
  flushGameState,
3400
3489
  getGameId,
3401
3490
  getGraphicsPerformance,
3491
+ getJibbleAnimationId,
3402
3492
  getPlayerAvatar,
3403
3493
  getPlayerCharacter,
3404
3494
  getPlayerId,
@@ -3408,6 +3498,7 @@ var oasiz = {
3408
3498
  getViewportInsets,
3409
3499
  leaveGame,
3410
3500
  loadGameState,
3501
+ normalizeJibbleDirection,
3411
3502
  oasiz,
3412
3503
  onBackButton,
3413
3504
  onLeaveGame,
package/dist/index.d.cts CHANGED
@@ -249,6 +249,38 @@ declare function getPlayerCharacter(): Promise<PlayerCharacter | null>;
249
249
 
250
250
  declare function triggerHaptic(type: HapticType): void;
251
251
 
252
+ declare const JIBBLE_DIRECTIONS: readonly ["n", "ne", "e", "se", "s", "sw", "w", "nw"];
253
+ type JibbleDirectionCode = (typeof JIBBLE_DIRECTIONS)[number];
254
+ type JibbleFacingDirection = JibbleDirectionCode | "front" | "back" | "left" | "right";
255
+ type JibbleAnimationAction = "idle" | "walk" | "backflip";
256
+ declare const JIBBLE_ANIMATION: {
257
+ readonly Idle: {
258
+ readonly North: "idle_n";
259
+ readonly NorthEast: "idle_ne";
260
+ readonly East: "idle_e";
261
+ readonly SouthEast: "idle_se";
262
+ readonly South: "idle_s";
263
+ readonly SouthWest: "idle_sw";
264
+ readonly West: "idle_w";
265
+ readonly NorthWest: "idle_nw";
266
+ };
267
+ readonly Walk: {
268
+ readonly North: "walk_n";
269
+ readonly NorthEast: "walk_ne";
270
+ readonly East: "walk_e";
271
+ readonly SouthEast: "walk_se";
272
+ readonly South: "walk_s";
273
+ readonly SouthWest: "walk_sw";
274
+ readonly West: "walk_w";
275
+ readonly NorthWest: "walk_nw";
276
+ };
277
+ readonly Backflip: "backflip";
278
+ };
279
+ declare const JIBBLE_ANIMATION_IDS: readonly ["idle_n", "idle_ne", "idle_e", "idle_se", "idle_s", "idle_sw", "idle_w", "idle_nw", "walk_n", "walk_ne", "walk_e", "walk_se", "walk_s", "walk_sw", "walk_w", "walk_nw", "backflip"];
280
+ type JibbleAnimationId = (typeof JIBBLE_ANIMATION_IDS)[number];
281
+ declare function normalizeJibbleDirection(direction: JibbleFacingDirection): JibbleDirectionCode;
282
+ declare function getJibbleAnimationId(action: JibbleAnimationAction, direction?: JibbleFacingDirection): JibbleAnimationId;
283
+
252
284
  declare function enableLogOverlay(options?: LogOverlayOptions): LogOverlayHandle;
253
285
 
254
286
  interface ShareRoomCodeOptions {
@@ -315,6 +347,32 @@ declare function flushGameState(): void;
315
347
  declare const oasiz: {
316
348
  submitScore: typeof submitScore;
317
349
  enableAppSimulator: typeof enableAppSimulator;
350
+ getJibbleAnimationId: typeof getJibbleAnimationId;
351
+ jibbleAnimations: {
352
+ readonly Idle: {
353
+ readonly North: "idle_n";
354
+ readonly NorthEast: "idle_ne";
355
+ readonly East: "idle_e";
356
+ readonly SouthEast: "idle_se";
357
+ readonly South: "idle_s";
358
+ readonly SouthWest: "idle_sw";
359
+ readonly West: "idle_w";
360
+ readonly NorthWest: "idle_nw";
361
+ };
362
+ readonly Walk: {
363
+ readonly North: "walk_n";
364
+ readonly NorthEast: "walk_ne";
365
+ readonly East: "walk_e";
366
+ readonly SouthEast: "walk_se";
367
+ readonly South: "walk_s";
368
+ readonly SouthWest: "walk_sw";
369
+ readonly West: "walk_w";
370
+ readonly NorthWest: "walk_nw";
371
+ };
372
+ readonly Backflip: "backflip";
373
+ };
374
+ jibbleAnimationIds: readonly ["idle_n", "idle_ne", "idle_e", "idle_se", "idle_s", "idle_sw", "idle_w", "idle_nw", "walk_n", "walk_ne", "walk_e", "walk_se", "walk_s", "walk_sw", "walk_w", "walk_nw", "backflip"];
375
+ jibbleDirections: readonly ["n", "ne", "e", "se", "s", "sw", "w", "nw"];
318
376
  addScore: typeof addScore;
319
377
  setScore: typeof setScore;
320
378
  getPlayerCharacter: typeof getPlayerCharacter;
@@ -346,4 +404,4 @@ declare const oasiz: {
346
404
  readonly graphicsPerformance: GraphicsPerformanceMetric;
347
405
  };
348
406
 
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 };
407
+ 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, JIBBLE_ANIMATION, JIBBLE_ANIMATION_IDS, JIBBLE_DIRECTIONS, type JibbleAnimationAction, type JibbleAnimationId, type JibbleDirectionCode, type JibbleFacingDirection, 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, getJibbleAnimationId, getPlayerAvatar, getPlayerCharacter, getPlayerId, getPlayerName, getRoomCode, getSafeAreaTop, getViewportInsets, leaveGame, loadGameState, normalizeJibbleDirection, oasiz, onBackButton, onLeaveGame, onPause, onResume, openInviteModal, saveGameState, setLeaderboardVisible, setScore, share, shareRoomCode, submitScore, triggerHaptic };
package/dist/index.d.ts CHANGED
@@ -249,6 +249,38 @@ declare function getPlayerCharacter(): Promise<PlayerCharacter | null>;
249
249
 
250
250
  declare function triggerHaptic(type: HapticType): void;
251
251
 
252
+ declare const JIBBLE_DIRECTIONS: readonly ["n", "ne", "e", "se", "s", "sw", "w", "nw"];
253
+ type JibbleDirectionCode = (typeof JIBBLE_DIRECTIONS)[number];
254
+ type JibbleFacingDirection = JibbleDirectionCode | "front" | "back" | "left" | "right";
255
+ type JibbleAnimationAction = "idle" | "walk" | "backflip";
256
+ declare const JIBBLE_ANIMATION: {
257
+ readonly Idle: {
258
+ readonly North: "idle_n";
259
+ readonly NorthEast: "idle_ne";
260
+ readonly East: "idle_e";
261
+ readonly SouthEast: "idle_se";
262
+ readonly South: "idle_s";
263
+ readonly SouthWest: "idle_sw";
264
+ readonly West: "idle_w";
265
+ readonly NorthWest: "idle_nw";
266
+ };
267
+ readonly Walk: {
268
+ readonly North: "walk_n";
269
+ readonly NorthEast: "walk_ne";
270
+ readonly East: "walk_e";
271
+ readonly SouthEast: "walk_se";
272
+ readonly South: "walk_s";
273
+ readonly SouthWest: "walk_sw";
274
+ readonly West: "walk_w";
275
+ readonly NorthWest: "walk_nw";
276
+ };
277
+ readonly Backflip: "backflip";
278
+ };
279
+ declare const JIBBLE_ANIMATION_IDS: readonly ["idle_n", "idle_ne", "idle_e", "idle_se", "idle_s", "idle_sw", "idle_w", "idle_nw", "walk_n", "walk_ne", "walk_e", "walk_se", "walk_s", "walk_sw", "walk_w", "walk_nw", "backflip"];
280
+ type JibbleAnimationId = (typeof JIBBLE_ANIMATION_IDS)[number];
281
+ declare function normalizeJibbleDirection(direction: JibbleFacingDirection): JibbleDirectionCode;
282
+ declare function getJibbleAnimationId(action: JibbleAnimationAction, direction?: JibbleFacingDirection): JibbleAnimationId;
283
+
252
284
  declare function enableLogOverlay(options?: LogOverlayOptions): LogOverlayHandle;
253
285
 
254
286
  interface ShareRoomCodeOptions {
@@ -315,6 +347,32 @@ declare function flushGameState(): void;
315
347
  declare const oasiz: {
316
348
  submitScore: typeof submitScore;
317
349
  enableAppSimulator: typeof enableAppSimulator;
350
+ getJibbleAnimationId: typeof getJibbleAnimationId;
351
+ jibbleAnimations: {
352
+ readonly Idle: {
353
+ readonly North: "idle_n";
354
+ readonly NorthEast: "idle_ne";
355
+ readonly East: "idle_e";
356
+ readonly SouthEast: "idle_se";
357
+ readonly South: "idle_s";
358
+ readonly SouthWest: "idle_sw";
359
+ readonly West: "idle_w";
360
+ readonly NorthWest: "idle_nw";
361
+ };
362
+ readonly Walk: {
363
+ readonly North: "walk_n";
364
+ readonly NorthEast: "walk_ne";
365
+ readonly East: "walk_e";
366
+ readonly SouthEast: "walk_se";
367
+ readonly South: "walk_s";
368
+ readonly SouthWest: "walk_sw";
369
+ readonly West: "walk_w";
370
+ readonly NorthWest: "walk_nw";
371
+ };
372
+ readonly Backflip: "backflip";
373
+ };
374
+ jibbleAnimationIds: readonly ["idle_n", "idle_ne", "idle_e", "idle_se", "idle_s", "idle_sw", "idle_w", "idle_nw", "walk_n", "walk_ne", "walk_e", "walk_se", "walk_s", "walk_sw", "walk_w", "walk_nw", "backflip"];
375
+ jibbleDirections: readonly ["n", "ne", "e", "se", "s", "sw", "w", "nw"];
318
376
  addScore: typeof addScore;
319
377
  setScore: typeof setScore;
320
378
  getPlayerCharacter: typeof getPlayerCharacter;
@@ -346,4 +404,4 @@ declare const oasiz: {
346
404
  readonly graphicsPerformance: GraphicsPerformanceMetric;
347
405
  };
348
406
 
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 };
407
+ 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, JIBBLE_ANIMATION, JIBBLE_ANIMATION_IDS, JIBBLE_DIRECTIONS, type JibbleAnimationAction, type JibbleAnimationId, type JibbleDirectionCode, type JibbleFacingDirection, 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, getJibbleAnimationId, getPlayerAvatar, getPlayerCharacter, getPlayerId, getPlayerName, getRoomCode, getSafeAreaTop, getViewportInsets, leaveGame, loadGameState, normalizeJibbleDirection, oasiz, onBackButton, onLeaveGame, onPause, onResume, openInviteModal, saveGameState, setLeaderboardVisible, setScore, share, shareRoomCode, submitScore, triggerHaptic };
package/dist/index.js CHANGED
@@ -1444,6 +1444,83 @@ function triggerHaptic(type) {
1444
1444
  }
1445
1445
  }
1446
1446
 
1447
+ // src/jibble.ts
1448
+ var JIBBLE_DIRECTIONS = [
1449
+ "n",
1450
+ "ne",
1451
+ "e",
1452
+ "se",
1453
+ "s",
1454
+ "sw",
1455
+ "w",
1456
+ "nw"
1457
+ ];
1458
+ var JIBBLE_ANIMATION = {
1459
+ Idle: {
1460
+ North: "idle_n",
1461
+ NorthEast: "idle_ne",
1462
+ East: "idle_e",
1463
+ SouthEast: "idle_se",
1464
+ South: "idle_s",
1465
+ SouthWest: "idle_sw",
1466
+ West: "idle_w",
1467
+ NorthWest: "idle_nw"
1468
+ },
1469
+ Walk: {
1470
+ North: "walk_n",
1471
+ NorthEast: "walk_ne",
1472
+ East: "walk_e",
1473
+ SouthEast: "walk_se",
1474
+ South: "walk_s",
1475
+ SouthWest: "walk_sw",
1476
+ West: "walk_w",
1477
+ NorthWest: "walk_nw"
1478
+ },
1479
+ Backflip: "backflip"
1480
+ };
1481
+ var JIBBLE_ANIMATION_IDS = [
1482
+ JIBBLE_ANIMATION.Idle.North,
1483
+ JIBBLE_ANIMATION.Idle.NorthEast,
1484
+ JIBBLE_ANIMATION.Idle.East,
1485
+ JIBBLE_ANIMATION.Idle.SouthEast,
1486
+ JIBBLE_ANIMATION.Idle.South,
1487
+ JIBBLE_ANIMATION.Idle.SouthWest,
1488
+ JIBBLE_ANIMATION.Idle.West,
1489
+ JIBBLE_ANIMATION.Idle.NorthWest,
1490
+ JIBBLE_ANIMATION.Walk.North,
1491
+ JIBBLE_ANIMATION.Walk.NorthEast,
1492
+ JIBBLE_ANIMATION.Walk.East,
1493
+ JIBBLE_ANIMATION.Walk.SouthEast,
1494
+ JIBBLE_ANIMATION.Walk.South,
1495
+ JIBBLE_ANIMATION.Walk.SouthWest,
1496
+ JIBBLE_ANIMATION.Walk.West,
1497
+ JIBBLE_ANIMATION.Walk.NorthWest,
1498
+ JIBBLE_ANIMATION.Backflip
1499
+ ];
1500
+ var JIBBLE_DIRECTION_ALIASES = {
1501
+ n: "n",
1502
+ ne: "ne",
1503
+ e: "e",
1504
+ se: "se",
1505
+ s: "s",
1506
+ sw: "sw",
1507
+ w: "w",
1508
+ nw: "nw",
1509
+ front: "s",
1510
+ back: "n",
1511
+ left: "w",
1512
+ right: "e"
1513
+ };
1514
+ function normalizeJibbleDirection(direction) {
1515
+ return JIBBLE_DIRECTION_ALIASES[direction];
1516
+ }
1517
+ function getJibbleAnimationId(action, direction = "front") {
1518
+ if (action === "backflip") {
1519
+ return JIBBLE_ANIMATION.Backflip;
1520
+ }
1521
+ return `${action}_${normalizeJibbleDirection(direction)}`;
1522
+ }
1523
+
1447
1524
  // src/log-overlay.ts
1448
1525
  var CONSOLE_METHODS = [
1449
1526
  "debug",
@@ -3290,6 +3367,10 @@ function getGraphicsPerformance() {
3290
3367
  var oasiz = {
3291
3368
  submitScore,
3292
3369
  enableAppSimulator,
3370
+ getJibbleAnimationId,
3371
+ jibbleAnimations: JIBBLE_ANIMATION,
3372
+ jibbleAnimationIds: JIBBLE_ANIMATION_IDS,
3373
+ jibbleDirections: JIBBLE_DIRECTIONS,
3293
3374
  addScore,
3294
3375
  setScore,
3295
3376
  getPlayerCharacter,
@@ -3337,6 +3418,9 @@ var oasiz = {
3337
3418
  }
3338
3419
  };
3339
3420
  export {
3421
+ JIBBLE_ANIMATION,
3422
+ JIBBLE_ANIMATION_IDS,
3423
+ JIBBLE_DIRECTIONS,
3340
3424
  addScore,
3341
3425
  enableAppSimulator,
3342
3426
  enableBackButtonTesting,
@@ -3344,6 +3428,7 @@ export {
3344
3428
  flushGameState,
3345
3429
  getGameId,
3346
3430
  getGraphicsPerformance,
3431
+ getJibbleAnimationId,
3347
3432
  getPlayerAvatar,
3348
3433
  getPlayerCharacter,
3349
3434
  getPlayerId,
@@ -3353,6 +3438,7 @@ export {
3353
3438
  getViewportInsets,
3354
3439
  leaveGame,
3355
3440
  loadGameState,
3441
+ normalizeJibbleDirection,
3356
3442
  oasiz,
3357
3443
  onBackButton,
3358
3444
  onLeaveGame,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oasiz/sdk",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Typed SDK for Oasiz game platform bridge APIs.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",