Commit Graph

3302 Commits

Author SHA1 Message Date
Luan Nico
10217ee478 Fix a couple bugs with Text and debugMode (#829) 2021-05-29 00:11:18 -04:00
Luan Nico
488542aa36 Make it possible to work with the new Text inheritance chain (#825) 2021-05-28 20:48:41 -04:00
Erick
902e6ee299 Removing unnecessary actions from our CI (#827)
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-05-28 11:59:44 -04:00
Luan Nico
7234903cbb Refactor tests to use expectVector2 and expectDouble (#826)
* Refactor tests to use expectVector2 and expectDouble

* Update expect_double.dart

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-05-28 11:40:34 -04:00
Jochum van der Ploeg
021b453b54 Migrated the Particle API to Vector2 (#728)
* Migrated the `Particle` API to `Vector2`

* Update doc/particles.md

Co-authored-by: Erick <erickzanardoo@gmail.com>

* Follow-up on Erick's review

* Fix

* Apply suggestions from code review

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

* Update

* Update

* Update

* Update packages/flame/lib/src/extensions/vector2.dart

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

* Updated

* Update

* Using scale

Co-authored-by: Erick <erickzanardoo@gmail.com>
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-05-27 21:40:50 +02:00
Lukas Klingsbo
609ab27d69 Update pubspec.yaml (#824)
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-05-27 11:23:53 +02:00
Alex Li
7db0ca995e 📝 Update README in Chinese (#816)
* 📝 Re-new Chinese README

* 📝 Re-new Chinese README

* 🚀 Bring the group link back

* 🐛 Fix broken links

Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-05-27 10:19:19 +02:00
Luan Nico
b1c3cff2bf Parse color from hex (#814) 2021-05-25 23:28:10 -04:00
Luan Nico
4700ba58ba Add support to math.Rectangle to our extensions (#820) 2021-05-25 07:25:05 -04:00
Luan Nico
36ce6f1781 Fix Github actions to run on the new master branch (#819) 2021-05-24 17:50:08 -04:00
Lukas Klingsbo
7b6013ea3a Upgrade flutter_svg (#818)
* Upgrade flutter_svg

* Update changelog
2021-05-24 18:25:31 +02:00
Lukas Klingsbo
fd14015876 Fix anchor for rendered text in TextComponent (#817) 2021-05-24 15:30:10 +02:00
Lukas Klingsbo
463c6e651e Move flame_svg to monorepo (#813)
* Move flame_svg to monorepo

* Add code metrics

* Remove comment from example pubspec

* Correct asset_cache import
2021-05-22 20:22:01 +02:00
Luan Nico
2c81094a09 Bump flame audio version for release (#810) 2021-05-22 12:00:12 -04:00
Lukas Klingsbo
aa199212a7 Fix RotateEffect with negative delta (#808)
* Fix RotateEffect with negative delta

* Add tests for negative angles
2021-05-22 13:39:18 +02:00
Lukas Klingsbo
bc8bec54d4 Add isDragged to Draggable (#809)
* Add isDragged to Draggable

* Add test for isDragged
2021-05-22 13:28:56 +02:00
Luan Nico
77a2173869 Move flame_audio & update to work with current rc11 (#807) 2021-05-21 22:37:30 -04:00
Lukas Klingsbo
5333164a9e master -> main for basePath link in examples (#806) 2021-05-22 00:04:19 +02:00
Lukas Klingsbo
6113ac6e6d Release rc11 (#804) 2021-05-21 22:59:56 +02:00
Josh Kautz
08a9d680cd Update tutorial/2_sprite_animations_gestures/README.md (#805)
* Update tutorial/2_sprite_animations_gestures/README.md

Removed the premature usage of the TapDetector mixin, which is addressed later in the tutorial.

* Update CHANGELOG.md

Added change to the changelog.
2021-05-21 22:49:59 +02:00
Luan Nico
5503db4e5f Add optional flag to format script to facilitate auto fixing issues (#801) 2021-05-21 10:20:33 -04:00
Luan Nico
9c1808ca92 Add hoverables (#797) 2021-05-21 09:04:12 -04:00
Lukas Klingsbo
8f7c773f82 Fix parallax size (#800)
* Non-fullscreen ParallaxComponent

* Updated examples with no size needed

* Formatting

* Add docs for fullscreen parallax

* Fix formatting

* Remove need of nullable size

* Add basic parallax sizing test

* Fix formatting

* Remove unused imports

* Info text for the parallax examples
2021-05-20 16:58:49 +02:00
Erick
bc5decd193 Adding FireAtlas package into the mono repo (#798)
* Adding FireAtlas package into the mono repo

* Adding missing package

* formatting

* Spydon's suggestion

* Reverting folder renaming

* Apply suggestions from code review

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-05-20 09:39:49 -03:00
Lukas Klingsbo
ef7427941c Possibility to change priority and reorder the component list (#793)
* Possibility to change component priority

* Fix formatting

* Posibility to change priority

* Docs for priority change

* Priority example

* Add section explaining priority

* Update doc/game.md

Co-authored-by: Erick <erickzanardoo@gmail.com>

* Update examples/lib/stories/components/components.dart

Co-authored-by: Erick <erickzanardoo@gmail.com>

* No null priorities in the super call chain

* Possibility to wait for all children to be loaded

* Test for addChildren

* Introduce parent to Component

* Check whether parent is BaseComponent

Co-authored-by: Erick <erickzanardoo@gmail.com>
2021-05-19 19:07:54 +02:00
Luan Nico
5f78a15770 Some fixes and improvements (#795) 2021-05-19 11:38:28 -04:00
Erick
2dc47fe66a Adding coverage checking (#794)
* Adding coverage checking

* Installing lcov on ci

* printing summary

* Update scripts/test.sh

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

* Improving scripts

* Update .github/pull_request_template.md

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>

* Update scripts/test.sh

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

* reverting to pwd

* Update scripts/test.sh

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

* Updating changelog and min coverage

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
2021-05-18 11:42:31 -03:00
Lukas Klingsbo
e4281d6471 onCollisionEnd callbacks for Collidable and HitboxShape (#792)
* Add onCollisionEnd for HitboxShape and Collidable

* Add tests for collision callbacks

* Detect multiple collsions with same collidable in test

* Remove unused import

* Break out duplicated code

* Fix formatting

* Use correct hash set

* Update examples/lib/stories/collision_detection/multiple_shapes.dart

Co-authored-by: Erick <erickzanardoo@gmail.com>

* Update examples/lib/stories/collision_detection/multiple_shapes.dart

Co-authored-by: Erick <erickzanardoo@gmail.com>

* Use hashValues instead of _combineHashCodes

* hashValues is order dependent so we need to sort the objects first

* Add section about onCollisionEnd

* Fix missed hashValues

* Use xor instead of hashValues

* Update examples/lib/stories/collision_detection/collision_detection.dart

Co-authored-by: Luan Nico <luanpotter27@gmail.com>

Co-authored-by: Erick <erickzanardoo@gmail.com>
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-05-18 16:21:49 +02:00
Lukas Klingsbo
52a0239ab5 Test for onRemove on re-adding component (#788)
* Fix SpriteWidget anchor

* Add test for onRemove on re-adding component
2021-05-10 23:21:31 +02:00
Lukas Klingsbo
8dfa682e21 Fix SpriteWidget anchor (#787)
* Fix SpriteWidget anchor

* Fix formatting
2021-05-10 22:14:36 +02:00
Lukas Klingsbo
b8d54cdcb7 Fix link in examples readme (#784)
* Fix link in examples readme

* Update grammar

* Refer to the examples and not the "example"
2021-05-09 17:00:43 +02:00
Lukas Klingsbo
1f4509b2cb Change to source-lines-of-code for metrics (#785)
* Remove deprecated analysis option

* Pin dart_code_metrics to 3.1.0

* Update changelog

* Change to source-lines-of-code
2021-05-09 16:13:15 +02:00
Lukas Klingsbo
5a605385f8 Update for rc10 (#782)
* Test rendering

* Update to rc10

* Remove rc reference from tutorials
2021-05-04 23:41:30 +02:00
Lukas Klingsbo
6d17424c13 Fix collision detection and rendering of local shape angles (#773)
* Fix collision detection with anchor other than center

* Fix rotation around anchor

* Simplify advanced collision detection example

* Add some tests

* Simplify multiple shapes example more

* Move shapeCenter logic into Shape

* Render center point

* More debugging in MultipleShapes

* Wtf.

* Re-add "possibly" calculation

* Rotate shape around parent center

* Only consider the parent center

* Format multiple shapes example

* Add simple shapes example

* Add caching in polygon

* Fix rendering of polygon shapes

* Remove print

* Add changelog entry

* Fix analyze complaints

* Remove all shapes that contain the pressed point

* Take zoom into consideration in multiple shapes example

* Remove useless import

* map instead of generate

* Fix position component test

* Simpler negative vector2

* "Correct" format

* Add ShapeComponent instead of camera aware shapes

* Fix formatting

* Remove zoom from collision detection example

* No need for gameRef in MultipleShapes example

* Fix naming in only_shapes
2021-05-04 22:31:36 +02:00
Lukas Klingsbo
8a3c71567c Fix camera projections (#776)
* Fix camera projections

* Fix formatting

* Test rendering

* Add another test

* Remove test

* Add test for draggables

* Fix formatting

* Nicer formatting

* Add changelog entry
2021-05-04 21:09:24 +02:00
Lukas Klingsbo
b298db614a Same debugMode for children as for parent (#778)
* Same debugMode for children as for parent

* Add test for child debugMode
2021-05-03 17:44:33 +02:00
Erick
b65bac8aed Updating dashbook and adding an example with info (#779) 2021-05-03 09:12:50 -03:00
Erick
0cb64fb57f Draggables weren't using the new coordinate system (#777)
* refactoring drag start events

* Fixing joystick, adding tests and examples

* format fixes
2021-04-30 10:01:42 -03:00
Erick
d9e0acd3ff Abstracting text API to enable custom renderers (#772)
* Abstracting text API to enable custom renderers

* Addressing comments

* Lint

* Update doc/text.md

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

* Adding dartdoc about TextRenderer

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-04-29 09:24:17 -03:00
Erick
91864d0b88 Making velocities and deltas have the game and global values (#769)
* Making velocities and deltas have the game and global values

* Re adding code metircs

* Re adding code metircs

* Update packages/flame/lib/src/gestures/events.dart

Co-authored-by: Luan Nico <luanpotter27@gmail.com>

* Renaming example variable

* fixing example

* Linting

Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-04-25 14:54:04 -03:00
Luan Nico
ccefeed1be Improve camera (#770) 2021-04-24 14:18:27 -04:00
Erick
cba7f59302 Adding CNAME to examples/web folder to make this config persistent (#771) 2021-04-23 07:02:18 -03:00
Luan Nico
989947174e Bring back renderRect to Sprite (#768) 2021-04-21 11:21:57 -04:00
Renan
15cba12eea Add entries to styleguide (#752) 2021-04-21 11:07:00 -04:00
Erick
defcb456e1 Adding SpriteAnimationGroupComponent (#766)
* Adding SpriteAnimationGroupComponent

* adding tests

* Changing ci to use flutter stable

* Addressing Spydon's comments

* reverting analysis_options.yml

* linting
2021-04-21 11:30:48 -03:00
Luan Nico
27237043d5 Add variable height to the isometric tile layer (#756) 2021-04-21 00:47:54 -04:00
Luan Nico
6dd37161c4 Implement coordinate transformations correctly for cameras and viewports (#764) 2021-04-21 00:20:37 -04:00
Erick
6b2f8032fe Making Flame events aware of camera (#755)
* some initial refactoring

* Fixing examples and joystick component

* Fixing examples

* Addressing comments from PR

* Fixing tutorials

* Updating docs

* Fixing tests

* PR followup

* A big follow up

* linting

* doc nit

* Changelog and fix tutorial

* Addressing comments

* Fixing BaseGame project and scale offset methods

* Formatting

* doc suggestions

* Update packages/flame/lib/src/gestures/events.dart

Co-authored-by: Luan Nico <luanpotter27@gmail.com>

* Hopefully, the last follow up

* Linting and adding dart-code-metrics again

* fixing tutorial

Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-04-15 15:28:46 -03:00
Daniel Porteous
1c2f03903b [docs] Update tutorials link on README.md (#762)
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-04-15 09:59:27 -03:00
Lukas Klingsbo
d7b56ece73 Fix bounding box check in collision detection (#761)
* Fix bounding box check (collision detection)

* Make possible collision check more efficient

* Remove unused dependency

* Fix polygon hitbox cache invalidation
2021-04-15 09:37:03 +02:00