@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 +59 -32
- package/package.json +3 -2
- package/reference/README.md +10 -0
- package/reference/catalog.json +111 -0
- package/reference/diagrams.json +70 -0
package/README.md
CHANGED
|
@@ -1,34 +1,61 @@
|
|
|
1
1
|
# @konitif/viewer-3d
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Workbench
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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.
|
|
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
|
+
}
|