Renderer · interface
FieldSource
A baked object field, as this package can describe one.
Explained in Hello world.
interface FieldSourceimport type { FieldSource } from '@driftengine/core';In depth
Structural rather than imported, because @driftengine/core does not depend on
@driftengine/assets and must not start: the baker is a build step and this is a frame. What
bakeObjectSdf returns satisfies this shape, and so does what readSdfv hands back from a
container. That is the arrangement Terrain already has with Heightfield across the physics
boundary and DTEX has with @driftengine/texture across the container one.
Properties
| Name | Type | Description |
|---|---|---|
fieldreadonly | Float32Array | Distance in metres, negative inside. x fastest, then y, then z. |
dimsreadonly | readonly [number, number, number] | |
boundsreadonly | Float32Array | The field's own extent in object space, [minX, minY, minZ, maxX, maxY, maxZ]. |