@rydr/game-sdk 1.13.0 → 1.14.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.
@@ -8,5 +8,5 @@
8
8
  */
9
9
  export declare const RYDR_PROTOCOL_VERSION: 5;
10
10
  /** Semver of this SDK build. Sent in the handshake for telemetry/debugging. */
11
- export declare const RYDR_SDK_VERSION = "1.13.0";
11
+ export declare const RYDR_SDK_VERSION = "1.14.0";
12
12
  //# sourceMappingURL=version.d.ts.map
@@ -10,5 +10,5 @@
10
10
  // shells omit it, the client falls back to its default).
11
11
  export const RYDR_PROTOCOL_VERSION = 5;
12
12
  /** Semver of this SDK build. Sent in the handshake for telemetry/debugging. */
13
- export const RYDR_SDK_VERSION = "1.13.0";
13
+ export const RYDR_SDK_VERSION = "1.14.0";
14
14
  //# sourceMappingURL=version.js.map
@@ -7,17 +7,20 @@
7
7
  * so it lives behind the optional `@rydr/game-sdk/three` entry point (with `three` as a peer
8
8
  * dependency) and never burdens games that don't render 3D.
9
9
  *
10
- * Two caches make repeated loads cheap:
11
- * - **Per-URL GLB dedup** ({@link createGlbLoader}): each glb is fetched + DRACO-decoded once per
12
- * assembly; repeated placements of the same prop get a `.clone()` (shared geometry/material). This
13
- * also keeps `applyWorld`'s "add each object to the group" correct the same Object3D instance
14
- * can't be added to a parent twice.
15
- * - **Per-world assembled-group cache** ({@link loadWorldGroup}, keyed by {@link CoreWorld.id}): a
16
- * platform world is a static environment, so once built it is reused across game/runtime instances
17
- * (replays, level restarts, missions sharing a world) instead of being re-fetched, re-decoded,
18
- * re-uploaded to the GPU and re-shader-compiled every time. Callers detach the group from their
19
- * scene on teardown but must **not** dispose its geometry/materials — the cache owns them. Use
20
- * {@link clearWorldCache} to release them when cycling through many large worlds.
10
+ * ## A world is loaded once and reused
11
+ *
12
+ * A platform world is a static environment, so it is fetched, DRACO-decoded, uploaded to the GPU and
13
+ * shader-compiled **once** ({@link loadWorld}, cached by {@link CoreWorld.id}) and then reused a game
14
+ * that tears down and rebuilds gameplay on every restart still gets an instant world. Two caches back
15
+ * this: a per-URL GLB dedup inside {@link createGlbLoader} (repeated props clone shared
16
+ * geometry/material instead of re-downloading), and the per-world {@link LoadedWorld} handle cache.
17
+ *
18
+ * ## The handle owns the GPU resources disposal is safe
19
+ *
20
+ * {@link loadWorld} returns a {@link LoadedWorld} handle, the single owner of the world's GPU
21
+ * resources. Use `attach`/`detach` for the cheap per-restart show/hide, and `dispose` as the *only*
22
+ * way to free memory (it also evicts the cache). This makes the cache impossible to corrupt: there is
23
+ * no "remember to detach, never dispose the shared group" rule to get wrong.
21
24
  */
22
25
  import * as THREE from "three";
23
26
  import type { CoreWorld } from "../protocol/worlds.js";
@@ -27,6 +30,38 @@ export interface GlbLoaderOptions {
27
30
  /** Override the DRACO decoder directory (defaults to {@link DRACO_DECODER_PATH}). */
28
31
  dracoDecoderPath?: string;
29
32
  }
