import { type Particles } from "https://deno.land/x/canvas@v1.4.1/mod.ts";
See SkParticleEffect.h for more details.
Methods
draw(canvas: Canvas): void
Draws the current state of the particles on the given canvas.
Returns a Float32Array bound to the WASM memory of these uniforms. Changing these floats will change the corresponding uniforms instantly.
getUniform(index: number): SkSLUniform
Returns the nth uniform from the effect.
Returns the total number of floats across all uniforms on the effect. This is the length
of the array returned by uniforms()
. For example, an effect with a single float3 uniform,
would return 1 from getUniformCount()
, but 3 from getUniformFloatCount()
.
setPosition(point: InputPoint): void
Sets the base position of the effect.