Implements an `ExpandedComponent`, which takes up as much space as
possible along the main axis within a `LinearLayoutComponent`. With more
than one `ExpandedComponent`, this expansion is divided equally.
`PaddingComponent` now inherits from `SingleLayoutComponent`.
---------
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
In the initial implementation of the `transform2dRoundTripUncertainty` I
tried to approximately figure out how many ops happen in the round trip
transform, but it was just an educated guess. Just bumping it by 1 makes
the test pass with the given seed `2021996283`,
This also adds a helper to run tests with a specific random seed without
modifying the tests, e.g. for this one:
`flutter test --dart-define=RANDOM_SEED=2021996283
packages/flame/test/game/transform2d_test.dart`
And for other tests:
`RANDOM_SEED=2021996283 melos test:seeded`
Remove all `.metadata` files across the monorepo and add them to
.gitignore.
They just serve to cause conflicts whenever someone runs anything and
according to @wolfenrain "we don't need them".
This PR adds the `WorldRoute` which acts as a normal route, but instead
of adding a new component (page), it swaps out the world that the camera
(either the default camera or an explicitly passed in one) is watching.
The flutter_svg version used on flame_svg was outdated, which causes us to lose precious pub points:
This updates the library by migrating a bit of the code (it was def a breaking change on their side, but shouldn't be on ours).
The root level .gitignore file already works for all sub-repositories, so they are all actually unnecessary.
This PR leaves only the gitignore at the root of the repo, removing all others.
melos doc-xyz commands were not working on Windows as SOURCEDIR was not properly getting set. I tried changing it to use set SOURCEDIR="$MELOS_ROOT_PATH/doc" and set SOURCEDIR="%MELOS_ROOT_PATH%/doc", but both didn't work. As SOURCEDIR isn't really necessary to be set for the commands to work, this PR remove that variable and directly using $MELOS_ROOT_PATH/doc in its place.
Additionally, this PR also adds .venv (a common folder storing virtual env) to gitignore.
This PR adds [SpriteFontRenderer], which is a new implementation of [TextRenderer], allowing to render text based on fonts embedded into a spritesheet.
See the T-Rex game example, where the score is now rendered based on a spritesheet font.
(Also added highscore tracking for the TRex game).