Lit by facing

rim 0.16

A clear rim lit by two fixed lights, a key and a half-strength fill, each point by how squarely its normal faces them.

Drawn while the skill was being made, for a long article on rendering frosted panes in WebGL.

Install

npm install anatomy-figures

In your code

page.tsx
import { LitByFacing } from "anatomy-figures";

<LitByFacing theme="light" />

Or load this figure on its own, so the others never download:

page.tsx
import LitByFacing from "anatomy-figures/lit-by-facing";

Theme it

Early examples keep their own light and dark palettes: theme picks one, and --anatomy-card sets the ground.

page.tsx
<LitByFacing
  theme="dark"
  tokens={{ "--anatomy-card": "#000000" }}
/>

Without React

It still draws with React inside, so install react and react-dom next to it.

index.html
import { define } from "anatomy-figures/element/lit-by-facing";

define();

<anatomy-lit-by-facing theme="light"></anatomy-lit-by-facing>
The Creation of Adam, Michelangelo, c. 1512