Components

GdHall

Golden Dawn Temple Hall, from magick-components

A Golden Dawn temple hall as inline SVG, drawn from a gdHall node such as a preset's (magick-components/gd/hall/presets). It renders on the server as well as in the browser: its layout is computed from the node, its labels' widths from the metrics of the fonts the package ships, and its gradient and pattern ids from useId, so several halls can share a page. The node is treated as untrusted: its strings only reach text nodes, unknown tags draw as dashed placeholders, and nothing is loaded by URL except the fonts fontBaseUrl points at.

import GdHall from "magick-components/gd/hall";

magick-components is on npm, under MIT (how to install it), and its source is in the app's repository.

Props

JSX

<GdHall hall={hall} />

hall is the example's own data, too long to show here: see the example module.

The site also serves this drawing as an image: SVG.

Props

PropTypeDefaultDescription
hall requiredHallNodeThe compiled gdHall node; anything else draws an empty hall.
artHallArtRegistryThe art for each kind of object; the package's own when not given. A registry of your own can add kinds or draw them differently.
classNamestringThe <svg>'s class.
fontBaseUrlstringWhere the hall's WOFF2 subsets are served (such as /fonts). When set, the SVG carries its own @font-face rules; otherwise the page must.
heightstring | numberThe SVG's height; from the width and the hall's shape when not given.
styleCSSPropertiesThe <svg>'s style.
widthstring | numberThe SVG's width; from the height and the hall's shape when not given.
Magick.ly is open source. You can see the code used to generate this page in index.ts, GdHall.examples.tsx and Explorer.tsx.