effects

package
v0.0.0-...-5b12917 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoxFlipbook

func BoxFlipbook(geometry *renderer.Geometry, frame, framesX, framesY int)

func TriggerTimedParticleGroup

func TriggerTimedParticleGroup(tpg TimedParticleGroup)

Types

type Particle

type Particle struct {
	Life, LifeRemaining float32
	Scale               mgl32.Vec3
	Translation         mgl32.Vec3
	Orientation         mgl32.Quat
	Rotation            float32
	Velocity            mgl32.Vec3
	RotationVelocity    float32
	Color               color.Color
	Frame               int
	// contains filtered or unexported fields
}

type ParticleGroup

type ParticleGroup struct {
	Node *renderer.Node
	// contains filtered or unexported fields
}

func NewParticleGroup

func NewParticleGroup(camera *renderer.Camera, particles ...*ParticleSystem) *ParticleGroup

func (*ParticleGroup) BoundingRadius

func (pg *ParticleGroup) BoundingRadius() float32

func (*ParticleGroup) Center

func (pg *ParticleGroup) Center() mgl32.Vec3

func (*ParticleGroup) Destroy

func (pg *ParticleGroup) Destroy(renderer renderer.Renderer)

func (*ParticleGroup) Disable

func (pg *ParticleGroup) Disable(disable bool)

func (*ParticleGroup) Draw

func (pg *ParticleGroup) Draw(renderer renderer.Renderer, transform mgl32.Mat4)

func (*ParticleGroup) Optimize

func (pg *ParticleGroup) Optimize(geometry *renderer.Geometry, transform mgl32.Mat4)

func (*ParticleGroup) OrthoOrder

func (pg *ParticleGroup) OrthoOrder() int

func (*ParticleGroup) SetParent

func (pg *ParticleGroup) SetParent(parent *renderer.Node)

func (*ParticleGroup) SetTranslation

func (pg *ParticleGroup) SetTranslation(translation mgl32.Vec3)

func (*ParticleGroup) Update

func (pg *ParticleGroup) Update(dt float64)

type ParticleSettings

type ParticleSettings struct {
	MaxParticles                             int
	ParticleEmitRate                         float32
	MaxLife, MinLife                         float32
	StartSize, EndSize                       mgl32.Vec3
	StartColor, EndColor                     color.NRGBA
	MaxTranslation, MinTranslation           mgl32.Vec3
	MaxStartVelocity, MinStartVelocity       mgl32.Vec3
	Acceleration                             mgl32.Vec3
	MaxRotation, MinRotation                 float32
	MaxRotationVelocity, MinRotationVelocity float32
	BaseGeometry                             *renderer.Geometry
	TotalFrames, FramesX, FramesY            int
	OnParticleUpdate                         func(p *Particle)
}

type ParticleSystem

type ParticleSystem struct {
	Location        mgl32.Vec3
	DisableSpawning bool
	FaceCamera      bool
	Settings        ParticleSettings
	Node            *renderer.Node
	// contains filtered or unexported fields
}

func CreateParticleSystem

func CreateParticleSystem(settings ParticleSettings) *ParticleSystem

func (*ParticleSystem) BoundingRadius

func (ps *ParticleSystem) BoundingRadius() float32

func (*ParticleSystem) Center

func (ps *ParticleSystem) Center() mgl32.Vec3

func (*ParticleSystem) Destroy

func (ps *ParticleSystem) Destroy(renderer renderer.Renderer)

func (*ParticleSystem) Draw

func (ps *ParticleSystem) Draw(renderer renderer.Renderer, transform mgl32.Mat4)

func (*ParticleSystem) Optimize

func (ps *ParticleSystem) Optimize(geometry *renderer.Geometry, transform mgl32.Mat4)

func (*ParticleSystem) OrthoOrder

func (ps *ParticleSystem) OrthoOrder() int

func (*ParticleSystem) SetCameraLocation

func (ps *ParticleSystem) SetCameraLocation(cameraLocation mgl32.Vec3)

func (*ParticleSystem) SetOrientation

func (ps *ParticleSystem) SetOrientation(orientation mgl32.Quat)

func (*ParticleSystem) SetParent

func (ps *ParticleSystem) SetParent(parent *renderer.Node)

func (*ParticleSystem) SetScale

func (ps *ParticleSystem) SetScale(scale mgl32.Vec3)

func (*ParticleSystem) SetTranslation

func (ps *ParticleSystem) SetTranslation(translation mgl32.Vec3)

sets the location where the particles with be emitted from

func (*ParticleSystem) Update

func (ps *ParticleSystem) Update(dt float64)

type Sprite

type Sprite struct {
	Node *renderer.Node

	Rotation   float32
	FaceCamera bool
	// contains filtered or unexported fields
}

func CreateSprite

func CreateSprite(totalFrames, framesX, framesY int, material *renderer.Material) *Sprite

func (*Sprite) BoundingRadius

func (sprite *Sprite) BoundingRadius() float32

func (*Sprite) Center

func (sprite *Sprite) Center() mgl32.Vec3

func (*Sprite) Destroy

func (sprite *Sprite) Destroy(renderer renderer.Renderer)

func (*Sprite) Draw

func (sprite *Sprite) Draw(r renderer.Renderer, transform mgl32.Mat4)

func (*Sprite) NextFrame

func (sprite *Sprite) NextFrame()

func (*Sprite) Optimize

func (sprite *Sprite) Optimize(geometry *renderer.Geometry, transform mgl32.Mat4)

func (*Sprite) OrthoOrder

func (sprite *Sprite) OrthoOrder() int

func (*Sprite) SetCameraLocation

func (sprite *Sprite) SetCameraLocation(cameraLocation mgl32.Vec3)

func (*Sprite) SetColor

func (sprite *Sprite) SetColor(color color.NRGBA)

func (*Sprite) SetOrientation

func (sprite *Sprite) SetOrientation(orientation mgl32.Quat)

func (*Sprite) SetParent

func (sprite *Sprite) SetParent(parent *renderer.Node)

func (*Sprite) SetScale

func (sprite *Sprite) SetScale(scale mgl32.Vec3)

func (*Sprite) SetTranslation

func (sprite *Sprite) SetTranslation(translation mgl32.Vec3)

func (*Sprite) Update

func (sprite *Sprite) Update(dt float64)

type TimedParticleGroup

type TimedParticleGroup struct {
	GameEngine    engine.Engine
	TargetNode    *renderer.Node
	Particles     *ParticleGroup
	Life, Cleanup float64
}

Jump to

Keyboard shortcuts

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