Keylight Field
A live studio sweep lit by one soft key light, and the light is the theme control: drag it for warmth and exposure, and every Ultra asset on the page retunes while text stays legible.
WebGL20 deps1 file · 48 KB TSXreduced-motion aware
Props
"use client";
import { useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
import type { CSSProperties, KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent, ReactNode } from "react";
/**
* KeylightField — a lit studio sweep you set the light in, and with it the page's tuning.
*
* A seamless cyclorama (a wall curving into the floor) rendered live in
* WebGL2 and lit by one soft key light. The light is the control: drag its
* handle left and right to set warmth (6,500 K to 2,700 K), up and down to
* set the light from a dim studio to a paper-white one. On release the light
* settles out of the mid-grey band where no text can be read. The pool leans
* slowly toward the pointer. Children marked data-u-zone get a quiet zone:
* the sweep holds its own lightness under them to the ink's contrast floor,
* so copy stays legible with no scrim. Children marked data-u-cast stand in
* the light and throw a soft shadow away from it. The canvas is created on
* first approach, draws on demand, sleeps off screen and survives context
// ---------------------------------------------------------------
// Full source available with a viberdy Pro subscription.
// https://viberdy.dev/pricing
// ---------------------------------------------------------------
}Details
About this background
Most theme switches are a cut: one click and the page jumps from black to white. Keylight Field makes the theme a place you light. A seamless studio sweep, a wall that curves into the floor, is rendered live and lit by one soft key light, and that light is the control. Drag its ring left and right for warmth, from a 6,500 K daylight to a 2,700 K lamp; drag it up and the room brightens from a dim studio to paper white. The values go into the shared Ultra tuning, so every Ultra asset on the page follows, and they are saved on the device. The light never rests on a mid-grey ground where no text reads: release it there and it settles to the nearer safe edge. Blocks marked as quiet zones keep their contrast because the shader caps its own lightness under them, and floating cards throw soft shadows away from the light.
Curator’s note
The Ultra kit's signature field. Pro: a WebGL2 cyclorama raytraced per pixel (floor, fillet and wall), a wrapped-Lambert key light whose handle writes the shared Ultra tuning, quiet zones that cap the shader's lightness under text to an APCA floor, and soft shadows cast by DOM cards.


