FrameBuffer
Offscreen composition and reusable snapshots.
FrameBuffer
FrameBuffer enables offscreen rendering patterns. It allows you to render content into an offscreen buffer and then draw it onto the main screen. This is useful for complex animations or caching expensive layouts.
import { FrameBufferRenderable } from "@cascadetui/core"
const fb = new FrameBufferRenderable(renderer, { width: 40, height: 10 })
renderer.root.add(fb)You can capture a snapshot of a complex component, then reuse it multiple times in different locations without re‑rendering it each frame.
Props
| Prop | Type | Notes |
|---|---|---|
width | number | Buffer width in cells. |
height | number | Buffer height in cells. |