LinearDragModule class Particles
Damps velocity toward zero with a linear drag coefficient (per second):
each step scales velocity by max(0, 1 - coefficient * dt).
- Inheritance
-
- Object
- ParticleModule
- LinearDragModule
Constructors
- LinearDragModule(double coefficient)
-
Creates a linear drag force with the given
coefficient.
Properties
- coefficient ↔ double
-
The drag coefficient (per second).
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
spawn(
ParticleStorage storage, int index) → void -
Initializes the freshly spawned particle at
index.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
update(
ParticleStorage storage, double dt) → void -
Advances every live particle by
dtseconds.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited