Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/canvaseno/types.ts>Particles

Canvas API for deno
Latest
interface Particles
implements EmbindObject<Particles>
import { type Particles } from "https://deno.land/x/canvaseno@v1.0.2/types.ts";

See SkParticleEffect.h for more details.

Methods

draw(canvas: SkCanvas): void

Draws the current state of the particles on the given canvas.

effectUniforms(): Float32Array

Returns a Float32Array bound to the WASM memory of these uniforms. Changing these floats will change the corresponding uniforms instantly.

getEffectUniform(index: number): ParticlesUniform

Returns the nth uniform from the effect.

getEffectUniformCount(): number

Returns the number of uniforms on the effect.

getEffectUniformFloatCount(): number

Returns the number of float uniforms on the effect.

getEffectUniformName(index: number): string

Returns the name of the nth effect uniform.

getParticleUniform(index: number): ParticlesUniform

Returns the nth uniform on the particles.

getParticleUniformCount(): number

Returns the count of uniforms on the particles.

getParticleUniformFloatCount(): number

Returns the number of float uniforms on the particles.

getParticleUniformName(index: number): string

Returns the name of the nth particle uniform.

particleUniforms(): Float32Array

Returns a Float32Array bound to the WASM memory of these uniforms. Changing these floats will change the corresponding uniforms instantly.

setPosition(point: SkPoint): void

Sets the base position of the effect.

setRate(rate: number): void

Sets the base rate of the effect.

start(now: number, looping: boolean): void

Starts playing the effect.

update(now: number): void

Updates the effect using the new time.