@biolibs/bionet-scene 0.1.0 → 0.3.0
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 +28 -0
- package/dist/arranging.d.ts +61 -0
- package/dist/arranging.d.ts.map +1 -0
- package/dist/arranging.js +67 -0
- package/dist/arranging.js.map +1 -0
- package/dist/builder.d.ts +27 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/builder.js +89 -0
- package/dist/builder.js.map +1 -0
- package/dist/explorer.d.ts +27 -1
- package/dist/explorer.d.ts.map +1 -1
- package/dist/explorer.js +32 -1
- package/dist/explorer.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/scene.d.ts +12 -2
- package/dist/scene.d.ts.map +1 -1
- package/dist/scene.js +43 -8
- package/dist/scene.js.map +1 -1
- package/dist/view.d.ts +2 -0
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +5 -0
- package/dist/view.js.map +1 -1
- package/package.json +2 -2
- package/scene.css +28 -3
- package/src/arranging.ts +82 -0
- package/src/builder.tsx +122 -0
- package/src/explorer.tsx +44 -1
- package/src/index.ts +4 -0
- package/src/scene.tsx +53 -9
- package/src/view.ts +6 -0
package/src/view.ts
CHANGED
|
@@ -103,6 +103,8 @@ export interface SceneView {
|
|
|
103
103
|
export interface ViewOptions {
|
|
104
104
|
/** Items a search has matched. Their boxes and tubes are drawn as found. */
|
|
105
105
|
matches?: ReadonlySet<string>;
|
|
106
|
+
/** Places to draw as needing attention, whatever else they are: standing in each other, or through a wall. */
|
|
107
|
+
attention?: ReadonlySet<string>;
|
|
106
108
|
/** What to call the whole lab in the crumbs. */
|
|
107
109
|
labName?: string;
|
|
108
110
|
/** The camera's vertical field of view, in degrees. */
|
|
@@ -191,6 +193,10 @@ export function sceneView(layout: Layout, focus: Focus, options: ViewOptions = {
|
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
195
|
|
|
196
|
+
if (options.attention !== undefined) {
|
|
197
|
+
for (const drawn of places) if (options.attention.has(drawn.id)) Object.assign(drawn, { tone: "attention", strength: 1 });
|
|
198
|
+
}
|
|
199
|
+
|
|
194
200
|
// The tubes and empty positions of the box being looked at.
|
|
195
201
|
const tubes: DrawnTube[] = [];
|
|
196
202
|
const empty: DrawnSlot[] = [];
|