Commit Graph

3302 Commits

Author SHA1 Message Date
Luan Nico
446954dc01 Refactoring the joystick code (#687) 2021-02-27 16:16:45 -05:00
Luan Nico
f6db096ac6 Small fixes and nits to make null-safe simpler (#686) 2021-02-26 09:45:50 -05:00
Luan Nico
09631a23a5 Bump versions for relase 2021-02-24 16:36:25 -05:00
Luan Nico
f82f8acfb3 Lights, Camera, Action! - Add camera and viewport (#673) 2021-02-24 16:27:56 -05:00
Lukas Klingsbo
cb15de7e0f Fix order of parent -> children rendering (#684)
* Fix order of parent -> children rendering

* Fix import

* Move debug rendering

* Call renderTree on children too

* Component to have renderTree
2021-02-24 20:17:28 +01:00
Lukas Klingsbo
9ab9003c85 Revert "Fix children render order (#682)" (#683)
This reverts commit 5dea1ae54a.
2021-02-24 12:42:04 +01:00
Lukas Klingsbo
5dea1ae54a Fix children render order (#682)
* Fix children render order

* Add changelog
2021-02-23 23:54:19 +01:00
Luan Nico
062b73d5f5 More followups from #667 : Unifying constructor logic + small improvements and docs (#681) 2021-02-23 17:38:19 -05:00
Luan Nico
9c38c9bd04 New linter rules (#676) 2021-02-23 12:16:23 -05:00
Luan Nico
6329a12150 Followups to #667 (#680) 2021-02-23 11:49:11 -05:00
Lukas Klingsbo
cdca4b6858 Standardize on dt in update methods (#679)
* Standardize on dt in update methods

* Update changelog entry

* Update CHANGELOG.md

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

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
2021-02-23 17:36:05 +01:00
pedia
9735cf5e08 Improve default constructor for positioned components (#667) 2021-02-23 11:27:17 -05:00
Jochum van der Ploeg
ec09ce0ce6 Added toImage method (#661) 2021-02-22 18:34:21 -05:00
Lukas Klingsbo
4e5b75eafb Enable user-defined Anchors (#675)
* Enable user-defined Anchors

* Fix formatting

* get toVector2 -> toVector2()
2021-02-22 22:09:41 +01:00
Jochum van der Ploeg
3078a7a4fd Updating Github templates (#616) 2021-02-22 15:59:40 -05:00
Lukas Klingsbo
bde4585fa0 Collision detection (#633)
* Move out collision detection methods

* Add possibility to define a hull for PositionComponents

* Add example of how to use hull with tapable

* Update contains point comment

* Fix contains point

* Hull should be based on center position

* Remove collision detection parts

* Use percentage of size instead of absolute size

* Separate hull from PositionComponent

* Clarify hull example

* Fix formatting

* Change to relative import

* Use mixin for hitbox

* Update changelog

* Rename HasHitbox to Hitbox

* Clarified names

* Add spaces within braces

* Removed extra spaces in the braces

* Moved point rotation to Vector2 extension

* Render hitbox within extension

* Added collision detection

* Add tests

* Separate classes into files

* Fix formatting

* Move geometry files into geometry directory

* Use relative import for mixin

* Begin intersections between different shapes

* Add shape class

* Align with rebase

* Fix CHANGELOG

* Fix children positioning

* New polygon intersection algorithm

* No anchor for shape in PoC

* Remove unused imports

* Smarter bounding rectangle comparisons

* Formatting

* Add Circle to Circle collision

* Circle-polygon intersections

* Explanation of circle-circle intersections

* Properly render circle circle collisions

* Fix formatting

* Better example

* Update docs for collision detection

* Fix formatting

* Add polygon definition example

* Update documentation about the shapes

* Moved premature rc6 changelog line

* Added a cache system for shape calculations

* Fix formatting

* Fix formatting

* Fix imports

* Add collidable polygon to example

* Use anchorPosition for PositionComponent containsPoint

* Fix angle problem for Rectangle

* collisionCallback -> onCollision

* Fixed Erick's comments

* Improve collision detection example

* Fix #662, zero size doesn't contain any points

* Fix formatting

* Can't contain point if x or y is 0

* Fix formatting

* Fix test

* Remove unnecessary collidable example part

* Align with Draggable overhaul

* Updated collision detection docs

* Fix PR comments

* Have more sensible Circle constructor

* Clarify shape fields

* Need ensureInitialized

* Update docs to conform with switched constructors

* Fix new definitions

* Fix formatting

* Update documentation

* Fix formatting

* Fix formatting

* Exclude metrics check for test files

* Add another simpler example of collision detection

* Updated according to comments

* Fix comments

* Fix more comments

* Fix more comments

* Fix relative import

* Fix comments

* Moved export of geometry

* Fix comments

* Remove unused import

* Fix assert for shape.component

* Fix comments

* Expect instead of assert in test
2021-02-22 00:44:11 +01:00
Luan Nico
65584bdc91 Make the anchor class look more like an enum (#669) 2021-02-19 14:56:06 -05:00
Luan Nico
9be4031706 Add assert to make Draggables are used properly (#671) 2021-02-19 14:47:37 -05:00
Erick
19ff80a0eb Adds checking for trailling commas on the project (#670)
* Testing a new linter option for trailling commas

* Checking trailling commas on linter
2021-02-18 11:31:45 -03:00
pedia
e712d423dd fix SpriteAnimationComponent.shouldRemove use Component.shouldRemove (#666) 2021-02-16 23:20:11 -03:00
Erick
0d4df1acc2 Preventing errors caused by the premature use of size property on game (#659) 2021-02-15 17:07:58 -05:00
Luan Nico
12cafb1da3 Draggables Overhaul (#660) 2021-02-15 14:06:35 -05:00
Luan Nico
8e2ba4a4bf Remove old examples that have already been ported (#656) 2021-02-10 20:24:35 -05:00
Jochum van der Ploeg
ac40b2c787 Added Color and Image extensions (#653)
Co-authored-by: Erick <erickzanardoo@gmail.com>
2021-02-09 20:25:55 -03:00
Lukas Klingsbo
b1fa449dae Migrate RaisedButton -> ElevatedButton (#654)
* Migrate RaisedButton to ElevatedButton

* Add changelog entry
2021-02-09 20:22:03 -03:00
Erick
d98a1ede44 Improving Parallax APIs regarding handling its size and the use outside FCS (#651)
* Improving Parallax APIs regarding handling its size and the use outside FCS

* Formatting

* Fixing flutter format vs flutter analyze crazy conflicts

* Some suggestions

* Removing unecessary line

* Luan suggestions

* Luan suggestion

* Lukas suggestions

* updating comment
2021-02-04 12:26:37 -03:00
Erick
4db3c0e401 Enabling direct import of Sprite and SpriteAnimation (#652)
* Enabling direct import of Sprite and SpriteAnimation

* Renan follow up

* Fixing spritesheet exmaple

Co-authored-by: Erick Zanardo <erickzanardoo@gmail.com>
2021-02-03 14:20:39 -03:00
Jochum van der Ploeg
64a474ff38 Adding rotation to the ImageComposition class (#646)
* Added rotation to the ImageComposition class

* Renamed compositon to image_composition
2021-02-03 17:15:45 +01:00
Lukas Klingsbo
7b12bb1931 Fix forge2d.md typo 2021-02-01 17:55:48 +01:00
Erick Zanardo
c56f44fdc4 Updating mds with recently 0.x patches 2021-01-28 21:42:29 -03:00
Erick
976e8daf35 Adapting ParallaxComponent constructors to other components (#642)
* Adapating ParallaxComponent constructors to other components

* Removing wrongly commited folder

* Update doc/components.md

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

* Update doc/components.md

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

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
2021-01-27 09:13:56 -03:00
Erick
ab18edb00f Adapting SpriteBatchComponent constructors to other components (#643) 2021-01-26 22:12:58 -03:00
Erick
0c3d8f1bf1 Removing Util.dart and moving its remaining parts to better places (#640)
* Removing Util.dart and moving its remaining parts to better places

* Fixing lint

* Doc fixes

* Doc fixes

* PR suggestions
2021-01-25 08:53:52 -03:00
Lukas Klingsbo
0593e35766 Add hitbox to PositionComponent (#618)
* Move out collision detection methods

* Add possibility to define a hull for PositionComponents

* Add example of how to use hull with tapable

* Update contains point comment

* Fix contains point

* Hull should be based on center position

* Remove collision detection parts

* Added tests

* Use percentage of size instead of absolute size

* Separate hull from PositionComponent

* Clarify hull example

* Fix formatting

* Override correct method

* Use mixin for hitbox

* Update changelog

* Rename HasHitbox to Hitbox

* Clarified names

* Center to edge is considered as 1.0

* Fix test

* Add spaces within braces

* Removed extra spaces in the braces

* Add hitbox docs

* Fix link

* Moved point rotation to Vector2 extension

* Render hitbox within extension

* Fix rebase

* Fix rebase

* Fix formatting
2021-01-20 23:39:01 +01:00
Lukas Klingsbo
b92a22fe27 Release v1.0.0-rc6 (#639) 2021-01-20 22:19:18 +01:00
Jochum van der Ploeg
f9f4167d02 Added a required to GameWidget and updated the docs (#638)
* Added a required to GameWidget and updated the docs

* Removed entry from CHANGELOG
2021-01-20 22:11:33 +01:00
Jochum van der Ploeg
62780cabe2 Initial implementation of the Composition class. (#634)
* Initial implementation of the Composition class

* Added decodeImageFromPixels web support
2021-01-20 19:58:58 +01:00
Lukas Klingsbo
5d953c8b24 Fix gesture detection on children (#636)
* Fix gesture detection on children

* Remove unused imports

* positionParent should be private

* Fixed comment

* Moved parent to BaseComponent

* Fix formatting
2021-01-20 13:44:06 +01:00
Renan
ccee9a466b Move files to src and comply with the dart package layout convention (#621)
* 👌 Use `Offset` type directly in `JoystickAction.update` calculations (#631)

* Move files to src and comply with the dart package layout convention

* Fixing widgets example

Co-authored-by: Serge Matveenko <lig@countzero.co>
Co-authored-by: Erick Zanardo <erickzanardoo@gmail.com>
2021-01-20 09:05:43 -03:00
Serge Matveenko
a8ef5cadea 👌 Use Offset type directly in JoystickAction.update calculations (#631) 2021-01-17 21:37:46 -03:00
Jochum van der Ploeg
33f61d2bab Added fallback support for the web on the SpriteBatch API (#612)
* Added fallback support for the web on the `SpriteBatch` API

* Refactored the SpriteBatch class
2021-01-18 00:15:13 +01:00
Erick
c462dd6913 Making SpriteComponent and SpriteAnimationComponent follow the same standard for empty constructors (#620) 2021-01-17 11:31:15 -03:00
Erick
c8dc0b45c5 Removing initialDimensions and removeGesture methods (#627)
* Removing initialDimensions and removeGesture methods

* Removing wrongly commited folder

* PR suggestion
2021-01-17 11:21:37 -03:00
Jochum van der Ploeg
9890ad73ed Updated the widgets docs (#628)
Co-authored-by: Erick <erickzanardoo@gmail.com>
2021-01-17 11:17:15 -03:00
Serge Matveenko
11d93c23b2 👌 Throw exception from parseAnchor in examples/widgets instead of returning null (#632) 2021-01-17 11:10:03 -03:00
Lukas Klingsbo
2d68ba0feb Update README to point at rc5 (#630)
* Update README to point at rc5

* Update README.md
2021-01-15 13:53:57 +01:00
Serge Matveenko
16eaef3bb1 🏷 Backport some code improvements from the null-safety branch (#603) 2021-01-08 23:25:29 -03:00
Christopher Casey
5b1988ca36 Add Timer tests and fix progress (#611)
* Add Timer tests and fix progress

* Add Timer tests & progress fix to CHANGELOG
2021-01-07 09:52:49 -03:00
Lukas Klingsbo
af53438cd4 Refactor ParallaxComponent (#613)
* Simplified loading of ParallaxComponent

* Loading helpers for the different Parallax parts

And refactor how the delta velocity works

* Fix formatting

* Break out Parallax out of ParallaxComponent

* Fix docs

* Add extension for loading different parallax things on game

* Fix formatting

* Add loadParallaxComponent extension

* Fix formatting
2021-01-06 21:07:31 +01:00
Renan
0b6efdf170 Fix docs for new site (#557)
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-01-06 14:54:19 -03:00