struct Eagle::Particles2D::Particle

Overview

One live particle. Only needed with custom_update.

Defined in:

eagle/nodes/particles2d.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Instance Method Detail

def alive? : Bool #

True while the particle has life left.


def angular_velocity : Float32 #

Spin in radians per second.


def angular_velocity=(angular_velocity : Float32) #

Spin in radians per second.


def initialize #

def life : Float32 #

Seconds left to live.


def life=(life : Float32) #

Seconds left to live.


def max_life : Float32 #

Total lifetime in seconds.


def max_life=(max_life : Float32) #

Total lifetime in seconds.


def position : Vec2 #

Position of the particle.


def position=(position : Vec2) #

Position of the particle.


def rotation : Float32 #

Rotation in radians.


def rotation=(rotation : Float32) #

Rotation in radians.


def seed : Float32 #

A random value from 0 to 1, fixed per particle, for per-particle variation.


def seed=(seed : Float32) #

A random value from 0 to 1, fixed per particle, for per-particle variation.


def size : Float32 #

Current size multiplier.


def size=(size : Float32) #

Current size multiplier.


def t : Float32 #

How far through its life the particle is, from 0 to 1.


def velocity : Vec2 #

Velocity in points per second.


def velocity=(velocity : Vec2) #

Velocity in points per second.