useDevtoolsPanel
useDevtoolsPanel(
schema):void
Declares the panel the devtools draw for the entity the calling
component renders: at the top of the inspector, and over the entity in
the world once it is pinned. Each key is a row, labelled from its
camelCase: a plain value reads out, { value, onChange } edits, with a
slider where it has min and max and a select where it has
options, button(fn) acts, and custom(element) draws the element
in a row of its own. The schema is read on every render, so a readout
is as live as the component. Call it in the component that renders the
Entity, as Leva’s useControls is called; headless it does nothing.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema |
DevtoolsPanelSchema |
Returns
Section titled “Returns”void