Splats · interface

SplatView

What a consumer hands the pass each frame.

Explained in Gaussian splats.

interface SplatView
import type { SplatView } from '@driftengine/splats';

In depth

The camera comes from the caller rather than from the renderer, because PassContext carries what the frame is and not what is being looked at — and a contributed pass has no business reaching into the renderer for a matrix the caller already has. It is the same shape every draw verb takes: the caller says where it is looking.

Properties

NameTypeDescription
viewreadonlyArrayLike<number>Column-major, as Camera publishes them.
More

ArrayLike<number> rather than Float32Array because that is what gl-matrix's mat4 is, and a consumer handing over camera.view should not have to cast a matrix the engine gave it.

projectionreadonlyArrayLike<number>
widthPxreadonlynumberIn pixels, because the ellipse is built in pixel space.
heightPxreadonlynumber