@selvajs/visualization 1.6.0-beta.9 → 1.6.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/dist/render.d.cts CHANGED
@@ -127,6 +127,17 @@ type RenderConfig = {
127
127
  * device with a phone-sized screen. Set it to force the tier on or off.
128
128
  */
129
129
  lowPower?: boolean;
130
+ /**
131
+ * Frames averaged while the camera rests, for soft shadows and clean edges. Needs the composer,
132
+ * so looks without AO or bloom skip it. Costs nothing while orbiting. Default 32, or 0 on a
133
+ * `lowPower` device; 0 turns it off.
134
+ */
135
+ idleRefineFrames?: number;
136
+ /**
137
+ * Orbit frames slower than this fade ambient occlusion out while the camera moves, its largest
138
+ * cost. Needs `idleRefineFrames` to fade back in. Default 22. 0 always does; `Infinity` never does.
139
+ */
140
+ lightOrbitFrameMs?: number;
130
141
  /** Default false — switches rendering from `renderer.render` to an EffectComposer, which costs more. */
131
142
  ambientOcclusion?: boolean;
132
143
  /** Glow around emissive parts. The look decides; `night` sets it. */
@@ -365,12 +376,13 @@ interface LabelLayer {
365
376
  dispose(): void;
366
377
  }
367
378
  /**
368
- * Two-click distance measurement. Click a point, click a second, read the distance off a label on
369
- * the connecting line; a third click starts fresh.
379
+ * Point-to-point distance measurement. Click a start point; a rubber band and live readout follow
380
+ * the cursor until the second click commits it. Committed measurements stay until Escape (which
381
+ * first drops an unfinished start point) or until the tool is disabled.
370
382
  *
371
- * Picking snaps to the nearest vertex within {@link MeasureOptions.snapPixels} so measurements
372
- * land exactly on vertices rather than wherever the ray happened to hit — a cheap local snap
373
- * against the struck primitive's own vertices, no spatial index.
383
+ * Picking snaps to the nearest vertex of the struck triangle, segment or point within
384
+ * {@link MeasureOptions.snapPixels}; the hover marker turns solid when it has snapped. Meshes are
385
+ * picked through a BVH (`scene-pick.ts`), so hovering stays cheap on large models.
374
386
  *
375
387
  * Dormant until {@link MeasureTool.setEnabled}(true). While enabled it intercepts clicks (caller
376
388
  * forwards them and swallows the event when {@link MeasureTool.handleClick} returns true) so
@@ -381,8 +393,10 @@ interface MeasureTool {
381
393
  isEnabled(): boolean;
382
394
  /** Returns true if the tool consumed the click (caller should not also select). */
383
395
  handleClick(event: MouseEvent): boolean;
384
- /** Preview the next snap point via a ghost marker. No-op when disabled; never consumes the event. */
396
+ /** Preview the next snap point and the rubber band. No-op when disabled; never consumes the event. */
385
397
  handleMove(event: MouseEvent): void;
398
+ /** Drops the unfinished start point, or every measurement when there is none. Bound to Escape. */
399
+ cancel(): void;
386
400
  clear(): void;
387
401
  dispose(): void;
388
402
  }
package/dist/render.d.ts CHANGED
@@ -127,6 +127,17 @@ type RenderConfig = {
127
127
  * device with a phone-sized screen. Set it to force the tier on or off.
128
128
  */
129
129
  lowPower?: boolean;
130
+ /**
131
+ * Frames averaged while the camera rests, for soft shadows and clean edges. Needs the composer,
132
+ * so looks without AO or bloom skip it. Costs nothing while orbiting. Default 32, or 0 on a
133
+ * `lowPower` device; 0 turns it off.
134
+ */
135
+ idleRefineFrames?: number;
136
+ /**
137
+ * Orbit frames slower than this fade ambient occlusion out while the camera moves, its largest
138
+ * cost. Needs `idleRefineFrames` to fade back in. Default 22. 0 always does; `Infinity` never does.
139
+ */
140
+ lightOrbitFrameMs?: number;
130
141
  /** Default false — switches rendering from `renderer.render` to an EffectComposer, which costs more. */
131
142
  ambientOcclusion?: boolean;
132
143
  /** Glow around emissive parts. The look decides; `night` sets it. */
@@ -365,12 +376,13 @@ interface LabelLayer {
365
376
  dispose(): void;
366
377
  }
367
378
  /**
368
- * Two-click distance measurement. Click a point, click a second, read the distance off a label on
369
- * the connecting line; a third click starts fresh.
379
+ * Point-to-point distance measurement. Click a start point; a rubber band and live readout follow
380
+ * the cursor until the second click commits it. Committed measurements stay until Escape (which
381
+ * first drops an unfinished start point) or until the tool is disabled.
370
382
  *
371
- * Picking snaps to the nearest vertex within {@link MeasureOptions.snapPixels} so measurements
372
- * land exactly on vertices rather than wherever the ray happened to hit — a cheap local snap
373
- * against the struck primitive's own vertices, no spatial index.
383
+ * Picking snaps to the nearest vertex of the struck triangle, segment or point within
384
+ * {@link MeasureOptions.snapPixels}; the hover marker turns solid when it has snapped. Meshes are
385
+ * picked through a BVH (`scene-pick.ts`), so hovering stays cheap on large models.
374
386
  *
375
387
  * Dormant until {@link MeasureTool.setEnabled}(true). While enabled it intercepts clicks (caller
376
388
  * forwards them and swallows the event when {@link MeasureTool.handleClick} returns true) so
@@ -381,8 +393,10 @@ interface MeasureTool {
381
393
  isEnabled(): boolean;
382
394
  /** Returns true if the tool consumed the click (caller should not also select). */
383
395
  handleClick(event: MouseEvent): boolean;
384
- /** Preview the next snap point via a ghost marker. No-op when disabled; never consumes the event. */
396
+ /** Preview the next snap point and the rubber band. No-op when disabled; never consumes the event. */
385
397
  handleMove(event: MouseEvent): void;
398
+ /** Drops the unfinished start point, or every measurement when there is none. Bound to Escape. */
399
+ cancel(): void;
386
400
  clear(): void;
387
401
  dispose(): void;
388
402
  }