33
+ /** A transform applied to a loaded world group: translate · Y-rotation · uniform scale. */
34
+ export interface WorldPlacement {
35
+ position?: [number, number, number];
36
+ /** Y-axis rotation, radians. */
37
+ rotationY?: number;
38
+ /** Uniform scale. */
39
+ scale?: number;
40
+ }
41
+ export interface LoadWorldOptions extends GlbLoaderOptions {
42
+ /** Optional transform applied to the world group on every `loadWorld` call (incl. cache hits). */
43
+ placement?: WorldPlacement;
44
+ }
45
+ /**
46
+ * A loaded platform world — the single owner of its GPU resources.
47
+ *
48
+ * Lifecycle: `attach(scene)` to show it, `detach()` to cheaply remove it (the per-restart op — keeps
49
+ * everything on the GPU), and `dispose()` to actually free its geometry/materials and evict it from
50
+ * the cache (real teardown, or switching to a different world). Never call `geometry.dispose()` on
51
+ * `group` yourself — the resources are shared with the cache; use `dispose()`.
52
+ */
53
+ export interface LoadedWorld {
54
+ /** The {@link CoreWorld.id} this was built from. */
55
+ readonly id: string;
56
+ /** The assembled meshes. Cached/shared — manage its lifetime through this handle, don't dispose it. */
57
+ readonly group: THREE.Group;
58
+ /** Add the world to a scene (or any parent). Idempotent; re-attaching after `detach` is the cheap resume. */
59
+ attach(parent: THREE.Object3D): void;
60
+ /** Remove the world from its parent **without** freeing GPU resources — the cheap per-restart teardown. */
61
+ detach(): void;
62
+ /** Free geometry + materials and evict from the cache. For real teardown or switching worlds. */
63
+ dispose(): void;
64
+ }
30
65
  /**
31
66
  * A `loadGlb` callback for {@link applyWorld}: fetches a glb by URL and resolves to its root scene.
32
67
  *
@@ -38,16 +73,18 @@ export interface GlbLoaderOptions {
38
73
  */
39
74
  export declare function createGlbLoader(opts?: GlbLoaderOptions): (url: string) => Promise<THREE.Object3D>;
40
75
  /**
41
- * Load a platform world's meshes into a group at identity, cached by world id. The caller adds the
42
- * returned group to its scene and detaches it on teardown **without disposing it** (the cache owns the
43
- * geometry/materials, so the next load reuses them instantly). Throws if any glb fails to load.
76
+ * Load (and cache by id) a platform world's meshes. Re-calling for the same `coreWorld.id` resolves to
77
+ * the **same** {@link LoadedWorld} handle instantly no re-fetch / re-decode / re-upload so games
78
+ * that rebuild gameplay on restart keep an instant world. `placement`, if given, is applied to the
79
+ * group on every call (cheap). Rejects if any glb fails to load.
44
80
  */
45
- export declare function loadWorldGroup(coreWorld: CoreWorld, opts?: GlbLoaderOptions): Promise<THREE.Group>;
81
+ export declare function loadWorld(coreWorld: CoreWorld, opts?: LoadWorldOptions): Promise<LoadedWorld>;
82
+ /** Apply a {@link WorldPlacement} (translate · Y-rotation · uniform scale) to a group. */
83
+ export declare function applyPlacement(group: THREE.Object3D, placement: WorldPlacement): void;
46
84
  /**
47
- * Release cached assembled worlds and dispose their geometry + materials (textures are left alone —
48
- * they may be shared elsewhere). Pass an `id` to drop a single world, or omit it to clear everything.
49
- * Call this when a game cycles through many large worlds and the retain-forever default would grow
50
- * memory unbounded. Safe to call while a group is still in a scene, but detach it from the scene first.
85
+ * Release cached worlds and dispose their geometry + materials (textures are left alone — they may be
86
+ * shared elsewhere). Pass an `id` to drop a single world, or omit it to clear everything. Equivalent
87
+ * to calling `dispose()` on the matching handle(s); use it when you don't hold the handle.
51
88
  */
52
89
  export declare function clearWorldCache(id?: string): void;
53
90
  //# sourceMappingURL=world-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"world-loader.d.ts","sourceRoot":"","sources":["../../src/three/world-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,4DAA4D,CAAC;AAE5F,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,GAAE,gBAAqB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAcrG;AAKD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAgBtG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAWjD"}
