the owning renderer
Optionalsettings: object
batcher settings (see WebGPUBatcher#init)
the renderer this batcher is bound to
make this batcher the active one — nothing per-batcher persists on the pass in the 2D tier; this is the seam where the mesh batcher will later select its depth-enabled pipeline family
release this batcher's GPU resources
Draw an array of vertices with the given topology.
portable topology name ("point-list", "line-list", "line-strip", "triangle-list", "triangle-strip"; "line-loop" and "triangle-fan" are emulated)
an array of vertices
OptionalvertexCount: number = verts.length
amount of points defined in the points array
record the pending vertices as one draw in the frame's open pass
Optionaltopology: string = ...
override the batcher's default topology
the owning renderer
record the actual draw call — non-indexed by default; the quad batcher overrides with its indexed 6-per-quad pattern
the open pass
pending vertex count
drop any pending vertices (game reset)
called when another batcher takes over
per-draw refresh hook (pass-scoped state that bind() cannot own
because setBatcher early-returns when already current)
The WebGPU primitive batcher — shape geometry accumulation with the same frozen 24-byte vertex layout and CPU tessellation as the WebGL
PrimitiveBatcher, addressed purely in the portable topology vocabulary.uLineWidthlives in the shared frame-globals uniform block: a width change flushes pending vertices and pushes a fresh dynamic-offset slot, replacing the per-program uniform of the GL backend.The two non-portable engine topologies are emulated in this front end, as
PORTABLE_TOPOLOGIESdocuments:"line-loop"draws as a strip with an explicit closing vertex,"triangle-fan"re-expands on the CPU into a triangle list. No engine path emits either — they only serve direct user calls.