useDrawnFlight
useDrawnFlight(
ball): () =>DrawnFlight|null
A read of where this page draws ball, a flight body whose display
names one, for a view’s frame callback: the tick drawn, its rate and
its place, as the ball’s own model is drawn, or null for a ball drawn
at the page’s own tick. A shadow, a trail or a landing mark reads it
so it stays under the drawn ball.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ball |
Entity |
Returns
Section titled “Returns”() => DrawnFlight | null
Example
Section titled “Example”const readDrawn = useDrawnFlight(ball); useFrame(() => { const drawn = readDrawn(); if (drawn) shadow.current.position.x = drawn.position.x; });