Module particle stdlib

particle
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
3
Imported by:
0
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

Imported by

This section is empty.

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn new

fn new(location math.vec.Vec2[f64]) &Particle

  • Module public

Structs

#struct Color

pub struct Color {
mut:
	r u8
	g u8
	b u8
	a u8
}

  • Color

#struct Particle

pub struct Particle {
mut:
	location       vec.Vec2[f64]
	velocity       vec.Vec2[f64]
	acceleration   vec.Vec2[f64]
	color          Color
	life_time      f64
	life_time_init f64
}

#fn (&Particle) update

fn (mut p &Particle) update(dt f64)

#fn (Particle) is_dead

fn (p Particle) is_dead() bool

#fn (Particle) draw

fn (p Particle) draw()

#fn (&Particle) reset

fn (mut p &Particle) reset()

#struct SystemConfig

pub struct SystemConfig {
	pool int
}

#struct System

pub struct System {
	width  int
	height int
mut:
	pool []&Particle
	bin  []&Particle
}

#fn (&System) init

fn (mut s &System) init(sc SystemConfig)

#fn (&System) update

fn (mut s &System) update(dt f64)

#fn (System) draw

fn (s System) draw()

#fn (&System) reset

fn (mut s &System) reset()

#fn (&System) explode

fn (mut s &System) explode(x f32, y f32)

#fn (&System) free

fn (mut s &System) free()

Interfaces

This section is empty.

Enums

This section is empty.