@displayxr/inline3d-tools 0.1.6 → 0.1.8
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/AGENTS.md +63 -25
- package/README.md +8 -8
- package/package.json +1 -1
- package/templates/app.js +1 -0
- package/templates/esm/index.html +3 -2
- package/templates/vite/package.template.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -15,11 +15,11 @@ sandboxed agent, prefer the MCP server** (below): MCP servers run outside the sa
|
|
|
15
15
|
sandbox. Otherwise run them as shell commands:
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
19
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
20
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
21
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
22
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
18
|
+
npx -y @displayxr/inline3d-tools@0.1.8 check <url | dir | page.html> [--root <project>] [--max-texture 4096]
|
|
19
|
+
npx -y @displayxr/inline3d-tools@0.1.8 assets <file.glb> [--target tablet|desktop]
|
|
20
|
+
npx -y @displayxr/inline3d-tools@0.1.8 assets prep <in> <out.glb> [--metres 0.01] [--decimate 0.5]
|
|
21
|
+
npx -y @displayxr/inline3d-tools@0.1.8 scaffold <esm|vite> <target-dir> --title "<page title>"
|
|
22
|
+
npx -y @displayxr/inline3d-tools@0.1.8 gen providers | gen run <adapter> ... --confirm-paid | gen provenance --file ...
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
or, with the MCP server configured (`inline3d-tools mcp`; config snippets for Codex, Cursor and
|
|
@@ -58,6 +58,11 @@ the buffer, clamp it to the device, frame the subject on the glass, and validate
|
|
|
58
58
|
three or PlayCanvas: use PlayCanvas for models and splats (the default, the most tested path); use
|
|
59
59
|
three when the page already is a three.js app (`addScene` + `EyeCamera`, see
|
|
60
60
|
`docs/porting-three-js-apps.md`).
|
|
61
|
+
An **animated character** (a rigged glTF that idles, hops, waves, reacts): `addScene` + `EyeCamera`
|
|
62
|
+
with three's `GLTFLoader` and `THREE.AnimationMixer` (`mixer.update(dt)` in your per-frame update,
|
|
63
|
+
which runs for both the 3D and the 2D path). Play the clips the file actually has (list
|
|
64
|
+
`gltf.animations` names; a model rarely has every gesture the user named, so pick the nearest clip,
|
|
65
|
+
such as a jump for "say hi", and say so). `addModel` does not drive clips.
|
|
61
66
|
|
|
62
67
|
### 2. Pick the rig by what the user moves
|
|
63
68
|
|
|
@@ -147,8 +152,16 @@ world per frame. Shrinking depth: rotate or scale uniformly, never squash z.
|
|
|
147
152
|
`onLayerLost: viewer.onLayerLost`; `addSplat` / `addModel` / `addPlayer` handle it themselves.
|
|
148
153
|
- [ ] **Nothing opaque above the canvas**; backgrounds and black go *under* it. Never overlap two
|
|
149
154
|
woven canvases (hide the lower one with `display: none`).
|
|
155
|
+
- [ ] **Size before the first woven frame** (1.59.0+): the store is already side-by-side when the layer
|
|
156
|
+
delivers its first frame. Size it in the same task as `addScene`, never after an `await` or in a
|
|
157
|
+
later `requestAnimationFrame`. Take the first size from `wall.displayInfo` (sync; may be `null` or
|
|
158
|
+
`cached: true`, both fine), then refine once `handle.getDisplayInfo()` resolves:
|
|
159
|
+
`let viewInfo = wall.displayInfo; size(); const handle = wall.addScene(…);
|
|
160
|
+
handle.getDisplayInfo().then((i) => { viewInfo = i; size(); })`. A store still shaped for flat on
|
|
161
|
+
those frames gives each eye half the scene; the SDK warns once (`[inline3d] this woven scene
|
|
162
|
+
canvas's store is …`) and holds `firstWoven` until it is right, but never resizes it for you.
|
|
150
163
|
- [ ] **Buffer = 2 × eye width, from `sceneBufferSize`** (core, 1.58.0+): an `addScene` page sizes its
|
|
151
|
-
canvas with `sceneBufferSize(canvas, { sbs, viewScale: sbs ?
|
|
164
|
+
canvas with `sceneBufferSize(canvas, { sbs, viewScale: sbs ? viewInfo : null })` (set
|
|
152
165
|
`canvas.width/height`, or `renderer.setSize(s.width, s.height, false)`, only when they change;
|
|
153
166
|
camera aspect from `s.eyeWidth / s.eyeHeight`), never `clientWidth × devicePixelRatio × 2`. Per eye
|
|
154
167
|
it is window device px × the runtime's view scale (dpr ≤ 2 without one), fitted to the GL limits
|
|
@@ -187,10 +200,25 @@ world per frame. Shrinking depth: rotate or scale uniformly, never squash z.
|
|
|
187
200
|
drop legacy calls. The checker scrolls the page and reports chrome that passes over a tile.
|
|
188
201
|
- HUD text and values: HTML beside or over the tile, readable size, not drawn into the 3D scene.
|
|
189
202
|
|
|
203
|
+
**Input: tap, pointer, tracked hands.** Taps, clicks and drags are ordinary pointer events on the
|
|
204
|
+
canvas, in 3D and 2D alike: `canvas.addEventListener('pointerdown', …)`. There are no controllers and
|
|
205
|
+
no `select` events. **Tracked hands** (DisplayXR Browser 1.8.0+ on Windows with a hand tracker; none
|
|
206
|
+
anywhere else, so always give the same action a tap too) come from `@displayxr/inline3d/hands`
|
|
207
|
+
(import-map entry `…/inline3d@1.60.2/js/inline3d-hands.js`; types in `hands.d.ts`):
|
|
208
|
+
- a model or splat: `addModel(wall, canvas, url, { hands: true })` (pinch to turn, two pinches to zoom);
|
|
209
|
+
- your own scene: `watchHands(wall, (f) => { const h = f.right || f.left; … })` after `addScene`.
|
|
210
|
+
Each frame gives `f.left` / `f.right` (null when not seen), with `wrist`, `thumbTip`, `indexTip`,
|
|
211
|
+
`joint(name)` and `palmLength`, in metres in the rig frame (the eye views' frame: x right, y up, z
|
|
212
|
+
toward the viewer). "Hold up your hand" = a hand appears (`h && !hadHand`); follow it with
|
|
213
|
+
`h.wrist[0]`; a pinch = `PinchDetector` on the thumb-to-index distance.
|
|
214
|
+
`f.gate` is `'available'` or why hands are withheld (`'camera-rig'`, `'not-fullscreen'`,
|
|
215
|
+
`'scaled-rig'`, …): use a display rig. The checker simulates no hands, so a PASS says nothing
|
|
216
|
+
about the hand path: say so, and ask the user to try it on the display.
|
|
217
|
+
|
|
190
218
|
### 6. Pins (exact versions, no `^`)
|
|
191
219
|
|
|
192
|
-
`@displayxr/inline3d` **1.
|
|
193
|
-
range), `three` **0.180.0**. CDN import maps pin the same: `https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.
|
|
220
|
+
`@displayxr/inline3d` **1.60.2**, `playcanvas` **2.24.0** (exact; `>=2.22.3 <3` is the supported
|
|
221
|
+
range), `three` **0.180.0**. CDN import maps pin the same: `https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.60.2/js/inline3d.js`,
|
|
194
222
|
`https://cdn.jsdelivr.net/npm/playcanvas@2.24.0/build/playcanvas.mjs`,
|
|
195
223
|
`https://cdn.jsdelivr.net/npm/three@0.180.0/build/three.module.js`. If a newer SDK is installed, its
|
|
196
224
|
`CHANGELOG.md` says what changed; prefer the installed version's docs over this list.
|
|
@@ -198,7 +226,7 @@ range), `three` **0.180.0**. CDN import maps pin the same: `https://cdn.jsdelivr
|
|
|
198
226
|
### 7. Before you say done: run the checker
|
|
199
227
|
|
|
200
228
|
```sh
|
|
201
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
229
|
+
npx -y @displayxr/inline3d-tools@0.1.8 check <url | dir | page.html> [--root <project>] [--max-texture 4096]
|
|
202
230
|
```
|
|
203
231
|
|
|
204
232
|
This runs the exact-pinned `@displayxr/inline3d-tools` package from npm (the first run downloads it;
|
|
@@ -226,8 +254,8 @@ The templates ship in the exact-pinned `@displayxr/inline3d-tools` npm package;
|
|
|
226
254
|
command copies them (the first run downloads the package; the user may be asked to approve the command):
|
|
227
255
|
|
|
228
256
|
```sh
|
|
229
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
230
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
257
|
+
npx -y @displayxr/inline3d-tools@0.1.8 scaffold esm <target-dir> --title "<page title>"
|
|
258
|
+
npx -y @displayxr/inline3d-tools@0.1.8 scaffold vite <target-dir> --title "<page title>" [--name <npm-name>]
|
|
231
259
|
```
|
|
232
260
|
|
|
233
261
|
It never overwrites an existing file (`--force` replaces). What it writes:
|
|
@@ -237,7 +265,7 @@ It never overwrites an existing file (`--force` replaces). What it writes:
|
|
|
237
265
|
| `app.js` | the page logic (shared by both flavours): a three.js scene on `addScene` with `EyeCamera`, display rig, validate-before-clear with last-good replay, buffer sized 2× the box (dpr ≤ 2, clamped to the GPU), cover removed on `handle.firstWoven` + a 4 s timeout + `catch`, a mono 2D fallback |
|
|
238
266
|
| `style.css` | page styles; the canvas and its ancestors carry no CSS effects |
|
|
239
267
|
| `index.html` (esm) | no build step: an import map with exact CDN pins |
|
|
240
|
-
| `index.html` + `package.json` (vite) | Vite: exact npm pins (`@displayxr/inline3d` 1.
|
|
268
|
+
| `index.html` + `package.json` (vite) | Vite: exact npm pins (`@displayxr/inline3d` 1.60.2, `three` 0.180.0) |
|
|
241
269
|
|
|
242
270
|
### Steps
|
|
243
271
|
|
|
@@ -268,7 +296,7 @@ It never overwrites an existing file (`--force` replaces). What it writes:
|
|
|
268
296
|
without `player.firstWoven`, wait for the first frame and then ~1200 ms more.
|
|
269
297
|
|
|
270
298
|
Add `"playcanvas": "https://cdn.jsdelivr.net/npm/playcanvas@2.24.0/build/playcanvas.mjs"` and
|
|
271
|
-
`"@displayxr/inline3d/model": "https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.
|
|
299
|
+
`"@displayxr/inline3d/model": "https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.60.2/js/inline3d-model-entry.js"`
|
|
272
300
|
(or `.../js/inline3d-splat-pc-entry.js` for `/splat/playcanvas`) to the import map, or
|
|
273
301
|
`"playcanvas": "2.24.0"` to `package.json`. Images and video use `wall.addImage(canvas, 'pic_2x1.jpg')`
|
|
274
302
|
/ `wall.addVideo(canvas, videoEl)` in the 3D branch and an `<img>` of the left half (or a mono
|
|
@@ -279,8 +307,8 @@ It never overwrites an existing file (`--force` replaces). What it writes:
|
|
|
279
307
|
5. **Run the checker before saying done**, and fix every FAIL:
|
|
280
308
|
|
|
281
309
|
```sh
|
|
282
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
283
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
310
|
+
npx -y @displayxr/inline3d-tools@0.1.8 check <target-dir> # esm
|
|
311
|
+
npx -y @displayxr/inline3d-tools@0.1.8 check http://localhost:5173/ # vite dev server
|
|
284
312
|
```
|
|
285
313
|
|
|
286
314
|
The untouched template passes every check (verdict PASS). If your change makes a check fail, the
|
|
@@ -297,19 +325,29 @@ Tools, in the order to reach for them:
|
|
|
297
325
|
|
|
298
326
|
| Tool | When | Install |
|
|
299
327
|
|---|---|---|
|
|
300
|
-
| `inline3d-tools assets` | always, last | `npx -y @displayxr/inline3d-tools@0.1.
|
|
328
|
+
| `inline3d-tools assets` | always, last | `npx -y @displayxr/inline3d-tools@0.1.8 assets` (exact pin, from npm; Node only) |
|
|
301
329
|
| glTF-Transform CLI | glTF/GLB in, glTF/GLB out: inspect, resize, compress, simplify, centre | `npx -y @gltf-transform/cli@4.3.0` (pinned; nothing installed globally) |
|
|
302
330
|
| Blender (headless) | any other format (FBX, OBJ, STL, PLY, DAE, .blend), units/axis fixes, heavy decimation | **only if already installed**; never install it |
|
|
303
|
-
| `inline3d-tools gen` | no asset exists and the user wants one generated | `npx -y @displayxr/inline3d-tools@0.1.
|
|
331
|
+
| `inline3d-tools gen` | no asset exists and the user wants one generated | `npx -y @displayxr/inline3d-tools@0.1.8 gen`; needs the user's own API key in the environment; every call is paid and needs the user's yes |
|
|
304
332
|
|
|
305
333
|
### 1. Get it
|
|
306
334
|
|
|
307
335
|
In order of preference:
|
|
308
336
|
|
|
309
337
|
1. **The user's own asset** (in the project, or a path they gave). Record it:
|
|
310
|
-
`npx -y @displayxr/inline3d-tools@0.1.
|
|
311
|
-
2. **A library asset with a clear licence** (CC0 / CC-BY
|
|
312
|
-
|
|
338
|
+
`npx -y @displayxr/inline3d-tools@0.1.8 gen provenance --file assets/x.glb --source "supplied by the user" --license "user's"`.
|
|
339
|
+
2. **A library asset with a clear licence** (CC0 / CC-BY). Record the URL, author and licence;
|
|
340
|
+
CC-BY needs visible credit on the page (credit CC0 too, it costs nothing). Where to look:
|
|
341
|
+
- **Poly Pizza** (`https://poly.pizza`, low-poly, many CC0 and **rigged and animated** characters
|
|
342
|
+
and animals by Quaternius: dinosaurs, pets, people, robots). Search it with
|
|
343
|
+
`https://poly.pizza/api/search/<word>` (JSON: `title`, `creator`, `licence`, `url`); the
|
|
344
|
+
model page `https://poly.pizza<url>` carries the GLB as `https://static.poly.pizza/<uuid>.glb`
|
|
345
|
+
(CORS open, loads straight into a page). Example: T-Rex by Quaternius, CC0,
|
|
346
|
+
`https://static.poly.pizza/34eed102-48f0-43dd-bc6f-ef7a6dfddfbb.glb` (336 KB; clips Idle, Walk,
|
|
347
|
+
Run, Jump, Attack, Death).
|
|
348
|
+
- **Khronos glTF sample models** (`https://github.com/KhronosGroup/glTF-Sample-Assets`, served
|
|
349
|
+
from `raw.githubusercontent.com`): test and showcase models (Fox is rigged and animated).
|
|
350
|
+
- **Poly Haven** (`https://polyhaven.com`): CC0 props, textures and HDRIs, no characters.
|
|
313
351
|
3. **A placeholder you build** (primitives in three.js/PlayCanvas) when nothing fits and the user
|
|
314
352
|
did not ask for generation. Say so in your notes.
|
|
315
353
|
4. **Generation**, only when the user asked for it or agreed. See §4.
|
|
@@ -337,7 +375,7 @@ fetches decoders from a CDN). Other fixes: `$GT simplify in.glb out.glb --ratio
|
|
|
337
375
|
**Anything else (Blender, if present).** Detect it, don't install it:
|
|
338
376
|
|
|
339
377
|
```sh
|
|
340
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
378
|
+
npx -y @displayxr/inline3d-tools@0.1.8 assets prep in.fbx out.glb [--metres 0.01] [--decimate 0.5] [--blender <path>]
|
|
341
379
|
```
|
|
342
380
|
|
|
343
381
|
It looks for Blender (`--blender`, `$BLENDER`, `PATH`, the default install location), never installs
|
|
@@ -354,8 +392,8 @@ helmet is ~0.3 m, not 2 m).
|
|
|
354
392
|
### 3. Check it (before the page uses it)
|
|
355
393
|
|
|
356
394
|
```sh
|
|
357
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
358
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
395
|
+
npx -y @displayxr/inline3d-tools@0.1.8 assets out.glb # tablet budget (default)
|
|
396
|
+
npx -y @displayxr/inline3d-tools@0.1.8 assets out.glb --target desktop
|
|
359
397
|
```
|
|
360
398
|
|
|
361
399
|
It reports: missing external files, decoders the page must provide, triangles (both eyes draw
|
|
@@ -369,7 +407,7 @@ animations. Fix every FAIL; act on WARNs or say why not. Then run the page check
|
|
|
369
407
|
### 4. Generate it (optional, paid, the user's keys)
|
|
370
408
|
|
|
371
409
|
```sh
|
|
372
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
410
|
+
npx -y @displayxr/inline3d-tools@0.1.8 gen providers # which adapters have a key (names only)
|
|
373
411
|
```
|
|
374
412
|
|
|
375
413
|
Adapters: `meshy` and `tripo` (text-to-3d, image-to-3d → GLB), `openai` (image → PNG, for
|
|
@@ -390,7 +428,7 @@ textures, posters and backdrops). Each reads its key from the environment (`MESH
|
|
|
390
428
|
shippable.
|
|
391
429
|
|
|
392
430
|
```sh
|
|
393
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
431
|
+
npx -y @displayxr/inline3d-tools@0.1.8 gen run meshy --kind text-to-3d --prompt "a brass desk lamp, PBR" --out assets/lamp-raw.glb --confirm-paid
|
|
394
432
|
```
|
|
395
433
|
|
|
396
434
|
### 5. ASSETS.md
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ same operations. [`AGENTS.md`](AGENTS.md) is the matching authoring checklist fo
|
|
|
9
9
|
Needs Node ≥ 18. `check` also needs a local Chrome or Chromium. Always run an **exact version**:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
12
|
+
npx -y @displayxr/inline3d-tools@0.1.8 <command> ...
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## CLI
|
|
@@ -47,7 +47,7 @@ environment only and are redacted from every tool result.
|
|
|
47
47
|
### Claude Code
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
|
-
claude mcp add inline3d-tools -- npx -y @displayxr/inline3d-tools@0.1.
|
|
50
|
+
claude mcp add inline3d-tools -- npx -y @displayxr/inline3d-tools@0.1.8 mcp
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
or in a project's `.mcp.json`:
|
|
@@ -57,7 +57,7 @@ or in a project's `.mcp.json`:
|
|
|
57
57
|
"mcpServers": {
|
|
58
58
|
"inline3d-tools": {
|
|
59
59
|
"command": "npx",
|
|
60
|
-
"args": ["-y", "@displayxr/inline3d-tools@0.1.
|
|
60
|
+
"args": ["-y", "@displayxr/inline3d-tools@0.1.8", "mcp"]
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -77,7 +77,7 @@ needs you to approve running it outside the sandbox. In `~/.codex/config.toml` (
|
|
|
77
77
|
```toml
|
|
78
78
|
[mcp_servers.inline3d-tools]
|
|
79
79
|
command = "npx"
|
|
80
|
-
args = ["-y", "@displayxr/inline3d-tools@0.1.
|
|
80
|
+
args = ["-y", "@displayxr/inline3d-tools@0.1.8", "mcp"]
|
|
81
81
|
# cwd = "/path/to/your/project" # relative paths in tool calls resolve here
|
|
82
82
|
startup_timeout_sec = 30 # first run downloads the package (default 10)
|
|
83
83
|
tool_timeout_sec = 180 # a page check takes 10-60 s; generation can take minutes (default 60)
|
|
@@ -85,11 +85,11 @@ tool_timeout_sec = 180 # a page check takes 10-60 s; generation can t
|
|
|
85
85
|
# env_vars = ["MESHY_API_KEY", "TRIPO_API_KEY", "OPENAI_API_KEY"]
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
or `codex mcp add inline3d-tools -- npx -y @displayxr/inline3d-tools@0.1.
|
|
88
|
+
or `codex mcp add inline3d-tools -- npx -y @displayxr/inline3d-tools@0.1.8 mcp`. The
|
|
89
89
|
[`displayxr-inline3d-codex` plugin](https://github.com/DisplayXR/displayxr-web/tree/main/plugins/displayxr-inline3d-codex)
|
|
90
90
|
sets the server up for you in Codex.
|
|
91
91
|
|
|
92
|
-
**Fetch the package once before the first Codex session:** `npx -y @displayxr/inline3d-tools@0.1.
|
|
92
|
+
**Fetch the package once before the first Codex session:** `npx -y @displayxr/inline3d-tools@0.1.8 --version`.
|
|
93
93
|
Codex starts MCP servers when a session starts and can stop one before a cold `npx` download
|
|
94
94
|
finishes. The interrupted download leaves a broken entry in npm's `_npx` cache (`node_modules`
|
|
95
95
|
without a `package.json`), and from then on the server fails at every start with
|
|
@@ -109,7 +109,7 @@ In `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):
|
|
|
109
109
|
"mcpServers": {
|
|
110
110
|
"inline3d-tools": {
|
|
111
111
|
"command": "npx",
|
|
112
|
-
"args": ["-y", "@displayxr/inline3d-tools@0.1.
|
|
112
|
+
"args": ["-y", "@displayxr/inline3d-tools@0.1.8", "mcp"]
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -151,7 +151,7 @@ forwarding). Never paste a key into an agent chat.
|
|
|
151
151
|
## check
|
|
152
152
|
|
|
153
153
|
```sh
|
|
154
|
-
npx -y @displayxr/inline3d-tools@0.1.
|
|
154
|
+
npx -y @displayxr/inline3d-tools@0.1.8 check <url | dir | page.html> [--root <dir>] [--max-texture 4096] [--json] [--out report.json]
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
Needs Node ≥ 18 and a local Chrome (`CHROME=/path/to/chrome` overrides the default location). It
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@displayxr/inline3d-tools",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Agent-agnostic tools for @displayxr/inline3d pages: a headless checker (fake DisplayXR Browser + plain 2D run), a glTF/GLB asset check, page scaffolds, optional asset generation with provenance, and a stdio MCP server exposing the same operations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/templates/app.js
CHANGED
|
@@ -129,6 +129,7 @@ function onFrame(views, layer) {
|
|
|
129
129
|
async function start() {
|
|
130
130
|
const wall = await createInline3D();
|
|
131
131
|
if (!wall.supported) return start2D('no inline 3D here');
|
|
132
|
+
viewInfo = wall.displayInfo || null; // last read on this origin, or null; refined below
|
|
132
133
|
sizeBuffer(true); // size before registering (woven-canvas rule 4)
|
|
133
134
|
const handle = wall.addScene(canvas, onFrame, {
|
|
134
135
|
virtualDisplayHeight: VIRTUAL_DISPLAY_HEIGHT,
|
package/templates/esm/index.html
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
{ "imports": {
|
|
11
11
|
"three": "https://cdn.jsdelivr.net/npm/three@0.180.0/build/three.module.js",
|
|
12
12
|
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.180.0/examples/jsm/",
|
|
13
|
-
"@displayxr/inline3d": "https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.
|
|
14
|
-
"@displayxr/inline3d/three": "https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.
|
|
13
|
+
"@displayxr/inline3d": "https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.60.2/js/inline3d.js",
|
|
14
|
+
"@displayxr/inline3d/three": "https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.60.2/js/inline3d-three.js",
|
|
15
|
+
"@displayxr/inline3d/hands": "https://cdn.jsdelivr.net/npm/@displayxr/inline3d@1.60.2/js/inline3d-hands.js"
|
|
15
16
|
} }
|
|
16
17
|
</script>
|
|
17
18
|
</head>
|