API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classWebGl2TextRenderer

@codexo/exojs / rendering / stable

WebGL2 renderer for Text and BitmapText nodes. Uses three specialised fragment shaders: - `text-sdf` — R8 SDF atlas (Text, standard text) - `text-msdf` — RGB MSDF atlas (BitmapText) - `text-color` — RGBA atlas (emoji / colour fonts) All per-node data (world transform + style) is packed into a single `RGBA32F` data texture uploaded once per flush. Nodes sharing the same shader type and atlas page are drawn in a single `drawElements` call.

1
props
9
methods
0
events
Import
import { WebGl2TextRenderer } from '@codexo/exojs'

WebGL2 renderer for Text and BitmapText nodes.

Uses three specialised fragment shaders:

All per-node data (world transform + style) is packed into a single `RGBA32F` data texture uploaded once per flush. Nodes sharing the same shader type and atlas page are drawn in a single `drawElements` call.

Constructors 1
new(): WebGl2TextRenderer
Methods 9
connect(backend: WebGl2Backend): void
destroy(): void
disconnect(): void
flush(): void
getBackend(): WebGl2Backend
getBackendOrNull(): WebGl2Backend | null
onConnect(backend: WebGl2Backend): void
onDisconnect(): void
render(node: BitmapText | Text): void
Properties 1
backendType: WebGl2
Source