@umicat/platform-sdk 0.1.0 → 0.2.0
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 +7 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/orientation.d.ts +18 -0
- package/dist/orientation.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,10 +4,13 @@ The engine-neutral half of the Umicat game SDK. Identity, cloud saves, shared
|
|
|
4
4
|
game data, multiplayer rooms, runtime AI, voice input and scripted dialogue —
|
|
5
5
|
none of which care how pixels get on screen.
|
|
6
6
|
|
|
7
|
-
**Status:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
**Status: adopted.** `@umicat/phaser-sdk@1.0.91` consumes this package — the
|
|
8
|
+
platform code exists in one place again. `@umicat/three-sdk` consumes it too.
|
|
9
|
+
|
|
10
|
+
`scripts/verify-swap.mjs` is now a regression guard rather than a migration
|
|
11
|
+
plan: it still copies both repos to scratch, applies the swap from scratch, and
|
|
12
|
+
asserts the Phaser SDK exports the same 105 names and passes its whole suite.
|
|
13
|
+
Run it after changing anything in here.
|
|
11
14
|
|
|
12
15
|
## Why it exists
|
|
13
16
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { UmicatCore } from './core/UmicatCore.js';
|
|
2
2
|
export type { UmicatInitOptions } from './core/UmicatCore.js';
|
|
3
|
+
export { ORIENTATION_DIMENSIONS } from './orientation.js';
|
|
4
|
+
export type { Orientation } from './orientation.js';
|
|
3
5
|
export { RpcError } from './core/Transport.js';
|
|
4
6
|
export type { Transport, TransportKind } from './core/Transport.js';
|
|
5
7
|
export { PostMessageTransport } from './core/transports/PostMessageTransport.js';
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// three.js, or by something we have not chosen yet. Anything that needs to
|
|
5
5
|
// know how pixels get on screen belongs in a runtime package, not here.
|
|
6
6
|
export { UmicatCore } from './core/UmicatCore.js';
|
|
7
|
+
export { ORIENTATION_DIMENSIONS } from './orientation.js';
|
|
7
8
|
export { RpcError } from './core/Transport.js';
|
|
8
9
|
export { PostMessageTransport } from './core/transports/PostMessageTransport.js';
|
|
9
10
|
export { LocalStorageTransport } from './core/transports/LocalStorageTransport.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canvas shape a game is authored for.
|
|
3
|
+
*
|
|
4
|
+
* Platform data, not engine data: it is the contract between the host surface
|
|
5
|
+
* and the game about what shape the play area is, and it reads the same whether
|
|
6
|
+
* the game is drawn by Phaser, by three.js, or by something later. The value is
|
|
7
|
+
* chosen at game creation and is immutable afterwards — every scene is laid out
|
|
8
|
+
* against it, so switching mid-development breaks layouts.
|
|
9
|
+
*
|
|
10
|
+
* `@umicat/phaser-sdk` still carries its own copy of these six lines (it
|
|
11
|
+
* predates this package). Consolidating it there is a safe cleanup for whenever
|
|
12
|
+
* that package is next touched; it is frozen data, so the drift risk is low.
|
|
13
|
+
*/
|
|
14
|
+
export type Orientation = 'portrait' | 'landscape';
|
|
15
|
+
export declare const ORIENTATION_DIMENSIONS: Record<Orientation, {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umicat/platform-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Umicat's platform layer, independent of any rendering engine: identity, cloud saves, shared game data, multiplayer, runtime AI, voice and scripted dialogue. Consumed by @umicat/phaser-sdk and @umicat/three-sdk alike.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|