Geometry · function

shellFillMatrix

A uniform scale about a height, for drawing a skin just inside the model it came from.

Explained in Hello world, Meshes and geometry.

function shellFillMatrix(scale: number, centreY: number, out: Float32Array): Float32Array
import { shellFillMatrix } from '@driftengine/core';

Parameters

ParameterTypeDescription
scalenumber
centreYnumber
outFloat32Array

In depth

The translation column is what keeps the shrink centred on the model rather than on the world origin: scaling about zero would drop it through whatever it stands on by a fraction of its own height, which is small enough to look like a shadow fault rather than like this.