Renderer · interface

SurfaceDetailRegion

One region's detail.

Explained in Hello world.

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

Properties

NameTypeDescription
normalLayerreadonlynumberThe layer of the detail array holding this region's tangent-space normal map.
occlusionLayerreadonlyoptionalnumberThe layer holding its occlusion, in red; absent, the region adds none.
repeatreadonlynumber | readonly [number, number]Repeats across the base coordinates, the same both ways or across and down apart.
offsetreadonlyoptionalreadonly [number, number]Added to the repeated coordinates, so neighbouring regions need not line up. Default none.
normalStrengthreadonlyoptionalnumberHow far the detail turns the normal: 0 lies flat, 1 as drawn, more steeper. Default 1.
occlusionStrengthreadonlyoptionalnumberHow much of its occlusion is laid on, from 0 to 1. Default 1.