TouchInteractionHandler class

Class that handles touch interactions with particles

Optimizations:

  • Combines physics and rendering in single pass
  • Batched rendering using opacity buckets
  • Eliminates duplicate distance calculations

Constructors

TouchInteractionHandler({required List<Particle> particles, required Offset? touchPoint, required double lineDistance, required Color touchColor, required Paint linePaint})
Constructor for the touch interaction handler

Properties

hashCode int
The hash code for this object.
no setterinherited
lineDistance double
final
linePaint Paint
final
particles List<Particle>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
touchColor Color
final
touchPoint Offset?
final

Methods

applyTouchPhysics(List<int> visibleParticles) → void
Legacy method for applying touch physics (deprecated) Use handleTouchInteraction instead for better performance
drawTouchLines(Canvas canvas, List<int> visibleParticles) → void
Legacy method for drawing touch lines (deprecated) Use handleTouchInteraction instead for better performance
handleTouchInteraction(Canvas canvas, List<int> visibleParticles) → void
Handles both touch physics and rendering in a single optimized pass
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited