Class: FillPrimitive
Experimental
Batched polygon fills: one merged indexed geometry, one draw call for any number of polygons.
Updates: geometry keys (x, y, z, rings, polygons, fillRule) re-triangulate; color alone rewrites only the color attribute, paint only the gradient coordinates and LUT; opacity and setTransform touch uniforms only.
Implements
Constructors
Constructor
new FillPrimitive(
context,
data,
mesh?
): FillPrimitive;Experimental
Parameters
| Parameter | Type | Description |
|---|---|---|
context | PrimitiveContext | - |
data | FillData | - |
mesh? | Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, Material<MaterialEventMap> | Material<MaterialEventMap>[], Object3DEventMap> | Draw into this mesh (its geometry and material are replaced) instead of a new one: LazyFillPrimitive (fill-loader.ts) hands over the placeholder it gave its caller before the fill code loaded, so the object callers hold (and its renderOrder) stays. |
Returns
FillPrimitive
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
object | readonly | Mesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, ShaderMaterial> | Experimental Root object to add to a viewport's scene. |
Accessors
current
Get Signature
get current(): Readonly<FillData>;Experimental
The current data (read-only; extruded fills take their colors from it).
Returns
Readonly<FillData>
polygonCount
Get Signature
get polygonCount(): number;Experimental
Number of polygons (items addressed by per-polygon colors).
Returns
number
ready
Get Signature
get ready(): Promise<void>;Experimental
Resolves once the pattern paint (if any) is drawn: its code loads on first use.
Returns
Promise<void>
triangulation
Get Signature
get triangulation(): Readonly<FillTriangulation>;Experimental
Current triangulation (read-only; for picking and tests).
Returns
Readonly<FillTriangulation>
Methods
dispose()
dispose(): void;Experimental
Release GPU resources. The primitive must not be used afterwards.
Returns
void
Implementation of
setTransform()
setTransform(transform): void;Experimental
Set the data → world transform (cheap: uniforms only, no buffer uploads).
Parameters
| Parameter | Type |
|---|---|
transform | DataTransform |
Returns
void
Implementation of
setViewport()
setViewport(size): void;Experimental
Screen-space sizing of pattern tiles.
Parameters
| Parameter | Type |
|---|---|
size | ViewportSize |
Returns
void
Implementation of
update()
update(patch): void;Experimental
Replace or patch the primitive's data. Omitted fields keep their previous values.
Parameters
| Parameter | Type |
|---|---|
patch | Partial<FillData> |
Returns
void