minimojs 1.0.0-alpha.11 → 1.0.0-alpha.12

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
@@ -21,6 +21,7 @@ This README is intentionally high-level. It explains what the project is and how
21
21
  - Runtime update delta (`dt`) is seconds
22
22
  - Coordinate system is center-based world space
23
23
  - Positive Y goes downward
24
+ - For new mobile-first games, prefer a portrait canvas of `720x1280`
24
25
 
25
26
  ## What It Intentionally Avoids
26
27
 
@@ -41,14 +42,14 @@ npm install minimojs
41
42
  ```ts
42
43
  import { Game, Sprite, type IScene } from "minimojs";
43
44
 
44
- const game = new Game(800, 600);
45
+ const game = new Game(720, 1280);
45
46
  game.gravityY = 980;
46
47
 
47
48
  class DemoScene implements IScene {
48
49
  private player: Sprite | null = null;
49
50
 
50
51
  onCreate() {
51
- this.player = game.add(new Sprite("🐢", 400, 300, 48));
52
+ this.player = game.add(new Sprite("🐢", 360, 640, 48));
52
53
  this.player.gravityScale = 1;
53
54
  }
54
55
 
package/dist/minimo.d.ts CHANGED
@@ -576,7 +576,7 @@ export interface CollisionInfo {
576
576
  * Example custom font registration:
577
577
  *
578
578
  * ```ts
579
- * const game = new Game(800, 600);
579
+ * const game = new Game(720, 1280);
580
580
  * game.requireFont('"Bangers"', { weight: "400" });
581
581
  * game.start();
582
582
  * ```
@@ -588,7 +588,7 @@ export interface CollisionInfo {
588
588
  * ```ts
589
589
  * import { Game, Sprite } from "https://cdn.jsdelivr.net/npm/minimojs@<version>/dist/minimo.js";
590
590
  *
591
- * const game = new Game(800, 600);
591
+ * const game = new Game(720, 1280);
592
592
  *
593
593
  * const player = new Sprite("🐢", 400, 500, 48);
594
594
  * game.add(player);
@@ -935,15 +935,16 @@ export declare class Game {
935
935
  * The engine creates its own `<canvas>`, sets its dimensions, and appends it
936
936
  * to `document.body`. The canvas is automatically centered and responsively
937
937
  * scaled to use the maximum available viewport space while preserving aspect ratio.
938
+ * For new mobile-first Minimo Games, prefer a portrait canvas such as `720x1280`.
938
939
  *
939
- * @param width - Canvas width in pixels. Default: `800`.
940
- * @param height - Canvas height in pixels. Default: `600`.
940
+ * @param width - Canvas width in pixels. Default: `720`.
941
+ * @param height - Canvas height in pixels. Default: `1280`.
941
942
  *
942
943
  * @throws Error if a 2D context cannot be obtained.
943
944
  *
944
945
  * @example
945
946
  * ```ts
946
- * const game = new Game(800, 600);
947
+ * const game = new Game(720, 1280);
947
948
  * game.physics = true;
948
949
  * ```
949
950
  */
package/dist/minimo.js CHANGED
@@ -693,7 +693,7 @@ export class BackgroundLayer {
693
693
  * Example custom font registration:
694
694
  *
695
695
  * ```ts
696
- * const game = new Game(800, 600);
696
+ * const game = new Game(720, 1280);
697
697
  * game.requireFont('"Bangers"', { weight: "400" });
698
698
  * game.start();
699
699
  * ```
@@ -705,7 +705,7 @@ export class BackgroundLayer {
705
705
  * ```ts
706
706
  * import { Game, Sprite } from "https://cdn.jsdelivr.net/npm/minimojs@<version>/dist/minimo.js";
707
707
  *
708
- * const game = new Game(800, 600);
708
+ * const game = new Game(720, 1280);
709
709
  *
710
710
  * const player = new Sprite("🐢", 400, 500, 48);
711
711
  * game.add(player);
@@ -981,19 +981,20 @@ export class Game {
981
981
  * The engine creates its own `<canvas>`, sets its dimensions, and appends it
982
982
  * to `document.body`. The canvas is automatically centered and responsively
983
983
  * scaled to use the maximum available viewport space while preserving aspect ratio.
984
+ * For new mobile-first Minimo Games, prefer a portrait canvas such as `720x1280`.
984
985
  *
985
- * @param width - Canvas width in pixels. Default: `800`.
986
- * @param height - Canvas height in pixels. Default: `600`.
986
+ * @param width - Canvas width in pixels. Default: `720`.
987
+ * @param height - Canvas height in pixels. Default: `1280`.
987
988
  *
988
989
  * @throws Error if a 2D context cannot be obtained.
989
990
  *
990
991
  * @example
991
992
  * ```ts
992
- * const game = new Game(800, 600);
993
+ * const game = new Game(720, 1280);
993
994
  * game.physics = true;
994
995
  * ```
995
996
  */
996
- constructor(width = 800, height = 600) {
997
+ constructor(width = 720, height = 1280) {
997
998
  /** @internal */ this._requiredFonts = new Map();
998
999
  /** @internal */ this._hasAppliedGlobalFontRequirements = false;
999
1000
  /** @internal */ this._isRegisteringPreloadAssets = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minimojs",
3
- "version": "1.0.0-alpha.11",
3
+ "version": "1.0.0-alpha.12",
4
4
  "description": "MinimoJS v1 — ultra-minimal, flat, deterministic 2D web game engine. Emoji-only sprites, rAF loop, TypeScript-first, LLM-friendly.",
5
5
  "type": "module",
6
6
  "main": "dist/minimo.js",