
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@crewone/lighting-diagram
Advanced tools
Top-down SVG lighting setup diagram component for React. Renders a structured key/fill/rim/hair/background light layout with subject and camera placement, in the style used by CrewOne for commercial photography pre-production.
Top-down SVG lighting setup diagram component for React. Built and used in production by CrewOne, the AI pre-production SaaS for indie filmmakers.
A drop-in React component that renders a top-down view of a photography lighting setup — subject in the centre, camera at the bottom, key / fill / rim / hair / background / accent lights placed by angle and distance, with reflectors and modifiers.
Pre-production for commercial photography typically describes lighting in dense English text ("120cm Octa key 45° camera-right, 60×90 softbox fill camera-left low, strip rim camera-back-right…"). Verbal descriptions are easy to misread on set. This component takes a structured lighting plan and draws an unambiguous overhead diagram.
npm install @crewone/lighting-diagram
Peer dependency: React 18+.
import { LightingDiagram, type LightingDiagramData } from '@crewone/lighting-diagram'
const data: LightingDiagramData = {
style_name: 'Clamshell 夾光',
background: 'white seamless 2.7m',
lights: [
{
role: 'key',
modifier: '120cm Octa',
angle_deg: 45, // 0=behind camera, 90=camera-right, 180=behind subject, 270=camera-left
elevation: 'high', // low / eye / high / top
distance: 'mid', // near / mid / far
power: '1/1',
color: '5500K',
},
{
role: 'fill',
modifier: '60×90 softbox',
angle_deg: 315,
elevation: 'low',
distance: 'mid',
power: '1/4',
color: '',
},
],
modifiers: [
{ type: 'white V-flat', angle_deg: 270, note: 'fill shadow side' },
],
}
export default function App() {
return <LightingDiagram data={data} locale="en" />
}
The component uses a strict, on-set-friendly angle convention:
180° (rim / back-light)
▲
│
270° (camera-left) ────●──── 90° (camera-right)
│
▼
0° (camera, on-axis with lens)
Increases clockwise from the camera's perspective.
type LightingDiagramData = {
style_name?: string // e.g. '蝶光 / Butterfly', 'Rembrandt'
lights?: LightEntry[] // 1-5 typical
modifiers?: ModifierEntry[] // reflectors / flags / scrims; can be empty
background?: string // e.g. 'white seamless', 'black velvet', 'natural — beach golden hour'
}
type LightEntry = {
role?: 'key' | 'fill' | 'rim' | 'hair' | 'background' | 'accent' | 'kicker' | 'practical'
modifier?: string // '120cm Octa', 'beauty dish + grid', 'bare bulb'
angle_deg?: number // 0-359, see convention above
elevation?: 'low' | 'eye' | 'high' | 'top'
distance?: 'near' | 'mid' | 'far' // near < 1m, mid 1-2m, far > 2m
power?: string // '1/1', '1/2', 'f/8', etc.
color?: string // '5500K', '1/2 CTO', 'blue gel'
}
type ModifierEntry = {
type?: string // 'white V-flat', 'silver reflector', 'black flag'
angle_deg?: number
note?: string // 'fill shadow side', 'control spill'
}
Component props:
<LightingDiagram
data={data} // LightingDiagramData | null
locale="zh-TW" | "en" // optional, default 'zh-TW'
/>
The component assigns a consistent colour per light role for quick visual parsing on set:
The component reads several CSS custom properties for theming. Define in your app's global CSS:
:root {
--violet: #8b5cf6;
--violet-2: #a78bfa;
--violet-dim: rgba(139, 92, 246, 0.15);
--border: rgba(255, 255, 255, 0.1);
--text: #fff;
--text-2: rgba(255, 255, 255, 0.7);
--text-3: rgba(255, 255, 255, 0.5);
--text-4: rgba(255, 255, 255, 0.4);
}
Defaults assume a dark UI. Adjust to taste.
This component drives the lighting setup view in CrewOne commercial photography pre-production. Users select photographer style anchors (Tim Walker, Annie Leibovitz, Mika Ninagawa, Chen Man, etc.) and receive a generated LightingDiagramData object that this component renders.
If you want the upstream pipeline (LLM-generated LightingDiagramData from a brief), check out CrewOne directly. This package is the rendering layer only.
MIT — © Way Directs.
FAQs
Top-down SVG lighting setup diagram component for React. Renders a structured key/fill/rim/hair/background light layout with subject and camera placement, in the style used by CrewOne for commercial photography pre-production.
The npm package @crewone/lighting-diagram receives a total of 1 weekly downloads. As such, @crewone/lighting-diagram popularity was classified as not popular.
We found that @crewone/lighting-diagram demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.