In-game tools · function

createPanelRoot

The node a panel builds into.

Explained in In-game tools.

function createPanelRoot(panel:
import { createPanelRoot } from '@driftengine/tools';

Parameters

ParameterTypeDescription
panel{ readonly id: string; }

In depth

The identifier lives on the root rather than in a map beside the tree, so the dock reads it off whatever node it is holding and there is nothing to keep in step. It takes the identifier alone rather than a Panel<S>, so a caller need not name the state type to make a root. clip, because a panel's content is routinely taller than its site, and a panel drawing outside its dock is the first thing anybody notices.