experimental library

Classes and components in this sub-module are considered experimental, that is, their API may still be incomplete and subject to change at a more rapid pace than the rest of the Flame code.

However, do not feel discouraged to use this functionality: on the contrary, consider this as a way to help the Flame community by beta-testing new components.

After the components lived here for some time, and when we gain more confidence in their robustness, they will be moved out into the main Flame library.


The circle with a given center and a radius.
This viewport is a very similar to FixedResolutionViewport, but allows for better handling of viewing pixel art. The main point is it ensures sprites align to the physical pixel grid and only scales at integer intervals. This prevents artifacts or distortion happening to scaled up pixel art as discussed in https://github.com/flame-engine/flame/issues/1152. Remember to set devicePixelRatio before using the viewport; a good place to update it is in handleResize of your game, directly from WidgetBindings.instance.window.devicePixelRatio.
An arbitrary polygon with 3 or more vertices.
An axis-aligned rectangle.
An axis-aligned rectangle with rounded corners.
Base class for various 2D geometric primitives defined on a Cartesian coordinate plane.