@ldlework/phosphor-crt
v0.0.1
Published
Put a @ldlework/crt phosphor renderer behind a @ldlework/phosphor screen. The screen's HTML stays on top; the cursor is drawn into the phosphor.
Readme
@ldlework/phosphor-crt
Put a @ldlework/crt phosphor renderer behind a
@ldlework/phosphor screen.
import '@ldlework/phosphor/styles.css'
import '@ldlework/phosphor-crt/styles.css'
import { Display } from '@ldlework/phosphor'
import { CrtScreen } from '@ldlework/phosphor-crt'
<Display cursor>
<CrtScreen />
<div className="screen-chip-row">…</div>
</Display>CrtScreen fills the glass and paints under the screen's HTML. The
HTML is not drawn through the CRT, so it gets no halation or decay.
When the screen has cursor, CrtScreen draws the cursor into the
phosphor: it glows and leaves a fading trail. It passes under the
HTML. Pass your own passes to draw more into the same phosphor;
cursorIntensity sets how bright the cursor deposits.
