Renderer · interface

IridescentOverlay

Explained in Hello world.

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

Properties

NameTypeDescription
rampreadonlyArrayLike<number>The overlay colour along t, linear, three floats a colour, at least two colours, the first at t = 0 and the last at t = 1. Resampled to thirty-two.
directionreadonlyThreeA fixed direction in the world the sheen turns toward, S. Need not be unit length.
blendreadonlyoptionalnumberHow far the view's term is turned toward the sheen, 0 to 1. Default 0.6.
contrastreadonlyoptionalnumberThe sheen's exponent. Default 1.
tilingreadonlyoptionalnumberHow many times the ramp repeats across x. Default 2.
weightreadonlyoptionalnumberHow much of the overlay is laid on. Default 0.25.
maskreadonlyoptional{ readonly map: IridescentMaskMap; readonly layer: number; /** 0 red, 1 green, 2 blue, 3 alpha. */ readonly channel: 0 | 1 | 2 | 3; } | nullWhere it is laid: a channel of a layer of one of the material's arrays. Absent, everywhere.