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/data/map

Exports of @dioramajs/data/map.

View as Markdown
On this page
import { default, dotGrid, project } from '@dioramajs/data/map'

Functions

dotGridA grid of dots over the view: land, sea inside the world's outline, nothing outside it.
projectProjected x, y of a latitude and a longitude from the central meridian, in radians.
unpackDecodes the land mask of @dioramajs/globe/land: 1 for land, `WIDTH` cells a row.
unprojectLatitude and longitude in radians of a projected point, undefined outside the world.
viewOfThe region's projected bounds around its middle meridian (moved by `center`), shrunk by `zoom` and widened to the box's proportions, so the region fits and the rest of the box shows more map.

Constants

defaultA flat map of the world or a region, its land as dots or a solid fill, with markers for the element's places and arcs between them that draw in once in view. Fires `dio:marker` on the element when a marker lights up or goes dark.
REGIONSWest, east, south and north edges of a region in degrees.