Renderer · interface
DistanceFieldInstance
One placed field. transform is this queue's own copy; source is the consumer's object.
Explained in Hello world.
interface DistanceFieldInstanceimport type { DistanceFieldInstance } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
source | FieldSource | The baked field. Shared by reference: it does not move and it is the large thing. |
transformreadonly | Float32Array | World from object, copied at the moment it was declared. Uniform scale only. |
albedoreadonly | Float32Array | What colour this placement's surface is, copied like the transform. White where none was given.MoreA ray that lands on a wall needs to know what colour it is, because what leaves a surface
is the light arriving times its albedo — and a composed distance field is a union that has
already forgotten which instance won. On the placement rather than the field, because the same baked shape is placed many times and two pillars cut from one mould may be painted differently. |