Skip to content

Commit 6ea4f54

Browse files
AlexZ005claude
andcommitted
[docs] 1.29 (37-int-129): What's new + cloudApi CL-5 seams for plugin authors
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 81c5efd commit 6ea4f54

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

‎docs/index.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ with a contributing guide and an `llms.txt` for coding agents.
2424

2525
## What's new
2626

27+
**@@VER@@ — groundwork for cloud saves and kept rooms.** Under the hood, the app can now tell the
28+
theprototype.app cloud plugin when the scene changes, fingerprint what is in it, and hand over or open a whole
29+
project — what [cloud saves and rooms that stay open when everyone leaves](community.md) are built on. They switch on
30+
on theprototype.app separately; the open-source app is unchanged. Plugin authors: the new calls are in the
31+
[module SDK](module-sdk.md#for-cloud-plugin-authors-scene-changes-and-whole-projects).
32+
2733
**1.28 — VR + mesh: sculpt and snap the world from the headset, polyline knife, live symmetry, smart unwrap.** In a
2834
headset, radial menu ▸ **Add ▸ Terrain** drops a terrain in front of you and you [sculpt it](vr.md#sculpting-terrain-in-vr)
2935
with the trigger — Raise, Lower, Smooth and Flatten, the brush sized and weighted on the thumbstick. Grabbing the world

‎docs/module-sdk.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,30 @@ cloudApi.setWhatsNewSection(null); // removes it
575575
The markdown is a safe subset: headings, bullets, **bold**, `` `code` `` and https links; anything else is shown as
576576
text.
577577
578+
### For cloud plugin authors: scene changes and whole projects
579+
580+
New in @@VER@@ — what a plugin needs to keep a scene or a project somewhere else (theprototype.app's cloud saves and
581+
kept rooms use them). All are additive: feature-detect each one (`typeof api.onSceneChange === 'function'`), and
582+
nothing listens until a plugin calls them, so an app without a plugin behaves exactly as before.
583+
584+
```js
585+
const rev = cloudApi.sceneRevision(); // a counter that moves on EVERY scene change, local or from a peer
586+
const off = cloudApi.onSceneChange((rev) => { /* something changed — debounce, then save */ });
587+
const sig = await cloudApi.sceneSignature(); // the CONTENT identity of the open scene (a short hash)
588+
const { blob, meta } = await cloudApi.buildSceneBundle({ signature: true }); // meta.signature = the same hash
589+
const project = await cloudApi.buildProjectBundle(); // the whole project as a .tp
590+
await cloudApi.openRemoteProject({ url, title: 'My project' }); // asks before replacing the project
591+
```
592+
593+
| Call | What it does |
594+
|---|---|
595+
| `sceneRevision()` | a number that moves on every change to the scene — objects, graphs, animation, looks, sky, physics, music, HUD, game state. Compare two reads to know whether anything changed in between. `0` before the app has booted |
596+
| `onSceneChange(fn)` | calls `fn(revision)` after every change from now on (never for the current value); returns `off` |
597+
| `sceneSignature()` | a short hash of what the scene *is* (no ids, timestamps, thumbnail or game state). The revision also moves on internal refreshes, so "did the scene really change since I saved it?" is answered by comparing two signatures |
598+
| `buildSceneBundle({signature: true})` | as before, plus `meta.signature`. Opt-in, because it is one more pass over the whole scene |
599+
| `buildProjectBundle({versions?})` | the Explorer's own **Export project** bytes as `{blob, meta: {name, scenes, assets, items, bytes, appVersion}}`; downloads and changes nothing |
600+
| `openRemoteProject({url, title?})` | fetches a `.tp` and opens it through the app's own path (format check, "This replaces your current project" confirm). View-only users are refused. Resolves the counts, or `null` when refused, declined or failed (the user saw why) |
601+
578602
## For module authors: pointer, camera, play mode and VR seat
579603
580604
New in 1.26 — the hooks [Race](race.md) uses to drive on a phone and in a headset, open to every module. Each is torn

0 commit comments

Comments
 (0)