You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Use `createInteractionController(canvas, renderer, { onHover, onLassoComplete })`.
78
-
- On lasso completion, keep the returned `SelectionResult` and (optionally) call:
79
-
- `await renderer.countSelection(result, { yieldEveryMs: 0 })` if you need an exact count without UI yielding.
80
-
81
-
4) Cleanup:
82
-
- On unmount/destroy: `controller.destroy(); renderer.destroy();`
83
-
84
-
Deliverables:
85
-
- The concrete code changes + file paths.
86
-
- A minimal example showing how to pass `Float32Array positions` (flat [x,y,x,y,...]) and optional `Uint16Array labels`.
43
+
You are a coding agent; integrate `hyper-scatter` in my repo: install `npm install hyper-scatter`; create `mountHyperScatter(canvas, params)` (or React hook) using `EuclideanWebGLCandidate`, `HyperbolicWebGLCandidate`, `Euclidean3DWebGLCandidate`, `Spherical3DWebGLCandidate`, `createDataset`, `createDataset3D`, and `createInteractionController`; choose renderer by `params.geometry` (`euclidean`, `poincare`, `euclidean3d`, `sphere`); ensure non-zero CSS size, then `const rect = canvas.getBoundingClientRect()` and `renderer.init(canvas, { width: Math.max(1, Math.floor(rect.width)), height: Math.max(1, Math.floor(rect.height)), devicePixelRatio: window.devicePixelRatio })`; set dataset with `createDataset` for 2D or `createDataset3D` for 3D, then `renderer.render()`; wire `createInteractionController(canvas, renderer, { onHover, onLassoComplete })` only for 2D and optionally call `await renderer.countSelection(result, { yieldEveryMs: 0 })` for exact lasso counts; cleanup with `controller?.destroy(); renderer.destroy();`; return concrete code changes + file paths + a minimal example passing `Float32Array` positions (`[x,y,...]` or `[x,y,z,...]`) and optional `Uint16Array` labels.
87
44
```
88
45
46
+
## API Highlights
47
+
48
+
Runtime updates (no renderer re-creation): `setPalette`, `setCategoryVisibility`, `setCategoryAlpha`, `setInteractionStyle`.
0 commit comments