Renderer · interface

SheetMesh

Explained in Hello world.

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

Properties

NameTypeDescription
positionsFloat32ArrayResting position, 3 floats per vertex. A shader may displace it.
localsFloat32ArrayWhere the vertex sits inside its own sheet, 0..1 along and across.
More

So a shader can dissolve its own boundary. It reaches 0 and 1 exactly at the outermost vertices rather than approaching them, which is the lesson the ocean's rim already paid for: a fade that only nearly closes leaves a hard edge, and a hard edge reads as geometry rather than as water.

paramsFloat32ArrayTwo numbers carried from each sheet onto every one of its vertices.
vertexCountnumber