Renderer · interface

HairModel

Hair: three lobes along the strand, which is the mesh's tangent, running from root to tip (hairLobes.ts). A model map's green turns each strand's tilt by up to half of it either way and its blue is occlusion.

Explained in Hello world.

interface HairModel
import type { HairModel } from '@driftengine/core';

Properties

NameTypeDescription
kindreadonly'hair'
shiftreadonlynumberRadians the cuticle's scales tilt the strand's surface: positive moves the white highlight toward the root and the coloured one toward the tip. A card whose tangent runs tip to root takes it negative.
scatterreadonlynumber0 to 1: the light scattered through many strands, tinted by their colour.
backlitreadonlynumberHow strongly light from behind glows through: the transmitted lobe.