@thewhateverapp/tile-sdk 0.17.2 → 0.17.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.
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * function MyGame() {
13
13
  * return (
14
- * <ExcaliburGame width={256} height={554}>
14
+ * <ExcaliburGame>
15
15
  * <GameContent />
16
16
  * </ExcaliburGame>
17
17
  * );
@@ -42,7 +42,7 @@
42
42
  * }
43
43
  * ```
44
44
  */
45
- export { ExcaliburGame, useEngine, useScene, useGameLoop, useGameState, useGameInput, TILE_WIDTH, TILE_HEIGHT, } from '../react/ExcaliburGame.js';
45
+ export { ExcaliburGame, useEngine, useScene, useGameLoop, useGameState, useGameInput, GAME_WIDTH, GAME_HEIGHT, } from '../react/ExcaliburGame.js';
46
46
  export type { ExcaliburGameProps } from '../react/ExcaliburGame.js';
47
47
  export { Actor, Vector, Color, Engine, Scene, Timer, Trigger, Label, } from '../react/ExcaliburGame.js';
48
48
  export { Sprite, SpriteSheet, Animation, AnimationStrategy, AnimationDirection, Graphic, GraphicsGroup, Rectangle, Circle, Polygon, Line, Text, Font, Canvas, ImageFiltering, ImageWrapping, } from '../react/ExcaliburGame.js';
@@ -12,7 +12,7 @@
12
12
  *
13
13
  * function MyGame() {
14
14
  * return (
15
- * <ExcaliburGame width={256} height={554}>
15
+ * <ExcaliburGame>
16
16
  * <GameContent />
17
17
  * </ExcaliburGame>
18
18
  * );
@@ -45,8 +45,8 @@
45
45
  */
46
46
  // React components and hooks
47
47
  export { ExcaliburGame, useEngine, useScene, useGameLoop, useGameState, useGameInput,
48
- // Constants
49
- TILE_WIDTH, TILE_HEIGHT, } from '../react/ExcaliburGame.js';
48
+ // Constants - Full HD vertical (9:16, matches TikTok)
49
+ GAME_WIDTH, GAME_HEIGHT, } from '../react/ExcaliburGame.js';
50
50
  // Core Excalibur classes
51
51
  export { Actor, Vector, Color, Engine, Scene, Timer, Trigger, Label, } from '../react/ExcaliburGame.js';
52
52
  // Graphics - Shapes & Sprites
@@ -60,10 +60,10 @@ export { PreUpdateEvent, PostUpdateEvent, PreDrawEvent, PostDrawEvent, Collision
60
60
  export { coroutine } from 'excalibur';
61
61
  export { Logger, LogLevel, EasingFunction } from 'excalibur';
62
62
  /**
63
- * Tile dimensions - standard tile size
63
+ * Game dimensions - Full HD vertical (9:16 aspect ratio, matches TikTok)
64
64
  */
65
- export declare const TILE_WIDTH = 256;
66
- export declare const TILE_HEIGHT = 554;
65
+ export declare const GAME_WIDTH = 1080;
66
+ export declare const GAME_HEIGHT = 1920;
67
67
  /**
68
68
  * Hook to get the Excalibur Engine
69
69
  */
@@ -81,9 +81,9 @@ export declare function useScene(): Scene | null;
81
81
  export declare function useGameLoop(callback: (delta: number) => void, enabled?: boolean): void;
82
82
  export interface ExcaliburGameProps {
83
83
  children: ReactNode;
84
- /** Width in pixels (default: 256 for tile) */
84
+ /** Width in pixels (default: 1080 for Full HD vertical) */
85
85
  width?: number;
86
- /** Height in pixels (default: 554 for tile) */
86
+ /** Height in pixels (default: 1920 for Full HD vertical) */
87
87
  height?: number;
88
88
  /** Background color (CSS color string, default: black) */
89
89
  backgroundColor?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ExcaliburGame.d.ts","sourceRoot":"","sources":["../../src/react/ExcaliburGame.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,MAAM,EAAE,WAAW,EAAoB,KAAK,KAAK,EAAE,MAAM,WAAW,CAAC;AAI9E,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvF,OAAO,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,iBA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,IAAI,EACjC,OAAO,GAAE,OAAc,QAexB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,mBAAmB;IACnB,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;IACF,6BAA6B;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAkB,EAClB,MAAoB,EACpB,eAA2B,EAC3B,WAA6C,EAC7C,OAAY,EACZ,MAAc,EACd,OAAO,GACR,EAAE,kBAAkB,qBA+FpB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAC3C,YAAY,EAAE,CAAC,GACd,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC,CASzC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,oDAwB3B"}
@@ -77,10 +77,10 @@ export { coroutine } from 'excalibur';
77
77
  // Utilities
78
78
  export { Logger, LogLevel } from 'excalibur';
79
79
  /**
80
- * Tile dimensions - standard tile size
80
+ * Game dimensions - Full HD vertical (9:16 aspect ratio, matches TikTok)
81
81
  */
82
- export const TILE_WIDTH = 256;
83
- export const TILE_HEIGHT = 554;
82
+ export const GAME_WIDTH = 1080;
83
+ export const GAME_HEIGHT = 1920;
84
84
  const ExcaliburContext = createContext(null);
85
85
  /**
86
86
  * Hook to get the Excalibur Engine
@@ -124,7 +124,7 @@ export function useGameLoop(callback, enabled = true) {
124
124
  * Creates an Excalibur Engine and provides it via context.
125
125
  * Children can use useEngine() to access the engine and add actors/entities.
126
126
  */
127
- export function ExcaliburGame({ children, width = TILE_WIDTH, height = TILE_HEIGHT, backgroundColor = '#000000', displayMode = DisplayMode.FitContainerAndFill, options = {}, paused = false, onMount, }) {
127
+ export function ExcaliburGame({ children, width = GAME_WIDTH, height = GAME_HEIGHT, backgroundColor = '#000000', displayMode = DisplayMode.FitContainerAndFill, options = {}, paused = false, onMount, }) {
128
128
  const containerRef = useRef(null);
129
129
  const engineRef = useRef(null);
130
130
  const updateCallbacksRef = useRef(new Set());
@@ -201,7 +201,7 @@ export function ExcaliburGame({ children, width = TILE_WIDTH, height = TILE_HEIG
201
201
  };
202
202
  }, []),
203
203
  };
204
- return (React.createElement("div", { ref: containerRef, style: { width: '100%', height: '100%', overflow: 'hidden' } }, isReady && (React.createElement(ExcaliburContext.Provider, { value: contextValue }, children))));
204
+ return (React.createElement("div", { ref: containerRef, style: { width: '100%', height: '100dvh', overflow: 'hidden' } }, isReady && (React.createElement(ExcaliburContext.Provider, { value: contextValue }, children))));
205
205
  }
206
206
  /**
207
207
  * useGameState - Helper for managing game state with refs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thewhateverapp/tile-sdk",
3
- "version": "0.17.2",
3
+ "version": "0.17.4",
4
4
  "description": "SDK for building interactive tiles on The Whatever App platform",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",