particles

package
v0.0.0-...-aac1211 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Particle

type Particle struct {
	Position             [2]float64
	Velocity             [2]float64
	ColorBegin, ColorEnd glm.Quat

	Rotation           float64
	SizeBegin, SizeEnd glm.Quat
	LifeTime           float64
	LifeRemaining      float64
	Active             bool
}

type ParticlePool

type ParticlePool struct {
	// contains filtered or unexported fields
}

func UseParticlesPool

func UseParticlesPool(particlesNum int) *ParticlePool

func (*ParticlePool) Fill

func (pm *ParticlePool) Fill(props Props)

func (*ParticlePool) ForEachParticle

func (pm *ParticlePool) ForEachParticle(c func(*Particle))

func (*ParticlePool) Update

func (pm *ParticlePool) Update(coef float64)

type Props

type Props struct {
	Position, Velocity, VelocityVariation [2]float64
	Life                                  float64
	ColorBegin, ColorEnd                  glm.Quat
	SizeBegin, SizeEnd, SizeVariation     glm.Quat
	LifeTime                              float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL