Commit Graph

3302 Commits

Author SHA1 Message Date
Lukas Klingsbo
a513624d72 Publish flame_forge2d-0.8.1-releasecandidate.13 (#889)
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-07-31 13:22:18 +02:00
Maksim Dadzerkin
abc4371f97 Update README-RU.md (#890)
Fixed some typos
2021-07-30 12:02:21 -04:00
Lukas Klingsbo
031a131a49 Generics on components with gameRef (#888)
* Generics on components with gameRef

* Fix HasGameRef generics for Forge2D

* Fix imports
2021-07-30 10:40:38 +02:00
Luan Nico
810d2020e2 Improve STYLEGUIDE (#886) 2021-07-30 02:36:57 -04:00
Lukas Klingsbo
7e4bc1464e Fix parallax fullscreen bug when game is resized (#887)
* Fix parallax fullscreen bug when game is resized

* Test

Signed-off-by: Lukas Klingsbo <me@lukas.fyi>

* Fix imports

* Remove accidental line

* Re-add mustCallSuper on onGameResize
2021-07-29 14:23:37 +02:00
Luan Nico
1034ca850b Fix coordinate systems transformations and add example (#885) 2021-07-28 01:35:32 -04:00
Lukas Klingsbo
8d644de181 forge2d widget sample (#884)
* Add widget example with forge2d

* Widgets with forge2d

* Add changelog

* Revert ball change

* Set body in setState

* Make widget out of static method

* Screen position as variable
2021-07-27 19:37:24 -03:00
Lukas Klingsbo
af014ac798 Fix the resolution of TextBoxComponent (#878)
* Fix the resolution of TextBoxComponent

* scale canvas

* Scale down

* Scale down on rendering

* Don't affect the debug rendering
2021-07-27 19:56:51 +02:00
Lukas Klingsbo
dcd7d66619 Add remove and removeAll (#877)
* Add remove and removeAll

* Fix the resolution of TextBoxComponent

* Revert "Fix the resolution of TextBoxComponent"

This reverts commit 07f6139008.

* removeChild and removeChildren BaseComponent

* Remove accidental changelog line
2021-07-27 09:31:30 +02:00
Lukas Klingsbo
e3f9f1a469 addShape -> addHitbox (#882) 2021-07-26 20:19:45 +02:00
A Björck
3b5d7e22d5 Update input.md fixing broken links (#883) 2021-07-16 17:41:29 -03:00
Lukas Klingsbo
64a40ff641 Refactor joystick (#876)
* Refactor joystick

* Fix directional tests

* Joystick example

* Any PositionComponent can be used as knob and background

* Add MarginButtonComponent

* Fix JoystickExample

* Update joystick docs

* Fix joystick direction tests

* Fix effect tests

* Fix analyze issue

* Update docs

* Update docs

* Move joystick to input export

* Update packages/flame/lib/src/geometry/shape.dart

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

* Add test and description for screenAngle

* Update examples/lib/stories/controls/joystick_player.dart

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

* Update doc/input.md

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

* controls -> input in examples to align with export file

* controls -> input

* Add simple joystick example

* Fix imports

* velocity -> relativeDelta

Co-authored-by: Luan Nico <luanpotter27@gmail.com>
Co-authored-by: Erick <erickzanardoo@gmail.com>
2021-07-15 12:00:41 +02:00
Lukas Klingsbo
750f63ed97 Rename Camera.cameraSpeed to Camera.speed (#879) 2021-07-15 11:42:48 +02:00
Erick
380781e126 Adding Builder classes for our widgets catalog (#853)
* Add

* Adding SpriteWidgetBuilder

* Adding SpriteButtonBuilder

* Add NineTileBoxBuilder

* a few adjustments on the docs

* Adding error and loading builders to the widgets

* Improving APIs for the widget review

Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-07-13 17:36:13 -03:00
Lukas Klingsbo
0c6014948b Publish flame_forge2d-0.8.0-releasecandidate.13 (#875) 2021-07-08 15:19:47 +02:00
Lukas Klingsbo
cd5234bfd8 Publish flame 1.0.0-releasecandidate.13 (#874)
* Publish flame-1.0.0-releasecandidate.13

* Make files symlinks again
2021-07-08 14:11:14 +02:00
Lukas Klingsbo
a8fd27078f Flip back the canvas Y-axis after render of BodyComponent (#867)
* Fix SpriteAnimationComponent docs

* Fix formatting

* Add BaseComponent.postRender

* Flip back the canvas Y-axis after render of BodyComponent

* Update to Tappable

* Initialize textComponent in onLoad

* Don't update version in pubspec yet
2021-07-08 12:03:10 +02:00
Lukas Klingsbo
c825d58042 Use matrix transformations in FixedResolutionViewport (#869)
* Use matrix transformations in FixedResolutionViewport

* Update viewport tests

* Moved transformations to resize

* Use getters for scaledSize and resizeOffset

* Added a FixedResolutionViewport example
2021-07-08 11:47:28 +02:00
Lukas Klingsbo
d1a72acb36 Rename prepareCanvas to preRender (#870) 2021-07-07 17:23:35 +02:00
Lukas Klingsbo
4ba75199f9 Move intensity to Camera.shake (#871) 2021-07-07 15:12:21 +02:00
Lukas Klingsbo
de90d3e01c Add BaseComponent.postRender (#866)
* Fix SpriteAnimationComponent docs

* Fix formatting

* Add BaseComponent.postRender

* Fix some typos

* Update packages/flame/lib/src/components/base_component.dart

Co-authored-by: Renan <6718144+renancaraujo@users.noreply.github.com>

* Update packages/flame/lib/src/components/base_component.dart

* Update packages/flame/lib/src/components/base_component.dart

Co-authored-by: Renan <6718144+renancaraujo@users.noreply.github.com>
2021-07-07 11:31:44 +02:00
Lukas Klingsbo
1e79a42161 Rename Tapable to Tappable (#868) 2021-07-07 10:48:58 +02:00
Lukas Klingsbo
c7d48bc16d Rename camera shake amount to duration (#864)
* Return camera position after shake

* Rename camera shake amount to duration

* Update wording
2021-07-07 10:32:41 +02:00
Lukas Klingsbo
97faf8cbb4 Fix SpriteAnimationComponent docs (#865)
* Fix SpriteAnimationComponent docs

* Fix formatting
2021-07-06 11:41:56 +02:00
Luan Nico
f818310e5b Extract shared children logic when handling components to ComponentSet (#859) 2021-07-04 02:44:15 -04:00
Lukas Klingsbo
235b080768 Update forge2d docs (#862) 2021-07-02 21:41:18 +02:00
Lukas Klingsbo
5a51a1a7fb Make the JoystickPlayer a PositionComponent (#860)
* Make the JoystickPlayer a PositionComponent

* Fix formatting
2021-06-29 09:28:18 +02:00
Lukas Klingsbo
7d399125c4 Compare correct values for _transformMatrix cache (#857) 2021-06-25 08:31:37 +02:00
Erick
45eabafa39 Adding test to ensure Flame Game is correctly disposed (#856) 2021-06-22 12:23:01 -03:00
Lukas Klingsbo
544998d556 Publish flame forge2d 0.7.3 releasecandidate.12 (#855)
* Fix type bug for _tranform.scale

* Update changelog and readme

* Publish flame_forge2d-0.7.3-releasecandidate.12
2021-06-22 11:39:12 +02:00
Lukas Klingsbo
cf19ec5e4e Migrate flame_forge2d to monorepo (#852)
* Migrate flame_forge2d to monorepo

* Put in the temporary publish to none

* Update docs

* Add dart_code_metrics

* Add analysis options

* Fix analyze issues

* Fix formatting

* Add dart_code_metrics to flame_forge2d example
2021-06-21 22:02:32 +02:00
Lukas Klingsbo
e2aee0cd63 Publish flame-1.0.0-releasecandidate.12 (#850)
* Publish flame-1.0.0-releasecandidate.12

* Bring back symlinks
2021-06-18 09:37:20 +02:00
Lukas Klingsbo
208ae78b84 Fix publish script (#849) 2021-06-18 00:03:09 +02:00
Lukas Klingsbo
0e2b52ff86 Fix camera zoom with offset (#848)
* Fix camera zoom with offset

* Add test for zoom with setRelativeOffset

* Fix formatting
2021-06-17 23:06:18 +02:00
Erick
6c2c8ace08 Extracting actions to generic github actions (#846)
* Extracting dartdoc

* changing to dartdoc to tag

* extracting format action

* changing format action to tag

* extracting analyze action

* changing format action to tag

* extracting test action

* updating to use tag
2021-06-17 12:10:54 -03:00
Renan
cb6a0e69b4 Make render object not be sized by parents anymore (#845) 2021-06-16 09:31:57 -03:00
Renan
376395d638 Add some render box updates (#841)
* Add some render box updates

* Update packages/flame/CHANGELOG.md

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

* Update packages/flame/lib/src/game/game_widget/game_widget.dart

Co-authored-by: erickzanardo-dx <78105285+erickzanardo-dx@users.noreply.github.com>

* update render box

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
Co-authored-by: erickzanardo-dx <78105285+erickzanardo-dx@users.noreply.github.com>
2021-06-09 23:55:31 +01:00
Lukas Klingsbo
948f277e5d Fix gestures when isHud = true and camera is transformed (#843)
* Fix gestures when isHud = true and camera is transformed

* Use Info instead of Event everywhere
2021-06-09 23:47:59 +02:00
Lukas Klingsbo
2c1bba8f86 Use Matrix4 tranformation for Camera.apply (#840)
* Added Matrix4 extension

* Added unit tests for Matrix4 extension class

* Update doc/util.md

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

* Updated code

* Updated docs

* Update

* Update Matrix4

* Added Translate method

* Update based on Luan and Spydon review

* Update after review

* Forgot few changes

* Update

* Use Matrix4 tranformation for `Camera.apply`

* Remove accidentally added zoom

* Add transform to MockCanvas

* Use same Matrix4 if nothing changed

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
2021-06-09 16:55:13 +02:00
Lukas Klingsbo
a7fd05f2b5 Make game.size take zoom into consideration (#836)
* Make game.size take zoom into consideration

* Fix formatting

* Fix formatting

* Apply suggestions from code review

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

* Move _sizeBuffer

* Apply suggestions from code review

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

* Update list from wolfenrains suggestion

* Fix formatting

* Update CHANGELOG.md

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
2021-06-09 16:39:45 +02:00
Renan
607c4bbdcd Add link to docs summary (#842)
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2021-06-09 13:37:12 +01:00
Jochum van der Ploeg
d6b60fe79d Added Matrix4 extension (#838)
* Added Matrix4 extension

* Added unit tests for Matrix4 extension class

* Update doc/util.md

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

* Renamed transformVector2 to transform2
2021-06-09 09:40:57 +02:00
Erick
55aea41788 Adding animation support to parallax (#835)
* Adding animation support to parallax

* Solving workaround

* Fixing image composition add assert

* adding docs, linting and a better example

* lint

* Apply suggestions from code review

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

* Update examples/lib/stories/parallax/sandbox_layer.dart

* Update doc/components.md

* Update examples/lib/stories/parallax/sandbox_layer.dart

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

* Update examples/lib/stories/parallax/animation.dart

* formating

* Update .min_coverage

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
2021-06-07 13:31:19 -03:00
Lukas Klingsbo
31f0437a40 Fix rendering of polygons in ShapeComponent (#839)
* Fix rendering of polygons in ShapeComponent

* Fix wording

* Update packages/flame/CHANGELOG.md

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

* Update isCanvasPrepared comment

Co-authored-by: Jochum van der Ploeg <jochum@vdploeg.net>
2021-06-07 16:31:54 +02:00
Liu Peng
bd840b1676 Add anchor for ShapeComponent constructor (#837)
* Add `anchor` for `ShapeComponent`

* add default anchor
2021-06-05 17:46:44 +02:00
Luan Nico
60a3095c64 Fix a couple gnarly bugs (#833) 2021-06-01 17:10:27 -04:00
Lukas Klingsbo
0a7a6867bf Relative flame paths for bridge packages (#832)
* Script for handling publishing

* Use relative paths to Flame for bridge packages

* Publish flame_svg-1.0.0-rc5

* Publish flame_svg-1.0.0-rc5

* Real publish in script

* No slash at end of relative path

* Roll back svg changelog

* rc4 for svg

* Update fire atlas to use new position details

* Update usage of script
2021-05-30 01:10:33 +02:00
Luan Nico
ecc0d14713 Refactor base game to use QueryableOrderedSet for Collidables (#830) 2021-05-29 16:37:40 -04:00
Luan Nico
0490dcb5f5 Fix renderRotated (#831) 2021-05-29 16:09:32 -04:00
Lukas Klingsbo
c518227c7d Add priority to all component constructors (#828)
* Add priority to all component constructors

* Remove SvgComponent priority but add TODO

* Fix formatting

* Remove leftover default
2021-05-29 20:25:53 +02:00