Documentation ¶
Index ¶
- Variables
- type Config
- type Group
- type Particle
- func (p *Particle) Bounce(maxx, maxy float64)
- func (p *Particle) Bounds(maxx, maxy float64)
- func (p *Particle) Distance(pa *Particle) float64
- func (p *Particle) Move()
- func (p *Particle) RandomizePosition(width, height int)
- func (p *Particle) Reverse()
- func (p *Particle) ReverseX()
- func (p *Particle) ReverseY()
- type Particles
- type Vector
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{2.0, 80.0, 1.8, "#ccccFF", true, true, true}
DefaultConfig is a default value for config
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Speed float64 Area float64 Size float64 Color string Bounds bool Bounce bool Move bool }
Config contains data for particles configuration
type Group ¶
Group represents multiple particles
type Particle ¶
Particle represents a single particle
func NewParticle ¶
NewParticle initializes a new particle
func (*Particle) RandomizePosition ¶
RandomizePosition sets a random (within a given range) position for the particle
Click to show internal directories.
Click to hide internal directories.