flame_geom 0.2.4

Flutter Android iOS

Complement Flame with APIs for handling shapes and geometric operations.

flame_geom #

Pub Test Discord

Complement Flame with APIs for handling shapes and geometric operations.

Overview #

This package makes heavy use of Flame's Position class and includes several geometric structures:

  • LineSegment: represents a finite line segment between two points in a 2D Euclidian space (or sometimes the whole line).
  • Circle: represents a circle (or sometimes a circumference) in 2D Euclidian space.
  • Rectangle: represents an axis-aligned rectangle in a 2D Euclidian space.
  • Overlapable: generic interface for shapes that can overlap one another.

If working with integer precision, it might also be useful to take a look at some integer versions of these classes:

  • IntPosition: similar to Position but for integers.
  • IntRect: similar to Rectangle but for integers.
  • IntBounds: similar to Overlapple but for integers.

Example #

The example folder contains a playground for you to render a Flame game using shapes computed by Flame Geom.

2
likes
90
pub points
27%
popularity

Publisher

flame-engine.org

Complement Flame with APIs for handling shapes and geometric operations.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flame, flutter

More

Packages that depend on flame_geom