@konitif/viewer-3d 0.284.1 → 0.284.2

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 CHANGED
@@ -1,34 +1,61 @@
1
1
  # @konitif/viewer-3d
2
2
 
3
- Product-neutral 3D contracts and explicit-provider renderer for a reusable
4
- spatial projection. Scene state enters through a `Viewer3DPort`; selection,
5
- focus, camera and reset operations leave as intents.
6
-
7
- The amodal `ViewerSnapshot`, `ViewerIntent`, `ViewerPort` and Workflow source
8
- belong to `@konitif/viewer`. This package extends those contracts with vectors,
9
- transforms and camera intents. Historical `Viewer3DWorkflowCompositionSource`
10
- names remain compatibility aliases.
11
-
12
- The root entry contains the 3D scene and support contracts. The optional
13
- `@konitif/viewer-3d/renderer` entry contains the Three.js projection runtime.
14
- It requires explicit physics and experiment providers and does not construct a
15
- Workbench recorder or a product campaign.
16
-
17
- Robot model names, Behavior projection states, authored calibrations, product
18
- campaigns and product UI belong in specialization or host packages. The
19
- historical `@konitif/ui/robot-viewer/renderer` entry remains a compatibility
20
- facade; it is not the renderer authority.
21
-
22
- LED groups use model-local placement definitions and a product-provided
23
- calibration. The renderer supports circular and straight-strip layouts while
24
- remaining unaware of robot-specific frame names and default offsets.
25
-
26
- The standalone candidate consumes published Tools 0.284.3, Temporal 0.284.1,
27
- Physics 0.284.1 and Viewer 0.284.1. Composition 0.284.2 remains owned
28
- transitively by the amodal Viewer package. The distributable manifest and lock
29
- retain those public versions; no workspace alias is part of the release
30
- contract.
31
-
32
- `npm run verify:package` creates an isolated consumer for both public exports
33
- and checks their ESM runtime and strict NodeNext declarations. A successful
34
- local qualification proves the archive boundary, not its presence on npm.
3
+ Three.js-based spatial projection contracts and an explicit-provider renderer
4
+ for KONITIF Viewers.
5
+
6
+ ## Installation
7
+
8
+ ```sh
9
+ npm install @konitif/viewer-3d
10
+ ```
11
+
12
+ ## What it provides
13
+
14
+ - Three-dimensional vectors, transforms, scene snapshots and intents.
15
+ - A Workbench tool declaration for a spatial projection.
16
+ - Data-only definitions for joints, supports, contacts, balance, hands and LED
17
+ placement.
18
+ - An optional renderer entry with explicit physics and experiment providers.
19
+
20
+ ## Authority boundary
21
+
22
+ The amodal Viewer contract belongs to `@konitif/viewer`. This package owns only
23
+ the state and lifecycle of its 3D projection. Robot identity, model loading,
24
+ authored calibration, physics policy, product campaigns and Workbench shell
25
+ state remain host responsibilities.
26
+
27
+ ## Quick start
28
+
29
+ ```ts
30
+ import { createViewer3DSceneSnapshot } from '@konitif/viewer-3d';
31
+
32
+ const scene = createViewer3DSceneSnapshot({
33
+ sourceId: 'subject:example',
34
+ transforms: [{
35
+ id: 'origin',
36
+ position: { x: 0, y: 0, z: 0 },
37
+ rotation: { x: 0, y: 0, z: 0, w: 1 },
38
+ }],
39
+ });
40
+ ```
41
+
42
+ Import `@konitif/viewer-3d/renderer` only when a Three.js renderer and its
43
+ explicit providers are required.
44
+
45
+ ## Public entry points
46
+
47
+ | Entry | Purpose |
48
+ | --- | --- |
49
+ | `@konitif/viewer-3d` | Spatial contracts, definitions and scene helpers. |
50
+ | `@konitif/viewer-3d/renderer` | Three.js projection runtime and diagnostics. |
51
+
52
+ ## Reference
53
+
54
+ See [`reference/`](reference/) for the machine-readable capability catalog and
55
+ authority diagrams. Legacy 3D composition-source names are compatibility
56
+ aliases; the amodal source remains owned by `@konitif/viewer`.
57
+
58
+ ## License
59
+
60
+ Source-available under [PolyForm Noncommercial 1.0.0](LICENSE.md), not OSI open
61
+ source. Commercial use requires separate written authorization.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@konitif/viewer-3d",
3
3
  "license": "PolyForm-Noncommercial-1.0.0",
4
- "version": "0.284.1",
4
+ "version": "0.284.2",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "description": "Product-neutral Three.js projection contracts and explicit-provider renderer for KONITIF viewers.",
@@ -29,7 +29,8 @@
29
29
  "LICENSE.md",
30
30
  "dist",
31
31
  "README.md",
32
- "package.json"
32
+ "package.json",
33
+ "reference"
33
34
  ],
