CurvedParticle class

A Particle which applies certain Curve for easing or other purposes to its progress getter.

Inheritance
Implementers

Constructors

CurvedParticle({Curve curve: Curves.linear, double lifespan})

Properties

curve Curve
final
progress → double
Getter which should be used by subclasses to get overall progress. Also allows to substitute progres with other values, for example adding easing as in CurvedParticle.
read-only, override
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

accelerated({Offset acceleration: Offset.zero, Offset position: Offset.zero, Offset speed: Offset.zero}) Particle
Wraps this particle with AcceleratedParticle allowing to specify desired position speed and acceleration and leave the basic physics do the rest.
inherited
asComponent() Component
Wraps this particle with ParticleComponent to be used within the BaseGame component system.
inherited
destroy() → bool
This method will return true as soon as particle reaches an end of its lifespan, which means it's ready to be destroyed by a wrapping container. Follows same style as Component.
inherited
moving({Offset from: Offset.zero, Offset to, Curve curve: Curves.linear}) Particle
Wraps this particle with MovingParticle allowing it to move from one Offset on the canvas to another one.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
render(Canvas canvas) → void
Should render this Particle to given Canvas. Default behavior is empty, so that it's not required to override this in Particle which render nothing and serve as behavior containers.
inherited
rotated([double angle = 0]) Particle
Rotates this particle to a fixed angle in radians with RotatingParticle
inherited
rotating({double from: 0, double to: pi}) Particle
Rotates this particle from given angle to another one in radians with RotatingParticle
inherited
scaled(double scale) Particle
Wraps this particle with ScaledParticle allowing to change size of it and/or its children
inherited
setLifespan(double lifespan) → void
A control method allowing a parent of this Particle to pass down it's lifespan. Allows to only specify desired lifespan once, at the very top of the Particle tree which then will be propagated down using this method. See SingleChildParticle or ComposedParticle for details.
inherited
toString() → String
Returns a string representation of this object.
inherited
translated(Offset offset) Particle
Wtaps this particle with TranslatedParticle statically repositioning it for the time of the lifespan.
inherited
update(double dt) → void
Updates internal Timer of this Particle which defines its position on the lifespan. Marks Particle for destroy when it is over.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited