useInspect
useInspect(
name,read,entity?):void
Exposes a view’s own state to the tools, such as the pose a view chose
or a strength it keeps in a ref: spawnite play dump prints what read
returns under the entity the view draws, and spawnite play eval reads it
as views. entity is the one the view draws, the nearest Entity’s
where left out, or the page’s with none. read runs only when a tool
asks, so it may read what a frame wrote.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
read |
() => unknown |
entity? |
Entity | null |
Returns
Section titled “Returns”void