34
35
  "scripts": {
35
36
  "build": "tsc -p tsconfig.json",
@@ -0,0 +1,10 @@
1
+ # Viewer 3D reference
2
+
3
+ This directory contains authored, machine-readable documentation for
4
+ `@konitif/viewer-3d`.
5
+
6
+ - [`catalog.json`](catalog.json) groups spatial contracts and renderer responsibilities.
7
+ - [`diagrams.json`](diagrams.json) describes the subject-to-scene boundary.
8
+
9
+ These files support documentation tooling. They do not identify a robot,
10
+ configure product physics or transfer subject authority to the renderer.
@@ -0,0 +1,111 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "package": "@konitif/viewer-3d",
4
+ "intent": "Project a subject into a 3D scene without granting the view authority over the subject.",
5
+ "clusters": [
6
+ {
7
+ "id": "spatial-contracts",
8
+ "title": "Spatial contracts",
9
+ "summary": "Geometric values for the 3D projection.",
10
+ "authority": "Spatial representation contracts.",
11
+ "owns": [
12
+ "vectors",
13
+ "rotations",
14
+ "transforms"
15
+ ],
16
+ "doesNotOwn": [
17
+ "subject identity"
18
+ ],
19
+ "workflow": [
20
+ "Describe",
21
+ "Transform",
22
+ "Project"
23
+ ],
24
+ "symbolNames": [
25
+ "Viewer3DVector",
26
+ "Viewer3DQuaternion",
27
+ "Viewer3DTransform"
28
+ ]
29
+ },
30
+ {
31
+ "id": "scene-projection",
32
+ "title": "Scene projection",
33
+ "summary": "Snapshots and ports that make a scene observable.",
34
+ "authority": "Derived scene state.",
35
+ "owns": [
36
+ "snapshot",
37
+ "port"
38
+ ],
39
+ "doesNotOwn": [
40
+ "domain state"
41
+ ],
42
+ "workflow": [
43
+ "Adapt",
44
+ "Project",
45
+ "Observe"
46
+ ],
47
+ "symbolNames": [
48
+ "Viewer3DSceneSnapshot",
49
+ "Viewer3DPort",
50
+ "createViewer3DSceneSnapshot"
51
+ ]
52
+ },
53
+ {
54
+ "id": "renderer-projection",
55
+ "title": "Renderer projection",
56
+ "summary": "Three.js runtime supplied through an explicit entry point and fed by borrowed ports.",
57
+ "authority": "State and lifecycle of the visual projection.",
58
+ "owns": [
59
+ "Three.js scene",
60
+ "projection camera",
61
+ "display cadence",
62
+ "renderer lifecycle"
63
+ ],
64
+ "doesNotOwn": [
65
+ "robot identity",
66
+ "physics policy",
67
+ "experimental campaign",
68
+ "Workbench shell"
69
+ ],
70
+ "workflow": [
71
+ "Receive",
72
+ "Project",
73
+ "Observe",
74
+ "Dispose"
75
+ ],
76
+ "symbolNames": [
77
+ "Viewer3D",
78
+ "Viewer3DOptions",
79
+ "normalizeConfiguredDisplayFrameRate"
80
+ ]
81
+ },
82
+ {
83
+ "id": "workflow-integration",
84
+ "title": "Workflow and tool",
85
+ "summary": "3D specialization of a composition source and a Workbench contribution.",
86
+ "authority": "Amodal Viewer contract specialized by the 3D incarnation.",
87
+ "owns": [
88
+ "workflow source",
89
+ "intent",
90
+ "module"
91
+ ],
92
+ "doesNotOwn": [
93
+ "host runtime",
94
+ "amodal Viewer contract"
95
+ ],
96
+ "workflow": [
97
+ "Declare",
98
+ "Connect",
99
+ "Use"
100
+ ],
101
+ "symbolNames": [
102
+ "Viewer3DIntent",
103
+ "ViewerWorkflowCompositionSource",
104
+ "createViewerWorkflowCompositionSource",
105
+ "Viewer3DWorkflowCompositionSource",
106
+ "createViewer3DWorkflowCompositionSource",
107
+ "viewer3DToolModule"
108
+ ]
109
+ }
110
+ ]
111
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "package": "@konitif/viewer-3d",
4
+ "diagrams": [
5
+ {
6
+ "id": "subject-to-scene",
7
+ "title": "From subject to 3D scene",
8
+ "kind": "boundary",
9
+ "summary": "Viewer adapts a subject and its transforms into an observable scene without acquiring its identity.",
10
+ "nodes": [
11
+ {
12
+ "id": "subject",
13
+ "label": "Canonical subject",
14
+ "description": "The observed object remains owned by its domain."
15
+ },
16
+ {
17
+ "id": "source",
18
+ "label": "Composition source",
19
+ "description": "A compatible reading is prepared."
20
+ },
21
+ {
22
+ "id": "snapshot",
23
+ "label": "Scene snapshot",
24
+ "description": "Transforms and visible objects are derived."
25
+ },
26
+ {
27
+ "id": "port",
28
+ "label": "3D port",
29
+ "description": "The renderer receives a stable contract.",
30
+ "tone": "runtime"
31
+ },
32
+ {
33
+ "id": "renderer",
34
+ "label": "Explicit renderer",
35
+ "description": "Three.js projects the scene without acquiring authority over the subject.",
36
+ "tone": "runtime"
37
+ },
38
+ {
39
+ "id": "scene",
40
+ "label": "Perceptible scene",
41
+ "description": "The user observes the projection.",
42
+ "tone": "projection"
43
+ }
44
+ ],
45
+ "edges": [
46
+ {
47
+ "from": "subject",
48
+ "to": "source"
49
+ },
50
+ {
51
+ "from": "source",
52
+ "to": "snapshot"
53
+ },
54
+ {
55
+ "from": "snapshot",
56
+ "to": "port"
57
+ },
58
+ {
59
+ "from": "port",
60
+ "to": "renderer"
61
+ },
62
+ {
63
+ "from": "renderer",
64
+ "to": "scene"
65
+ }
66
+ ],
67
+ "caption": "Camera, framing, and view transforms remain projection state."
68
+ }
69
+ ]
70
+ }