Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding flutter mini sprite #40

Merged
merged 6 commits into from Sep 12, 2022
Merged

Conversation

erickzanardo
Copy link
Member

Description

Adding the flutter mini sprite package.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ› οΈ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • βœ… Build configuration change
  • πŸ“ Documentation
  • πŸ—‘οΈ Chore

Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some small comments, but otherwise lgtm!

@@ -4,6 +4,8 @@
<modules>
<module fileurl="file://$PROJECT_DIR$/packages/flame_mini_sprite/example/melos_example.iml" filepath="$PROJECT_DIR$/packages/flame_mini_sprite/example/melos_example.iml" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be committed

packages/flutter_mini_sprite/README.md Outdated Show resolved Hide resolved
packages/flutter_mini_sprite/example/README.md Outdated Show resolved Hide resolved

for (var y = 0; y < sprite.pixels.length; y++) {
for (var x = 0; x < sprite.pixels[y].length; x++) {
if (sprite.pixels[y][x] != -1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the X and Y axis flipped? πŸ€”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't consider it flipped because that is by design haha

I find it more natural to keep the vertical axis as the first dimension of the matrix, when projecting it to the plane, the positions are just as they are declared.

I am open to discussing this more if you feel otherwise though, but we should do that on a different PR :)

@@ -0,0 +1,160 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be checked in for the lib

erickzanardo and others added 2 commits September 12, 2022 12:01
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
@erickzanardo erickzanardo merged commit 1ff2da9 into main Sep 12, 2022
@erickzanardo erickzanardo deleted the feat/flutter_mini_sprite branch September 12, 2022 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants