@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/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[] = [];