HudAPI
Defined in: packages/threeplay/src/plugins/hud/types.ts:59
API of the HUD plugin.
Methods
Section titled “Methods”anchor()
Section titled “anchor()”anchor(
a):Comp&object
Defined in: packages/threeplay/src/plugins/hud/types.ts:65
Component: which point of a HUD element pos refers to (default "topleft").
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Comp & object
fixed()
Section titled “fixed()”fixed():
Comp&object
Defined in: packages/threeplay/src/plugins/hud/types.ts:63
Component: the object lives in screen space (HUD) instead of the 3D world.
Returns
Section titled “Returns”Comp & object
text()
Section titled “text()”text(
str?,opts?):TextComp
Defined in: packages/threeplay/src/plugins/hud/types.ts:60
Parameters
Section titled “Parameters”string | number
Returns
Section titled “Returns”uiRect()
Section titled “uiRect()”uiRect(
width,height,opts?):UIRectComp
Defined in: packages/threeplay/src/plugins/hud/types.ts:61
Parameters
Section titled “Parameters”number
height
Section titled “height”number
Returns
Section titled “Returns”worldToHud()
Section titled “worldToHud()”worldToHud(
world):Vector2|null
Defined in: packages/threeplay/src/plugins/hud/types.ts:67
Projects a world position to logical screen coordinates (same as toScreen).
Parameters
Section titled “Parameters”Vector3
Returns
Section titled “Returns”Vector2 | null