1
+ {"version":3,"file":"world-loader.d.ts","sourceRoot":"","sources":["../../src/three/world-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,4DAA4D,CAAC;AAE5F,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,2FAA2F;AAC3F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,kGAAkG;IAClG,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,uGAAuG;IACvG,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;IAC5B,6GAA6G;IAC7G,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IACrC,2GAA2G;IAC3G,MAAM,IAAI,IAAI,CAAC;IACf,iGAAiG;IACjG,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,GAAE,gBAAqB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAcrG;AAKD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,CAcjG;AAmBD,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI,CAIrF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAWjD"}
@@ -7,17 +7,20 @@
7
7
  * so it lives behind the optional `@rydr/game-sdk/three` entry point (with `three` as a peer
8
8
  * dependency) and never burdens games that don't render 3D.
9
9
  *
10
- * Two caches make repeated loads cheap:
11
- * - **Per-URL GLB dedup** ({@link createGlbLoader}): each glb is fetched + DRACO-decoded once per
12
- * assembly; repeated placements of the same prop get a `.clone()` (shared geometry/material). This
13
- * also keeps `applyWorld`'s "add each object to the group" correct the same Object3D instance
14
- * can't be added to a parent twice.
15
- * - **Per-world assembled-group cache** ({@link loadWorldGroup}, keyed by {@link CoreWorld.id}): a
16
- * platform world is a static environment, so once built it is reused across game/runtime instances
17
- * (replays, level restarts, missions sharing a world) instead of being re-fetched, re-decoded,
18
- * re-uploaded to the GPU and re-shader-compiled every time. Callers detach the group from their
19
- * scene on teardown but must **not** dispose its geometry/materials — the cache owns them. Use
20
- * {@link clearWorldCache} to release them when cycling through many large worlds.
10
+ * ## A world is loaded once and reused
11
+ *
12
+ * A platform world is a static environment, so it is fetched, DRACO-decoded, uploaded to the GPU and
13
+ * shader-compiled **once** ({@link loadWorld}, cached by {@link CoreWorld.id}) and then reused a game
14
+ * that tears down and rebuilds gameplay on every restart still gets an instant world. Two caches back
15
+ * this: a per-URL GLB dedup inside {@link createGlbLoader} (repeated props clone shared
16
+ * geometry/material instead of re-downloading), and the per-world {@link LoadedWorld} handle cache.
17
+ *
18
+ * ## The handle owns the GPU resources disposal is safe
19
+ *
20
+ * {@link loadWorld} returns a {@link LoadedWorld} handle, the single owner of the world's GPU
21
+ * resources. Use `attach`/`detach` for the cheap per-restart show/hide, and `dispose` as the *only*
22
+ * way to free memory (it also evicts the cache). This makes the cache impossible to corrupt: there is
23
+ * no "remember to detach, never dispose the shared group" rule to get wrong.
21
24
  */
22
25
  import * as THREE from "three";
23
26
  import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
@@ -49,54 +52,79 @@ export function createGlbLoader(opts = {}) {
49
52
  return p.then((scene) => scene.clone());
50
53
  };
51
54
  }
52
- /** Assembled worlds, keyed by {@link CoreWorld.id}. See the module doc for the lifecycle contract. */
53
- const worldGroupCache = new Map();
55
+ /** Loaded worlds, keyed by {@link CoreWorld.id}. See the module doc for the lifecycle contract. */
56
+ const worldCache = new Map();
54
57
  /**
55
- * Load a platform world's meshes into a group at identity, cached by world id. The caller adds the
56
- * returned group to its scene and detaches it on teardown **without disposing it** (the cache owns the
57
- * geometry/materials, so the next load reuses them instantly). Throws if any glb fails to load.
58
+ * Load (and cache by id) a platform world's meshes. Re-calling for the same `coreWorld.id` resolves to
59
+ * the **same** {@link LoadedWorld} handle instantly no re-fetch / re-decode / re-upload so games
60
+ * that rebuild gameplay on restart keep an instant world. `placement`, if given, is applied to the
61
+ * group on every call (cheap). Rejects if any glb fails to load.
58
62
  */
