Renderer · interface
FieldHit
Where a march ended. Reused rather than returned, because the chain runs this per ray.
Explained in Hello world.
interface FieldHitimport type { FieldHit } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
hit | boolean | |
x | number | Where it arrived, in world metres. |
y | number | |
z | number | |
distanceM | number | How far along the ray, world metres, from the lifted origin.MoreThe lift is |
radiusM | number | The cone's radius there, which is how broad a patch of surface this hit stands for. |
steps | number | How many samples it took. Diagnostic, and the thing a convergence test asserts on. |
escaped | boolean | Whether it left the field rather than running out of reach.MoreThe two misses are different and the chain acts on the difference. A ray that escaped has gone somewhere this level has no information about, and the probe volume behind it is what answers. A ray that ran out of reach travelled its whole budget through open space, which is a statement about the world rather than about the field. |