@dioramajs/model/hotspots
Exports of @dioramajs/model/hotspots.
On this page
import { arrange, default, facing } from '@dioramajs/model/hotspots'Functions
arrange | Lays out the cards of callouts on a model that spans `left` to `right` in a `width` × `height` host: each on the side of the model its point is on, just past the model's edge but inside the host, and on each side spread up and down so no two cards overlap. |
facing | The model's own yaw and pitch (radians) that turn the direction `d`, given in the model's space before its rotation, towards the viewer: `pivot.rotation.set(pitch, yaw, 0)` brings it to +z. |
parseAt | `data-dio-at`: "x y z" in the file's units, or a node name. |
Constants
default | Annotated points on a `model`: the `[data-dio-at]` children of the element follow their points as the model inside it turns, turn away with the back of the model and stay real, focusable DOM. It goes on a parent of the model element, because a drawn model element hides its children. |
Interfaces
Callout | A label to place a card for, in the host's px: its point, its card and where that goes. |
Types
Spot | Where a hotspot sits: a point in the file's coordinates, or a node of the file by name. |