@nakednous/host 0.0.1

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 ADDED
@@ -0,0 +1,60 @@
1
+ # `@nakednous/host`
2
+
3
+ DOM transport for `@nakednous/tree` — pointer input with per-pointer capture, the interactive
4
+ handle controller and pointer router, players and a frame loop, 6-DOF device streams (WebHID,
5
+ Gamepad), image and video sources, a DOM label overlay — **zero renderer**, pure vanilla DOM.
6
+
7
+ > **Status: 0.0.x.** Shipped: the context (`createHost`), the view bag, the pointer source,
8
+ > players and the frame loop, the canvas observer, `Handle` and `PointerRouter`, the helm and
9
+ > track factories with `TrackHandles`. Still to land: device streams, media, the label overlay
10
+ > and the orbit.
11
+
12
+ ---
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @nakednous/host
18
+ ```
19
+
20
+ ```js
21
+ import { createHost } from '@nakednous/host'
22
+
23
+ const host = createHost(canvas) // one per canvas
24
+ host.view.setCamera(cam) // a @nakednous/tree camera state
25
+ const h = host.handle({ constraint: PLANE, normal: [0, 0, 1] })
26
+ // each frame: if (!h.update()) orbit(); …; host.tick(dt)
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Architecture
32
+
33
+ `@nakednous/host` is the transport layer of an engine-free stack. It knows nothing about
34
+ WebGL or WebGPU — it owns a canvas element's input and the frame clock, and hands numbers to
35
+ `@nakednous/tree`.
36
+
37
+ ```
38
+ application
39
+ │
40
+ ▼
41
+ twgl.tree · webgpu.tree ← bridge: the GPU, thinly
42
+ │
43
+ ├── @nakednous/host ← this package: pointer, handles, tracks, helms, players, streams, media
44
+ │ │
45
+ │ └── @nakednous/tree
46
+ │
47
+ ├── @nakednous/ui ← optional: DOM panels
48
+ │
49
+ └── @nakednous/tree ← math, spaces, animation, visibility
50
+ ```
51
+
52
+ Dependency direction is strict: `tree ← host`; host never imports ui, ui never imports host,
53
+ and nothing flows back into tree.
54
+
55
+ ---
56
+
57
+ ## License
58
+
59
+ AGPL-3.0-only
60
+ © JP Charalambos