Skip to content

Function: syncInstancePattern() ​

ts
function syncInstancePattern(mesh, shaders, pattern, count, invalidate): void;

Experimental

Draw the pattern() of the instanced rect or arc mesh (per-instance attributes for its count() instances and the pattern shaders, once the code is in), or go back to the plain shaders without one. The getters are read when the work runs, so a pattern replaced or removed (or a primitive disposed: pattern() null) while the code loads is never drawn.

Parameters ​

ParameterType
meshMesh
shadersreadonly [string, string]
pattern() => PatternFill | null
count() => number
invalidate() => void

Returns ​

void

Released under the MIT License.