API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classAtlasPage
@codexo/exojs / rendering / stable
A single texture page within a GlyphAtlas. Glyphs are packed into the page using a shelf-bin algorithm. In `'sdf'` mode the page owns a `DataTexture` (`r8`) populated by tiny-sdf output. In `'color'` mode a Canvas 2D context preserves full glyph colours for emoji.
3
props
6
methods
0
events
Import
import { AtlasPage } from '@codexo/exojs' A single texture page within a GlyphAtlas. Glyphs are packed into the page using a shelf-bin algorithm.
In `'sdf'` mode the page owns a `DataTexture` (`r8`) populated by tiny-sdf output. In `'color'` mode a Canvas 2D context preserves full glyph colours for emoji.
Constructors 1
new(index: number, width: number, height: number, mode: AtlasMode): AtlasPage Methods 6
insert(w: number, h: number): object | null measureGlyph(char: string, font: string): TextMetrics rasterize(char: string, slotX: number, slotY: number, ascent: number, bbLeft: number, font: string): void reset(): void uploadDirtyRegion(): void writeSdf(data: Uint8ClampedArray, slotX: number, slotY: number, srcW: number, srcH: number): void Properties 3
index: number mode: AtlasMode texture: Texture Source