FabricSimulation class
Properties
-
cols
→ int
-
final
-
elasticity
→ FabricElasticity
-
Stretchiness / stiffness / damping - see FabricElasticity.
final
-
gravityOn
↔ bool
-
Becomes true once anything tears / any pin lets go. From then on the
cloth is affected by gravity and never returns to the flat state.
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
height
→ double
-
final
-
isGrabbing
→ bool
-
no setter
-
maxOffset
↔ double
-
Largest distance of any visible node from its resting place.
getter/setter pair
-
motion
↔ double
-
Average per-node movement of the last step (used to detect rest).
getter/setter pair
-
nodes
→ List<PointMass>
-
final
-
onPinBreak
↔ void Function()?
-
Fired every time a pin lets go of the wall (good hook for a "pop"/
"snap" sound).
getter/setter pair
-
onTear
↔ void Function()?
-
Fired the first time a spring gives way (good hook for a "rip" sound).
getter/setter pair
-
pinBreakRatio
→ double
-
A pin lets go when a spring attached to it is stretched beyond this.
final
-
pinNodes
→ List<PointMass>
-
The border nodes that start pinned to the "wall".
no setter
-
pinsBrokenCount
↔ int
-
How many pins have let go of the wall so far.
getter/setter pair
-
random
→ Random
-
Shared random source (seeded, so effects are repeatable).
no setter
-
rows
→ int
-
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
springs
→ List<Spring>
-
final
-
tearRatio
→ double
-
A spring tears when stretched beyond this multiple of its rest length.
final
-
topologyVersion
↔ int
-
Increments whenever a spring tears (painter rebuilds its triangles).
getter/setter pair
-
tornCount
↔ int
-
How many springs have torn so far.
getter/setter pair
-
width
→ double
-
final
Constants
-
timeStep
→ const double
-
Fixed physics step (the widget runs this with an accumulator, so the
feel is identical on 60 Hz and 120 Hz screens).