@arkitektio/bsx 3.0.0 → 4.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/dist/bsx/language.d.ts.map +1 -1
- package/dist/bsx/language.js +4 -3
- package/dist/bsx/language.js.map +1 -1
- package/dist/bsx/references.d.ts +4 -2
- package/dist/bsx/references.d.ts.map +1 -1
- package/dist/bsx/references.js +34 -6
- package/dist/bsx/references.js.map +1 -1
- package/dist/catalogs/index.d.ts +27 -14
- package/dist/catalogs/index.d.ts.map +1 -1
- package/dist/catalogs/parts/index.d.ts +16 -3
- package/dist/catalogs/parts/index.d.ts.map +1 -1
- package/dist/catalogs/parts/run.d.ts +44 -4
- package/dist/catalogs/parts/run.d.ts.map +1 -1
- package/dist/catalogs/parts/run.js +33 -19
- package/dist/catalogs/parts/run.js.map +1 -1
- package/dist/catalogs/parts/scene.js +7 -7
- package/dist/catalogs/parts/scene.js.map +1 -1
- package/dist/catalogs/scene.d.ts +27 -14
- package/dist/catalogs/scene.d.ts.map +1 -1
- package/dist/catalogs/scene.js +3 -3
- package/dist/catalogs/scene.js.map +1 -1
- package/dist/renderer/bloks/run/components.d.ts +15 -2
- package/dist/renderer/bloks/run/components.d.ts.map +1 -1
- package/dist/renderer/bloks/run/components.js +118 -43
- package/dist/renderer/bloks/run/components.js.map +1 -1
- package/dist/renderer/bloks/run/host.d.ts +27 -8
- package/dist/renderer/bloks/run/host.d.ts.map +1 -1
- package/dist/renderer/bloks/run/host.js +8 -4
- package/dist/renderer/bloks/run/host.js.map +1 -1
- package/dist/renderer/bloks/run/index.d.ts +1 -1
- package/dist/renderer/bloks/run/index.d.ts.map +1 -1
- package/dist/renderer/bloks/run/index.js +1 -1
- package/dist/renderer/bloks/run/index.js.map +1 -1
- package/dist/renderer/bloks/run/math.d.ts +3 -20
- package/dist/renderer/bloks/run/math.d.ts.map +1 -1
- package/dist/renderer/bloks/run/math.js +4 -15
- package/dist/renderer/bloks/run/math.js.map +1 -1
- package/dist/renderer/bloks/scene/Scene.d.ts +16 -2
- package/dist/renderer/bloks/scene/Scene.d.ts.map +1 -1
- package/dist/renderer/bloks/scene/Scene.js +11 -3
- package/dist/renderer/bloks/scene/Scene.js.map +1 -1
- package/dist/scene.js +2 -2
- package/dist/scene.js.map +1 -1
- package/dist/spec/bsx_v2.json +277 -62
- package/dist/spec/catalogs/scene@1.json +93 -41
- package/dist/spec/catalogs/scene@1.json.js +93 -41
- package/dist/spec/catalogs.js +1 -1
- package/dist/spec/catalogs.js.map +1 -1
- package/dist/spec/vocabulary.d.ts +1 -1
- package/dist/spec/vocabulary.d.ts.map +1 -1
- package/dist/spec/vocabulary.js +1 -1
- package/dist/spec/vocabulary.js.map +1 -1
- package/dist/spec/vocabulary.json +4 -4
- package/dist/spec/vocabulary.json.js +4 -4
- package/package.json +1 -1
- package/src/bsx/language.test.ts +1 -0
- package/src/bsx/language.ts +4 -3
- package/src/bsx/references.ts +42 -7
- package/src/catalogs/parts/run.ts +39 -19
- package/src/catalogs/parts/scene.ts +7 -7
- package/src/catalogs/scene.ts +3 -3
- package/src/renderer/bloks/run/components.tsx +233 -103
- package/src/renderer/bloks/run/host.tsx +38 -12
- package/src/renderer/bloks/run/index.ts +1 -1
- package/src/renderer/bloks/run/math.test.ts +1 -24
- package/src/renderer/bloks/run/math.ts +5 -33
- package/src/renderer/bloks/run/run.test.tsx +44 -38
- package/src/renderer/bloks/run/space.test.tsx +51 -0
- package/src/renderer/bloks/scene/Scene.tsx +22 -4
- package/src/scene.ts +2 -2
- package/src/spec/bsx_v2.json +277 -62
- package/src/spec/catalogs/scene@1.json +93 -41
- package/src/spec/catalogs.ts +1 -1
- package/src/spec/vocabulary.json +4 -4
- package/src/spec/vocabulary.ts +2 -2
|
@@ -1,22 +1,75 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
import { Line } from '@react-three/drei';
|
|
5
|
-
import {
|
|
4
|
+
import { Line, TransformControls } from '@react-three/drei';
|
|
5
|
+
import { Move3d } from 'lucide-react';
|
|
6
|
+
import { placedSchema, routeSchema, spaceSchema } from '../../../catalogs/parts/run.js';
|
|
7
|
+
import { fromMatrix4, toMatrix4 } from '../../../vendor/core/model/affine.js';
|
|
8
|
+
import { Button } from '../../../vendor/core/ui/button.js';
|
|
6
9
|
import { useBlok, useValue } from '../../runtime/index.js';
|
|
7
|
-
import { ModelProvider, useOwnedModel, useSceneNotice
|
|
10
|
+
import { ModelProvider, SceneOwnerProvider, useOwnedModel, useSceneNotice } from '../scene/context.js';
|
|
8
11
|
import { FALLBACK_SCENE_RGB, useThemeColour } from '../scene/colour.js';
|
|
9
|
-
import { useBlokSceneEmbedded } from '../scene/host.js';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
+
import { BlokSceneInertProvider, useBlokSceneEmbedded, useBlokSceneStill } from '../scene/host.js';
|
|
13
|
+
import { SceneFrame } from '../scene/Scene.js';
|
|
14
|
+
import { useBlokRunHost, useBlokSpaceHost } from './host.js';
|
|
15
|
+
import { progressFraction, routePoints, splitRoute, throughKeys } from './math.js';
|
|
12
16
|
/**
|
|
13
|
-
* The components
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* and `Route` draws a line through several.
|
|
17
|
+
* The components that place an action's dependencies in 3D (scene@1). `Space`
|
|
18
|
+
* is a scene whose layout is a shared room, `Placed` draws the agent a
|
|
19
|
+
* dependency is bound to with that agent's own scene blok where the room keeps
|
|
20
|
+
* it, and `Route` draws a line through several.
|
|
17
21
|
*/
|
|
18
22
|
const Children = ({ component, buildChild }) => (_jsx(_Fragment, { children: (component.children ?? []).map(child => (_jsx(React.Fragment, { children: buildChild(child.id) }, child.id))) }));
|
|
19
|
-
const
|
|
23
|
+
const NO_ROOM_CONTEXT = {
|
|
24
|
+
room: { poseOf: () => null },
|
|
25
|
+
arranging: false,
|
|
26
|
+
standing: new Map(),
|
|
27
|
+
stand: () => undefined,
|
|
28
|
+
};
|
|
29
|
+
const RoomContext = React.createContext(NO_ROOM_CONTEXT);
|
|
30
|
+
const useRoom = () => React.useContext(RoomContext);
|
|
31
|
+
const samePose = (a, b) => JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
32
|
+
const RoomProvider = ({ room, arranging, children }) => {
|
|
33
|
+
const [standing, setStanding] = React.useState(() => new Map());
|
|
34
|
+
const stand = React.useCallback((agentId, pose) => {
|
|
35
|
+
setStanding(previous => {
|
|
36
|
+
if (samePose(previous.get(agentId), pose))
|
|
37
|
+
return previous;
|
|
38
|
+
const next = new Map(previous);
|
|
39
|
+
if (pose === null)
|
|
40
|
+
next.delete(agentId);
|
|
41
|
+
else
|
|
42
|
+
next.set(agentId, pose);
|
|
43
|
+
return next;
|
|
44
|
+
});
|
|
45
|
+
}, []);
|
|
46
|
+
const value = React.useMemo(() => ({ room, arranging, standing, stand }), [room, arranging, standing, stand]);
|
|
47
|
+
return _jsx(RoomContext.Provider, { value: value, children: children });
|
|
48
|
+
};
|
|
49
|
+
const ArrangeToggle = ({ arranging, onChange }) => (_jsx("div", { className: "pointer-events-auto absolute bottom-2 left-2 z-10", children: _jsxs(Button, { size: "sm", variant: arranging ? 'default' : 'outline', onClick: () => onChange(!arranging), title: arranging ? 'Done: devices stay where you left them, for everyone' : 'Move the devices of this room', children: [_jsx(Move3d, { className: "size-4" }), arranging ? 'Done' : 'Arrange'] }) }));
|
|
50
|
+
/** Says so when a `Space` names no room. Rendered inside the scene: a notice needs the scene's store, which the frame opens. */
|
|
51
|
+
const RoomNotice = ({ reference }) => {
|
|
52
|
+
useSceneNotice(reference ? null : 'A space without a room', 'Name the room (`room="room:lab"`): where devices stand is kept by it.');
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
55
|
+
const SpaceRender = ({ component, buildChild }) => {
|
|
56
|
+
const blok = useBlok(component, spaceSchema);
|
|
57
|
+
const reference = useValue(blok.room) ?? '';
|
|
58
|
+
const room = useBlokSpaceHost().useRoom(reference);
|
|
59
|
+
const still = useBlokSceneStill();
|
|
60
|
+
const [arranging, setArranging] = React.useState(false);
|
|
61
|
+
// Only a room the viewer may keep can be arranged, and never while viewing the past.
|
|
62
|
+
const canArrange = room.save !== undefined && !still;
|
|
63
|
+
const moving = arranging && canArrange;
|
|
64
|
+
const children = (_jsxs(RoomProvider, { room: room, arranging: moving, children: [_jsx(RoomNotice, { reference: reference }), _jsx(BlokSceneInertProvider, { value: moving, children: _jsx(Children, { component: component, buildChild: buildChild }) })] }));
|
|
65
|
+
// Inside a scene that is already open, this one only adds what it holds.
|
|
66
|
+
if (useBlokSceneEmbedded())
|
|
67
|
+
return children;
|
|
68
|
+
return (_jsx(SceneFrame, { component: component, buildChild: buildChild, overlay: canArrange ? _jsx(ArrangeToggle, { arranging: moving, onChange: setArranging }) : null, children: children }));
|
|
69
|
+
};
|
|
70
|
+
/* -------------------------------------------------------------------------- */
|
|
71
|
+
/* Placed devices */
|
|
72
|
+
/* -------------------------------------------------------------------------- */
|
|
20
73
|
const EMPTY_REPORT = {
|
|
21
74
|
ref: '',
|
|
22
75
|
size: 0,
|
|
@@ -28,51 +81,72 @@ const EMPTY_REPORT = {
|
|
|
28
81
|
};
|
|
29
82
|
/**
|
|
30
83
|
* What stands in for a device whose model is not in the scene (yet): its
|
|
31
|
-
*
|
|
32
|
-
* `node` then works on the
|
|
84
|
+
* group, with no nodes to bind and nothing to click. A binding without a
|
|
85
|
+
* `node` then works on the group; one naming a node reports it missing.
|
|
33
86
|
*/
|
|
34
87
|
const standInModel = (root) => ({
|
|
35
88
|
instance: { root, nodes: new Map(), rest: new Map(), clips: [], report: EMPTY_REPORT },
|
|
36
89
|
addClickable: () => () => undefined,
|
|
37
90
|
});
|
|
38
|
-
|
|
39
|
-
|
|
91
|
+
const isPoseRows = (value) => Array.isArray(value) &&
|
|
92
|
+
value.length === 4 &&
|
|
93
|
+
value.every(row => Array.isArray(row) && row.length === 4 && row.every(cell => typeof cell === 'number' && Number.isFinite(cell)));
|
|
94
|
+
const IDENTITY = [
|
|
95
|
+
[1, 0, 0, 0],
|
|
96
|
+
[0, 1, 0, 0],
|
|
97
|
+
[0, 0, 1, 0],
|
|
98
|
+
[0, 0, 0, 1],
|
|
99
|
+
];
|
|
100
|
+
/** One agent a dependency is bound to: drawn by its own scene blok where the room keeps it, its children bound to its model. */
|
|
101
|
+
const PlacedAgent = ({ agent, dependency, declared, blokName, children, }) => {
|
|
102
|
+
const { room, arranging, stand } = useRoom();
|
|
103
|
+
const space = useBlokSpaceHost();
|
|
104
|
+
const kept = room.poseOf(agent.id);
|
|
105
|
+
const pose = kept ?? (isPoseRows(declared) ? declared : IDENTITY);
|
|
106
|
+
const poseKey = JSON.stringify(pose);
|
|
107
|
+
// Keyed by value: a room re-read around the same pose moves nothing.
|
|
108
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
109
|
+
const matrix = React.useMemo(() => toMatrix4(pose), [poseKey]);
|
|
110
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
111
|
+
React.useEffect(() => stand(agent.id, pose), [agent.id, poseKey, stand]);
|
|
112
|
+
React.useEffect(() => () => stand(agent.id, null), [agent.id, stand]);
|
|
40
113
|
const [group, setGroup] = React.useState(null);
|
|
114
|
+
const dragging = React.useRef(false);
|
|
41
115
|
React.useLayoutEffect(() => {
|
|
42
|
-
|
|
43
|
-
|
|
116
|
+
// While the gizmo holds the group it is the gizmo's; the save on release brings the pose back.
|
|
117
|
+
if (!group || dragging.current)
|
|
118
|
+
return;
|
|
119
|
+
matrix.decompose(group.position, group.quaternion, group.scale);
|
|
44
120
|
}, [group, matrix]);
|
|
45
121
|
const device = useOwnedModel(agent.id);
|
|
46
122
|
const standIn = React.useMemo(() => (group ? standInModel(group) : null), [group]);
|
|
47
123
|
const model = device ?? standIn;
|
|
48
|
-
return (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
mode: 'panel',
|
|
59
|
-
title: agent.name,
|
|
60
|
-
description: `Not placed in this space (${dependency})`,
|
|
61
|
-
content: null,
|
|
62
|
-
});
|
|
63
|
-
return (_jsx(BlokTrayProvider, { value: agent.name, children: _jsx(ModelProvider, { value: model, children: children }) }));
|
|
124
|
+
return (_jsxs(_Fragment, { children: [_jsxs("group", { ref: setGroup, name: `placed:${dependency}:${agent.id}`, children: [_jsx(SceneOwnerProvider, { value: agent.id, children: space.renderAgent(agent.id, blokName) }), model ? _jsx(ModelProvider, { value: model, children: children }) : null] }), arranging && room.save && group ? (_jsx(TransformControls, { object: group, mode: "translate", size: 0.7, onMouseDown: () => {
|
|
125
|
+
dragging.current = true;
|
|
126
|
+
}, onMouseUp: () => {
|
|
127
|
+
dragging.current = false;
|
|
128
|
+
group.updateMatrix();
|
|
129
|
+
// A click on the gizmo that moved nothing has nothing to keep.
|
|
130
|
+
if (group.matrix.equals(matrix))
|
|
131
|
+
return;
|
|
132
|
+
room.save?.(agent, dependency, fromMatrix4(group.matrix));
|
|
133
|
+
} })) : null] }));
|
|
64
134
|
};
|
|
65
|
-
const
|
|
66
|
-
const blok = useBlok(component,
|
|
135
|
+
const PlacedRender = ({ component, buildChild }) => {
|
|
136
|
+
const blok = useBlok(component, placedSchema);
|
|
67
137
|
const dependency = useValue(blok.dep);
|
|
138
|
+
const blokName = useValue(blok.blok) ?? null;
|
|
139
|
+
const declared = useValue(blok.matrix);
|
|
68
140
|
const run = useBlokRunHost();
|
|
69
|
-
const space = useBlokSpaceHost();
|
|
70
141
|
const agents = React.useMemo(() => (dependency ? run.agentsFor(dependency) : []), [dependency, run]);
|
|
71
|
-
const anchors = React.useMemo(() => resolveAnchors(agents, space.placementOf), [agents, space]);
|
|
72
142
|
useSceneNotice(dependency && agents.length === 0 ? `Nothing is bound to "${dependency}"` : null, 'The run has no agent for this dependency, so nothing is drawn for it.');
|
|
143
|
+
useSceneNotice(declared !== undefined && declared !== null && !isPoseRows(declared) ? 'A placement that is not a matrix' : null, `"${dependency}" stands at the room's origin: its matrix is not four rows of four numbers.`);
|
|
73
144
|
const children = _jsx(Children, { component: component, buildChild: buildChild });
|
|
74
|
-
return (
|
|
145
|
+
return (_jsx(_Fragment, { children: agents.map(agent => (_jsx(PlacedAgent, { agent: agent, dependency: dependency ?? '', declared: declared, blokName: blokName, children: children }, agent.id))) }));
|
|
75
146
|
};
|
|
147
|
+
/* -------------------------------------------------------------------------- */
|
|
148
|
+
/* Route */
|
|
149
|
+
/* -------------------------------------------------------------------------- */
|
|
76
150
|
const ROUTE_COLOR = 'chart-1';
|
|
77
151
|
/** Corners as plain triples: `Line` reads a Vector3 by `instanceof`, which a second copy of three fails. */
|
|
78
152
|
const triples = (points) => points.map(point => [point.x, point.y, point.z]);
|
|
@@ -82,18 +156,19 @@ const RouteRender = ({ component }) => {
|
|
|
82
156
|
const progress = useValue(blok.progress) ?? undefined;
|
|
83
157
|
const color = useThemeColour(useValue(blok.color) || ROUTE_COLOR) ?? FALLBACK_SCENE_RGB;
|
|
84
158
|
const run = useBlokRunHost();
|
|
85
|
-
const
|
|
159
|
+
const { standing } = useRoom();
|
|
86
160
|
const keys = React.useMemo(() => throughKeys(through), [through]);
|
|
87
|
-
const
|
|
161
|
+
const placementOf = React.useCallback((agentId) => standing.get(agentId) ?? null, [standing]);
|
|
162
|
+
const points = React.useMemo(() => routePoints(keys, run.agentsFor, placementOf), [keys, run, placementOf]);
|
|
88
163
|
const split = React.useMemo(() => splitRoute(points, progress === undefined ? 1 : progressFraction(progress)), [points, progress]);
|
|
89
|
-
useSceneNotice(keys.length >= 2 && points.length < 2 ? 'A route with nowhere to go' : null, `Fewer than two of ${keys.join(', ')}
|
|
164
|
+
useSceneNotice(keys.length >= 2 && points.length < 2 ? 'A route with nowhere to go' : null, `Fewer than two of ${keys.join(', ')} are placed in this space.`);
|
|
90
165
|
if (!split.head)
|
|
91
166
|
return null;
|
|
92
167
|
return (_jsxs("group", { name: "route", children: [split.travelled.length >= 2 ? _jsx(Line, { points: triples(split.travelled), color: color, lineWidth: 3 }) : null, split.ahead.length >= 2 && progress !== undefined ? (_jsx(Line, { points: triples(split.ahead), color: color, lineWidth: 2, dashed: true, dashSize: 0.04, gapSize: 0.03, transparent: true, opacity: 0.5 })) : null, progress !== undefined ? (_jsxs("mesh", { position: split.head, raycast: () => null, children: [_jsx("sphereGeometry", { args: [0.02, 16, 16] }), _jsx("meshBasicMaterial", { color: color, toneMapped: false })] })) : null] }));
|
|
93
168
|
};
|
|
94
169
|
export const runRenders = {
|
|
95
|
-
|
|
96
|
-
|
|
170
|
+
Space: SpaceRender,
|
|
171
|
+
Placed: PlacedRender,
|
|
97
172
|
Route: RouteRender,
|
|
98
173
|
};
|
|
99
174
|
//# sourceMappingURL=components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/components.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,YAAY,EAAE,WAAW,EAAoB,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAuC,MAAM,eAAe,CAAC;AACtF,OAAO,EAAC,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAyB,MAAM,kBAAkB,CAAC;AACvH,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAoB,MAAM,QAAQ,CAAC;AAC7F,OAAO,EAAC,gBAAgB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AAM,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,aAC7C,yBAAgB,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,GAAI,EACxC,4BAAmB,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,GAAI,IACjD,CACR,CAAC,CAAC,CAAC,IAAI,IACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,WAAW;CACnB,CAAC"}
|
|
@@ -2,10 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* What an action's own blok needs from the app that shows a run of it.
|
|
4
4
|
*
|
|
5
|
-
* The blok core draws `
|
|
6
|
-
* agents a run got,
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* The blok core draws `Space`, `Placed`, `Route` and `ask`; it does not know
|
|
6
|
+
* which agents a run got, how an agent's own scene blok is found, where a room
|
|
7
|
+
* keeps its devices, or how an ask is answered. The host answers those through
|
|
8
|
+
* these contexts: the run (rekuest, from the task or a dry run) and the rooms
|
|
9
|
+
* (rekuest's spaces, kept on the server).
|
|
9
10
|
*
|
|
10
11
|
* Both are provided around the scene surface, not inside the canvas: a
|
|
11
12
|
* `Popout`'s card is rendered by the scene's HTML half, outside the blok.
|
|
@@ -23,13 +24,31 @@ export type BlokRunHost = {
|
|
|
23
24
|
};
|
|
24
25
|
export declare const BlokRunHostProvider: React.Provider<BlokRunHost>;
|
|
25
26
|
export declare const useBlokRunHost: () => BlokRunHost;
|
|
27
|
+
/** A 4x4 affine as four rows, in meters with Y up: what a room keeps per device. */
|
|
28
|
+
export type BlokPose = number[][];
|
|
26
29
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
30
|
+
* One room as the host keeps it: where people left its devices. Shared, so a
|
|
31
|
+
* device moved by one viewer stands there for every other.
|
|
29
32
|
*/
|
|
33
|
+
export type BlokRoom = {
|
|
34
|
+
/** Where someone left the agent in this room; null where nobody moved it (its `Placed` decides). */
|
|
35
|
+
poseOf: (agentId: string) => BlokPose | null;
|
|
36
|
+
/**
|
|
37
|
+
* Keep where the agent stands now, for everyone; `dependency` is the key it
|
|
38
|
+
* was placed under. Absent where the viewer may not arrange the room.
|
|
39
|
+
*/
|
|
40
|
+
save?: (agent: BlokRunAgent, dependency: string, pose: BlokPose) => void;
|
|
41
|
+
/** Forget where the agent was left, so its `Placed` decides again. */
|
|
42
|
+
reset?: (agent: BlokRunAgent) => void;
|
|
43
|
+
};
|
|
30
44
|
export type BlokSpaceHost = {
|
|
31
|
-
/** The
|
|
32
|
-
|
|
45
|
+
/** The room a `Space` names (`room="room:helsinki-lab"`). A hook. */
|
|
46
|
+
useRoom: (room: string) => BlokRoom;
|
|
47
|
+
/**
|
|
48
|
+
* Draw the agent with its own scene blok, inside the scene that is open: its
|
|
49
|
+
* default scene blok, or the one named. Nothing where it has none.
|
|
50
|
+
*/
|
|
51
|
+
renderAgent: (agentId: string, blok: string | null) => React.ReactNode;
|
|
33
52
|
};
|
|
34
53
|
export declare const BlokSpaceHostProvider: React.Provider<BlokSpaceHost>;
|
|
35
54
|
export declare const useBlokSpaceHost: () => BlokSpaceHost;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;;GAWG;AAEH,gDAAgD;AAChD,MAAM,MAAM,YAAY,GAAG;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,I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HostContext = React.createContext(DETACHED_RUN);
|
|
8
8
|
export const BlokRunHostProvider = BlokRunHostContext.Provider;
|
|
9
9
|
export const useBlokRunHost = () => React.useContext(BlokRunHostContext);
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const NO_ROOM = { poseOf: () => null };
|
|
11
|
+
const DETACHED_SPACE = {
|
|
12
|
+
useRoom: () => NO_ROOM,
|
|
13
|
+
renderAgent: () => null,
|
|
14
|
+
};
|
|
15
|
+
const BlokSpaceHostContext = React.createContext(DETACHED_SPACE);
|
|
12
16
|
export const BlokSpaceHostProvider = BlokSpaceHostContext.Provider;
|
|
13
17
|
export const useBlokSpaceHost = () => React.useContext(BlokSpaceHostContext);
|
|
14
18
|
/**
|
|
15
|
-
* Set
|
|
16
|
-
*
|
|
19
|
+
* Set where what would point at a device has nothing to point at: a `Popout`
|
|
20
|
+
* then shows in the side tray instead, under this title.
|
|
17
21
|
*/
|
|
18
22
|
const BlokTrayContext = React.createContext(null);
|
|
19
23
|
export const BlokTrayProvider = BlokTrayContext.Provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,MAAM,SAAS,GAA4B,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE7D,MAAM,YAAY,GAAgB;IAChC,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS;IAC1B,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI;CACtB,CAAC;AAEF,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAc,YAAY,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,QAAQ,CAAC;AAE/D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAgB,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;AA+BtF,MAAM,OAAO,GAAa,EAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,EAAC,CAAC;AAE/C,MAAM,cAAc,GAAkB;IACpC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO;IACtB,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI;CACxB,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAgB,cAAc,CAAC,CAAC;AAEhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AAEnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAkB,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAE5F;;;GAGG;AACH,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAgB,IAAI,CAAC,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAC,QAAQ,CAAC;AAEzD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAkB,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { runRenders } from './components';
|
|
2
2
|
export * from './host';
|
|
3
|
-
export { progressFraction,
|
|
3
|
+
export { progressFraction, routePoints, splitRoute, throughKeys } from './math';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { runRenders } from './components.js';
|
|
2
2
|
export * from './host.js';
|
|
3
|
-
export { progressFraction,
|
|
3
|
+
export { progressFraction, routePoints, splitRoute, throughKeys } from './math.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC"}
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
2
|
import type { BlokRunAgent } from './host';
|
|
3
3
|
/**
|
|
4
|
-
* Where the agents of a run stand in the
|
|
5
|
-
*
|
|
6
|
-
* without a canvas.
|
|
4
|
+
* Where the agents of a run stand in the room a `Space` keeps: pure, so the
|
|
5
|
+
* line of a `Route` is worked out (and tested) without a canvas.
|
|
7
6
|
*/
|
|
8
|
-
/** An agent the space places, at its placement's matrix. */
|
|
9
|
-
export type PlacedRunAgent = {
|
|
10
|
-
agent: BlokRunAgent;
|
|
11
|
-
matrix: Matrix4;
|
|
12
|
-
};
|
|
13
|
-
export type RunAnchors = {
|
|
14
|
-
/** The agents bound to the key that stand in the space, in binding order. */
|
|
15
|
-
placed: PlacedRunAgent[];
|
|
16
|
-
/** The agents bound to the key the space does not place: shown in the side tray. */
|
|
17
|
-
unplaced: BlokRunAgent[];
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Where an `<At dependency=key>` draws: at every agent the run binds the key
|
|
21
|
-
* to that the space places, and in the tray for every one it does not.
|
|
22
|
-
*/
|
|
23
|
-
export declare const resolveAnchors: (agents: readonly BlokRunAgent[], placementOf: (agentId: string) => unknown) => RunAnchors;
|
|
24
7
|
/**
|
|
25
8
|
* The dependency keys a `through` names: a list, or the text BSX writes for
|
|
26
9
|
* one (`"['robot', 'frame']"`, `'["robot"]'`, `"robot, frame"`), read as the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/math.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/math.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEzC;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,MAAM,EASlD,CAAC;AAIF,wGAAwG;AACxG,eAAO,MAAM,UAAU,OAAO,CAAC;AAE/B;;;;GAIG;AACH,eAAO,MAAM,WAAW,GACtB,MAAM,SAAS,MAAM,EAAE,EACvB,WAAW,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,YAAY,EAAE,EACnD,aAAa,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,KACxC,OAAO,EAMN,CAAC;AAEL,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,GAAI,UAAU,OAAO,KAAG,MAGpD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,6DAA6D;IAC7D,SAAS,EAAE,OAAO,EAAE,CAAC;IACrB,2DAA2D;IAC3D,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,kFAAkF;IAClF,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,UAAU,GAAI,QAAQ,SAAS,OAAO,EAAE,EAAE,UAAU,MAAM,KAAG,UAoBzE,CAAC"}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
2
|
import { toMatrix4 } from '../../../vendor/core/model/affine.js';
|
|
3
|
-
const isPlaced = (affine) => affine !== null && affine !== undefined;
|
|
4
3
|
/**
|
|
5
|
-
* Where
|
|
6
|
-
*
|
|
4
|
+
* Where the agents of a run stand in the room a `Space` keeps: pure, so the
|
|
5
|
+
* line of a `Route` is worked out (and tested) without a canvas.
|
|
7
6
|
*/
|
|
8
|
-
export const resolveAnchors = (agents, placementOf) => {
|
|
9
|
-
const anchors = { placed: [], unplaced: [] };
|
|
10
|
-
for (const agent of agents) {
|
|
11
|
-
const affine = placementOf(agent.id);
|
|
12
|
-
if (isPlaced(affine))
|
|
13
|
-
anchors.placed.push({ agent, matrix: toMatrix4(affine) });
|
|
14
|
-
else
|
|
15
|
-
anchors.unplaced.push(agent);
|
|
16
|
-
}
|
|
17
|
-
return anchors;
|
|
18
|
-
};
|
|
19
7
|
/**
|
|
20
8
|
* The dependency keys a `through` names: a list, or the text BSX writes for
|
|
21
9
|
* one (`"['robot', 'frame']"`, `'["robot"]'`, `"robot, frame"`), read as the
|
|
@@ -34,6 +22,7 @@ export const throughKeys = (value) => {
|
|
|
34
22
|
.map(item => item.trim().replace(/^['"]+|['"]+$/g, '').trim())
|
|
35
23
|
.filter(item => item !== '');
|
|
36
24
|
};
|
|
25
|
+
const isPlaced = (affine) => affine !== null && affine !== undefined;
|
|
37
26
|
/** How far above a placement's origin the route runs, in meters: over the floor, under most devices. */
|
|
38
27
|
export const ROUTE_LIFT = 0.05;
|
|
39
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/math.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../../../src/renderer/bloks/run/math.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAG5D;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAY,EAAE;IACtD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACxH,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzC,IAAI,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IACzB,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7E,OAAO,KAAK;SACT,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC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AAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;YAClE,OAAO;gBACL,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;gBACpF,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;gBAC7E,IAAI;aACL,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,MAAM,CAAC;IACnB,CAAC;IACD,OAAO,EAAC,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;AAChD,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type BlokRender } from '../../runtime';
|
|
3
|
-
import type
|
|
2
|
+
import { type BlokRender, type BlokRenderArgs } from '../../runtime';
|
|
3
|
+
import { type sceneContracts } from '../../../catalogs/parts/scene';
|
|
4
4
|
import { type SceneView } from './context';
|
|
5
5
|
/**
|
|
6
6
|
* Points the camera at what is in the scene.
|
|
@@ -44,6 +44,20 @@ type SceneSurfaceProps = {
|
|
|
44
44
|
*/
|
|
45
45
|
export declare const SceneSurface: ({ view, grid, className, style, frameRef, onPointerMissed, overlay, children, pose, onPoseChange, }: SceneSurfaceProps) => React.JSX.Element;
|
|
46
46
|
type Contracts = typeof sceneContracts;
|
|
47
|
+
type SceneRenderArgs = BlokRenderArgs<Contracts['Scene']['schema']>;
|
|
48
|
+
export type SceneFrameProps = Pick<SceneRenderArgs, 'component' | 'buildChild'> & {
|
|
49
|
+
/** HTML over the canvas (beside the scene's own controls). */
|
|
50
|
+
overlay?: React.ReactNode;
|
|
51
|
+
/** What the scene holds; the component's children when left out. */
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* A scene with a canvas of its own, sized and kept as a `Scene` asks: its
|
|
56
|
+
* camera, grid, height and (with `persist`) the viewer's camera on this device.
|
|
57
|
+
* A `Space` is one too, with its room around what it holds. The props are read
|
|
58
|
+
* through the scene schema, which every such root extends.
|
|
59
|
+
*/
|
|
60
|
+
export declare const SceneFrame: ({ component, buildChild, overlay, children }: SceneFrameProps) => React.JSX.Element;
|
|
47
61
|
export declare const SceneRender: BlokRender<Contracts['Scene']>;
|
|
48
62
|
export {};
|
|
49
63
|
//# sourceMappingURL=Scene.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scene.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/scene/Scene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,EAKL,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"Scene.d.ts","sourceRoot":"","sources":["../../../../src/renderer/bloks/scene/Scene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAc,KAAK,cAAc,EAAC,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,WAAW,CAAC;AAsBnB;;;;;;;GAOG;AACH,gFAAgF;AAChF,MAAM,MAAM,SAAS,GAAG;IAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,CAAC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EF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,8CAA4C,eAAe,sBAqCrF,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAOpD,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitl
|
|
|
11
11
|
import { cn } from '../../../vendor/core/util/utils.js';
|
|
12
12
|
import { Switch } from '../../../vendor/core/ui/switch.js';
|
|
13
13
|
import { BlokNodeErrorSurface, useBlok, useValue, } from '../../runtime/index.js';
|
|
14
|
+
import { sceneSchema } from '../../../catalogs/parts/scene.js';
|
|
14
15
|
import { createSceneStore, SceneStoreProvider, useSceneNotice, useSceneState, useSceneStoreApi, } from './context.js';
|
|
15
16
|
import { BlokSceneEmbedProvider, useBlokSceneEmbedded, useBlokSceneFill } from './host.js';
|
|
16
17
|
import { useKeepTabLive } from "../../../platform.js";
|
|
@@ -414,8 +415,14 @@ export const SceneSurface = ({ view = 'iso', grid = true, className, style, fram
|
|
|
414
415
|
}, children: _jsx(SceneStoreProvider, { value: store, children: _jsx(BlokNodeErrorSurface.Provider, { value: SceneErrorSurface, children: _jsxs(BlokSceneEmbedProvider, { value: true, children: [_jsx("ambientLight", { intensity: 0.7 }), _jsx("directionalLight", { position: [2, 4, 3], intensity: 1.6 }), _jsx("directionalLight", { position: [-3, 2, -2], intensity: 0.5 }), _jsx(SceneGrid, {}), _jsx(SceneOrbitControls, {}), _jsx(CameraRig, { pose: pose }), onPoseChange ? _jsx(PoseKeeper, { onPoseChange: onPoseChange }) : null, children, _jsx(OverlayTracker, { cards: cards }), snapshot && _jsx(FirstFrames, {})] }) }) }) }), _jsx(SceneOverlays, { cards: cards }), _jsx(SceneControls, {}), overlay] }) }));
|
|
415
416
|
};
|
|
416
417
|
const SceneChildren = ({ component, buildChild }) => (_jsx(_Fragment, { children: (component.children ?? []).map(child => (_jsx(React.Fragment, { children: buildChild(child.id) }, child.id))) }));
|
|
417
|
-
|
|
418
|
-
|
|
418
|
+
/**
|
|
419
|
+
* A scene with a canvas of its own, sized and kept as a `Scene` asks: its
|
|
420
|
+
* camera, grid, height and (with `persist`) the viewer's camera on this device.
|
|
421
|
+
* A `Space` is one too, with its room around what it holds. The props are read
|
|
422
|
+
* through the scene schema, which every such root extends.
|
|
423
|
+
*/
|
|
424
|
+
export const SceneFrame = ({ component, buildChild, overlay, children }) => {
|
|
425
|
+
const blok = useBlok(component, sceneSchema);
|
|
419
426
|
const camera = useValue(blok.camera) ?? 'iso';
|
|
420
427
|
const grid = useValue(blok.grid) ?? true;
|
|
421
428
|
const declaredHeight = useValue(blok.height);
|
|
@@ -437,8 +444,9 @@ const StandaloneScene = ({ component, schema, buildChild }) => {
|
|
|
437
444
|
// A kept pose is read before the scene starts: it starts where the viewer left it.
|
|
438
445
|
if (!kept.loaded)
|
|
439
446
|
return _jsx("div", { ref: frameRef, className: "relative w-full", style: { height } });
|
|
440
|
-
return (_jsx(SceneSurface, { view: camera, grid: grid, pose: kept.initial, onPoseChange: persist ? kept.save : undefined, frameRef: frameRef, className: fill ? 'relative w-full overflow-hidden' : 'relative w-full overflow-hidden rounded-xl bg-muted/20', style: { height }, children: _jsx(SceneChildren, { component: component, buildChild: buildChild }) }));
|
|
447
|
+
return (_jsx(SceneSurface, { view: camera, grid: grid, pose: kept.initial, onPoseChange: persist ? kept.save : undefined, frameRef: frameRef, className: fill ? 'relative w-full overflow-hidden' : 'relative w-full overflow-hidden rounded-xl bg-muted/20', style: { height }, overlay: overlay, children: children ?? _jsx(SceneChildren, { component: component, buildChild: buildChild }) }));
|
|
441
448
|
};
|
|
449
|
+
const StandaloneScene = ({ component, buildChild }) => (_jsx(SceneFrame, { component: component, buildChild: buildChild }));
|
|
442
450
|
export const SceneRender = args =>
|
|
443
451
|
// Inside a scene that is already open, this one only adds what it holds:
|
|
444
452
|
// the camera, grid and size are the surrounding scene's.
|