59
- export function loadWorldGroup(coreWorld, opts = {}) {
60
- let p = worldGroupCache.get(coreWorld.id);
63
+ export function loadWorld(coreWorld, opts = {}) {
64
+ let p = worldCache.get(coreWorld.id);
61
65
  if (!p) {
62
- p = (async () => {
63
- const group = new THREE.Group();
64
- group.name = "platform-world";
65
- await applyWorld(group, coreWorld, { loadGlb: createGlbLoader(opts) });
66
- return group;
67
- })();
66
+ p = buildWorld(coreWorld, opts);
68
67
  // Don't cache a rejected build — let the next attempt retry the fetch.
69
68
  p.catch(() => {
70
- if (worldGroupCache.get(coreWorld.id) === p)
71
- worldGroupCache.delete(coreWorld.id);
69
+ if (worldCache.get(coreWorld.id) === p)
70
+ worldCache.delete(coreWorld.id);
72
71
  });
73
- worldGroupCache.set(coreWorld.id, p);
72
+ worldCache.set(coreWorld.id, p);
74
73
  }
75
- return p;
74
+ return p.then((world) => {
75
+ if (opts.placement)
76
+ applyPlacement(world.group, opts.placement);
77
+ return world;
78
+ });
79
+ }
80
+ async function buildWorld(coreWorld, opts) {
81
+ const group = new THREE.Group();
82
+ group.name = "platform-world";
83
+ await applyWorld(group, coreWorld, { loadGlb: createGlbLoader(opts) });
84
+ const id = coreWorld.id;
85
+ return {
86
+ id,
87
+ group,
88
+ attach: (parent) => void parent.add(group),
89
+ detach: () => void group.removeFromParent(),
90
+ dispose: () => {
91
+ disposeGroup(group);
92
+ if (worldCache.has(id))
93
+ worldCache.delete(id);
94
+ },
95
+ };
96
+ }
97
+ /** Apply a {@link WorldPlacement} (translate · Y-rotation · uniform scale) to a group. */
98
+ export function applyPlacement(group, placement) {
99
+ if (placement.position)
100
+ group.position.fromArray(placement.position);
101
+ if (placement.rotationY !== undefined)
102
+ group.rotation.y = placement.rotationY;
103
+ if (placement.scale !== undefined)
104
+ group.scale.setScalar(placement.scale);
76
105
  }
77
106
  /**
78
- * Release cached assembled worlds and dispose their geometry + materials (textures are left alone —
79
- * they may be shared elsewhere). Pass an `id` to drop a single world, or omit it to clear everything.
80
- * Call this when a game cycles through many large worlds and the retain-forever default would grow
81
- * memory unbounded. Safe to call while a group is still in a scene, but detach it from the scene first.
107
+ * Release cached worlds and dispose their geometry + materials (textures are left alone — they may be
108
+ * shared elsewhere). Pass an `id` to drop a single world, or omit it to clear everything. Equivalent
109
+ * to calling `dispose()` on the matching handle(s); use it when you don't hold the handle.
82
110
  */
83
111
  export function clearWorldCache(id) {
84
112
  const drop = (key, promise) => {
85
- worldGroupCache.delete(key);
86
- void promise.then(disposeGroup).catch(() => { });
113
+ worldCache.delete(key);
114
+ void promise.then((w) => disposeGroup(w.group)).catch(() => { });
87
115
  };
88
116
  if (id !== undefined) {
89
- const p = worldGroupCache.get(id);
117
+ const p = worldCache.get(id);
90
118
  if (p)
91
119
  drop(id, p);
92
120
  return;
93
121
  }
94
- for (const [key, p] of worldGroupCache)
122
+ for (const [key, p] of worldCache)
95
123
  drop(key, p);
96
124
  }
97
- /** Dispose a group's geometry + materials (not textures). */
125
+ /** Remove a group from its parent and dispose its geometry + materials (not textures). */
98
126
  function disposeGroup(group) {
99
- group.parent?.remove(group);
127
+ group.removeFromParent();
100
128
  group.traverse((o) => {
101
129
  const mesh = o;
102
130
  if (!mesh.isMesh)
@@ -1 +1 @@
1
- {"version":3,"file":"world-loader.js","sourceRoot":"","sources":["../../src/three/world-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,O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QAC/C,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rydr/game-sdk",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/bdefrenne/rydr-game-sdk.git"