Overlays.hotspots.clear ​

Contract 2.0.0 · package sha256 a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e · generated from configurator-runtime.d.ts by services/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.

Method of Overlays.hotspots · labs, @experimental · since 2.0.0 · called as session.overlays.hotspots.clear · optional: reach it through has()

ts
clear?(): void;

Removes every badge, as set([]) does, and as anchors.clear() removes the anchors. Sync. A terminal call: after destroy() it does nothing. Experimental, so optional in this declaration: call it as hotspots.clear?.(), or use the stable set([]).

Example ​

Imports: values (has, validate, the Holo*Error classes, the pure helpers) from @holostep-configurators/runtime-client, types from @holostep-configurators/runtime-client/contract, /math and /testing names from those entries; boot from the runtime module the root's loadRuntimeAtFloor resolves to. A type your page defines is your app's: declare it there, never import it from the package.

Compiled under the contract's strict settings (examples/declaration/13-Overlays.hotspots.clear.ts):

ts
import type { Session } from '@holostep-configurators/runtime-client/contract';
declare const session: Session;
declare const signal: AbortSignal;
session.overlays.hotspots.set([{ id: 'legs', at: { x: 0.9, y: 0.05, z: 0.4 }, label: 'Legs' }]);
// the panel that owned the badges closes
session.overlays.hotspots.clear?.();

Generic-API test (spec 3.1) ​

Rule Result
1. Neutral name pass: clear names no product
2. A precedent pass (through its owner Overlays.hotspots): Babylon.js SpriteManager (row K50); model-viewer (ar, camera-orbit, auto-rotate) (row K50)
3. Two apps, or labs labs (@experimental at a stable path, reached through has() or supports()): it graduates when a second app uses it; apps today: app-ddfb017681, app-fc07850558, app-fc306ec3dc
4. The cheaper fix first decided per need in Appendix B: rows K50 (through its owner Overlays.hotspots) at tier stable (a member only where no rule, data, asset or app code serves the need)