goalPoint()
function goalPoint(
layout,
frame,
y,
z,
inset?
): GoalPoint | undefined;Defined in: packages/core/src/goal/layout.ts:117
A shot's goal-mouth coordinates, in frame's units, to pixels.
A point outside the view is pinned to its edge and marked clamped, the
way a radar pins an off-scale value to its rim: a shot far wide still
shows which side it went. A height below the ground is pinned to the
ground. undefined for a missing or non-finite coordinate, which draws
nothing rather than a shot at the origin.
inset draws any point within that many pixels of the sides or top that
many pixels inside them, so a mark of that radius stays whole. It moves
where the point is drawn, never whether it counts as clamped: that is
decided against the view itself. A view with no size (a hidden container
measures 0 x 0) has no room to inset into, and every point lands on its
one pixel.
Parameters
| Parameter | Type | Default value |
|---|---|---|
layout | GoalLayout | undefined |
frame | GoalFrame | undefined |
y | number | null | undefined | undefined |
z | number | null | undefined | undefined |
inset | number | 0 |
Returns
GoalPoint | undefined