Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

@dioramajs/model/hotspots

Exports of @dioramajs/model/hotspots.

View as Markdown
On this page
import { arrange, default, facing } from '@dioramajs/model/hotspots'

Functions

arrangeLays 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.
facingThe 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

defaultAnnotated 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

CalloutA label to place a card for, in the host's px: its point, its card and where that goes.

Types

SpotWhere a hotspot sits: a point in the file's coordinates, or a node of the file by name.