Geometry · interface

MeshBuildOptions

What the finished mesh should carry beyond position, normal, colour and emissive.

Explained in Hello world, Meshes and geometry.

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

Properties

NameTypeDescription
planarUvsoptionalbooleanEmit box-projected texture coordinates in metres.
More

Off by default, because most geometry in this engine is coloured rather than textured and two floats a vertex is a real upload for a world that will never sample them. On, for a mesh that will be drawn with a SurfaceTexture.

colorSpaceoptional'linear' | 'srgb'The space the builder's colours were given in. 'linear', the default, is the renderer's own: light as a surface reflects it. 'srgb' is a colour picked by eye, on a screen or in a paint program, and decodes every vertex's colour and emissive colour to linear here, once — as a texture of colours uploaded as sRGB is decoded — so a world built from hand-picked colours draws them as picked under the default outputTransform, where the same numbers taken as linear come out pale. What it gives up: nothing at the colour picked; a colour meant as light rather than as a look wants a linear number of its own.