instantiateParticle abstract method

AnimatedParticle instantiateParticle(
  1. Size surfaceSize
)

Abstract method to be implemented by subclasses to define particle emission behavior.

This method is called upon particle emission and is responsible for instantiating particles and setting their initial properties, positions, and trajectories. Use the provided surfaceSize parameter to determine the available animation area and customize particle behavior accordingly.

Example:

AnimatedParticle instantiateParticle(Size surfaceSize) {
  // Implement the particle emission behavior here.
  // Customize particle properties based on the `surfaceSize`.
  // Create and add particles to the animation.
}

Implementation

AnimatedParticle instantiateParticle(Size surfaceSize);