@nakednous/host 0.0.3 → 0.0.4
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 +2 -1
- package/dist/index.js +89 -3290
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ dependency first and an options object last, and registers with the context so
|
|
|
82
82
|
| `host.poseTrack(opts)` · `host.cameraTrack(cam, opts)` | core tracks ticked while they play; `{ handles }` builds `TrackHandles`, one handle per keyframe |
|
|
83
83
|
| `host.hid(opts)` · `host.gamepad(opts)` | rate streams — `lin[3]` / `ang[3]` in raw device units, `bind(helm)` feeds it each tick; `available`, `connected` |
|
|
84
84
|
| `host.image(url)` · `host.video(opts)` · `host.raster(draw, w, h)` | texture sources — an `ImageBitmap`, a hidden `<video>` from a file or the camera with a `ready` promise, a Canvas2D drawing |
|
|
85
|
+
| `host.model(url)` | an OBJ model as arrays — `{ position, normal?, texcoord?, indices }`, what twgl's `createBufferInfoFromArrays` takes; parsed by `webgl-obj-loader`, materials ignored |
|
|
85
86
|
| `host.labels` · `host.hasLabels` | the label layer, created on first access — `set(id, text, x, y, z, opts)` at a world anchor, `setScreen(id, text, sx, sy, opts)` in canvas px, `{ frame: true }` for a label that lives one frame, `tick()`; `hasLabels` probes without creating |
|
|
86
87
|
| `host.orbit(cam, opts)` | the fall-through gesture — one pointer orbits, two pan and dolly, the wheel dollies; `update()` reports whether the camera moved; the vertical sense follows the bag's projection (y-up GL, y-flipped p5) |
|
|
87
88
|
| `host.tick(dt)` | external-loop mode: tick the players; the caller flushes the pointer once its consumers ran |
|
|
@@ -90,7 +91,7 @@ dependency first and an options object last, and registers with the context so
|
|
|
90
91
|
The module-level functions behind the methods are exported too (`createView`, `createPointer`,
|
|
91
92
|
`createPlayers`, `createLoop`, `observeCanvas`, `Handle`, `PointerRouter`, `cameraHelm`,
|
|
92
93
|
`poseHelm`, `helmBasis`, `poseTrack`, `cameraTrack`, `TrackHandles`, `createHid`,
|
|
93
|
-
`createGamepad`, `decodeSpaceNavigator`, `loadImage`, `createVideo`, `raster`, `createLabels`,
|
|
94
|
+
`createGamepad`, `decodeSpaceNavigator`, `loadImage`, `createVideo`, `raster`, `loadModel`, `createLabels`,
|
|
94
95
|
`createOrbit`), so an adapter can compose them on its own context.
|
|
95
96
|
|
|
96
97
|
---
|