Model - Raster
API reference for src/lanes/textures/raster on @huukhanhnguyen/model, reachable from ..
See the Guide for the ModelJSON / evaluate pipeline.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
rasterizeEntities
function
Rasterize flat component entities into a scalar tile: faces scanline-filled (evenodd, holes work), curves stroked as stamped discs along the polyline, points as dots — intensity 1 on a 0 background. The window rect maps edge-to-edge onto the square buffer (the window IS the repeat cell; a non-square window stretches, strokes approximate with the mean axis scale). Row 0 = window BOTTOM, so the component reads upright when the tile lands on a face's mm-plane UV. No anti-aliasing by design — follow with blur for soft edges. ponytail: per-row full edge scan + per-pixel disc stamps, O(size × edges); build an edge table per face if components ever get huge.
rasterizeEntities(entities: Entity[], options: { window: number[]; strokeWidth: number; width: number; height: number; }): ImageBuffer