Renderer · interface

BaseDecal

One decal: a box, which image it lays, and how much.

Explained in Hello world.

interface BaseDecal extends DecalBox
import type { BaseDecal } from '@driftengine/core';

Properties

NameTypeDescription
imagereadonlynumberWhich of setBaseDecalImages' images it lays, from 0.
opacityreadonlyoptionalnumberHow much of the image's alpha lands, 0 to 1. Default 1.
facingCosreadonlyoptionalnumberHow far from facing back along forward a surface may be turned and still be marked, as a cosine of the geometric normal against it. Default 0.2, so a floor is marked and the side of a step it stands on is not smeared. -1 marks every surface in the box.