Geometry · function

solidToMesh

A solid painted one colour, as a mesh the renderer draws. emissive is the usual scalar: the surface's own colour scaled, gated by the environment's night factor like every emissive.

Explained in Hello world, Meshes and geometry.

function solidToMesh(solid: Solid, color: Vec3, emissive?: number): MeshData
import { solidToMesh } from '@driftengine/core';

Parameters

ParameterTypeDescription
solidSolid
colorVec3
emissive?number