* wip o lifecycle
* Component.add() is no longer async
* fix a test
* game.ready
* fix analyze issues
* FcsRoot
* fix tests
* fix game-in-game example
* Merge _addImpl with add()
* Move some of the functionality from prepare() into add()
* Moved FcsRoot into component.dart and renamed
* more doc-comments
* dartdocs
* Remove addLater in ComponentSet
* format
* temporarily switch to path dependency in flame_test
* restore a test
* format
* get rid of prepare() in Collidable
* eliminate prepare() in Draggable
* eradicate prepare() in Hoverable
* remove prepare() from Tappable
* remove prepare() method and isPrepared flag
* remove prepareComponent() from HasCollidables
* remove prepareComponent
* make flame_bloc depend on latest flame
* try to solve flame_bloc dependency graph
* fix game resize issue
* fix gameresize for zoomed game
* do not allow zero size in onGameResize
* move onMount() call into add()
* use loadingBuilder when size is 0
* ComponentTreeRoot is now in its own file
* addToParent()
* switch to mount queue
* rename isReadyToMount -> isPrepared
* make isMounted and isPrepared readonly
* minor
* print error stacktrace
* Component.add() is now async
* fix tests
* unused import
;
* undo irrelevant changes in Component
* update tests
* tests cleanup
* format
* expand doc for ComponentTreeRoot
* fix analysis error
* added tests
* update docs
* resolve version conflict in pubspec
* Apply suggestions from code review
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
* late final
* remount() function
* remove mountQueue
* simplify ready()
* run mount during children queue processing
* simplify mounting
* rename childrenQueue->childreQueues
* merge tryMounting() with remount()
* avoid statics in components lifecycle
* remove ComponentTreeRoot
* remove dead code
* added a todo
* added docs for SingleGameInstance
* Added tests for SingleGameInstance
* added SingleGameInstance to the main doc site
* Added test for multi-widget games
* cleanup
* use state variable in Component
* remove test as dependency
* upgrade mocktail version
* upgrade dartdoc version
* fix analyzer warnings
* mark staticgameinstance as internal
* remove ComponentSet.addChild
* use log() from dart:developer
* undo changes in flame_bloc/pubspec.yaml
* redo changes in flame_bloc/pubspec.yaml
* fix dependency in flame_test
* remove test dependencies
* update pubspec files
* remove dart_code_metrics from pubspec
* fix a test
* Added GameTester.makeReady
* omit type on class variable when it can be inferred
Co-authored-by: Erick <erickzanardoo@gmail.com>
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
Co-authored-by: Erick <erickzanardoo@gmail.com>
Since pointerId is already handled by the handle* methods we don't have to expose it in the onDrag* methods, this conforms with the standard set in Tappable.
An effect controller that represents a single period of the sine function. Use this to create
natural-looking harmonic oscillations. Two perpendicular move effects governed by
SineEffectControllers with different periods, will create a [Lissajous curve].
Added SequenceEffect, which performs a series of other effects.
The biggest challenge in implementing this feature came from the need to run the sequence in reverse, due to the alternate flag. This required that every effect and every controller supported running "back in time", which is not as simple as it sounds.
The following breaking changes were introduced:
The Effect class no longer supports .reverse() method and .isReversed flag.
This flag was added only 2 weeks ago (
Effect controllers restructuring #1134), with the idea that it will be necessary for the SequenceEffect. However, as it turned out, this flag is not as helpful as I thought it would be. In fact, given the user's ability to change it any point, it makes the implementation very error-prone.
To be clear, the ability for each effect to run in reverse remains -- only now it can no longer be triggered by the user manually. Instead, SequenceEffect triggers that ability itself at the alternation point. If there is demand in the future to manually force any effect to run backwards, we could restore this flag, but this would require thorough testing to make it work correctly.
Infinite effects now return duration = double.infinity instead of null, which seems more appropriate.
Simple alternating effect controller. Over the course of one period, this controller will proceed
linearly from 0 to 1, then to -1, and then back to 0. Use this for oscillating effects where the
starting position should be the center of the oscillations, rather than the extreme (as provided
by the standard alternating EffectController).
This:
Add new rule use_if_null_to_convert_nulls_to_bools to flame_lint (no violations)
Add new rule use_key_in_widget_constructors (several violations)
Fix violations
Exclude generated files from flame_lint (we don't have any on this repo but when using on games often there are)
I believe this is not a breaking change because it just adds optional arguments to constructors, but if it is, we can reconsider this PR.
* Added Component.childrenFactory
* fix some of the lint warnings
* more lint warnings
* remove changelog entry
* more analyzer warnings
* one more warning
* one more warning
* remove more unused imports
* fix more warnings
* another warning
* one more warning
* a lot more warnings
* some more warnings
* fix warnings in flame_svg
* fix warnings in flame_bloc
* Remove OrderedSet override feature
* Remove testRandom change
* Remove unnecessary type checks
* Re-remove deprecated argument in random_test
Co-authored-by: Pasha Stetsenko <stpasha@google.com>
* Implementing ColorEffect on the new effects system
* docs and test
* docs
* Apply suggestions from code review
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
* PR suggestions
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
* MoveAlongPathEffect separated from MoveEffect
* rename _lastPosition -> _lastOffset
* Added absolute= flag in MoveAlongPathEffect
* added test for absolute path
* add oriented= flag
* added test
* changelog
Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
* Camera as an internal component
* Correct respectCamera
* Added changelog entry
* Add super call that will later be removed
* Rename callRender -> callOwnRender
* Don't call render when root
* Remove callOwnRender
* Skip CameraWrapper in own renderTree
* Too complex to have camera as component
* Revert test
* Update docs for respectCamera
* Move down field
* Fix changelog
* OpacityEffect example
* Add OpacityEffect example
* Added test for OpacityEffect
* Added changelog entry
* Fix dartdocs
* Reset rounding errors between runs
* Fix test and rounding error
* Update rounding error calculation
* Rounding error should be private
* Bump test epsilon
* Added the `SizeEffect` and a general `ComponentEffect`
* Added changelog entry
* Format throw
* Fix analyze issue
* Fix Transform2DEffect test
* Apply suggestions from code review
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
* Fix missing example parenthesis
* Fix according to comments
Co-authored-by: Luan Nico <luanpotter27@gmail.com>
* Animations, CameraAndViewport, CollisionDetection and Components unified
* Added descriptions to effects
* Rename input games
* Unify input stories
* Add info to parallax section
* Added descriptions to the rendering examples
* Add descriptions to the sprites directory
* Fix utils and rendering section
* Add descriptions to the widgets section
* Delete directory that rebase brought back
* Unify game names
* Added some styleguide docs for examples
* Fix analyze issues
* All files should have _example as suffix
* Made the FollowComponentExample a bit easier to understand
* Change priority of ember
* `ShapeComponent` changes size, position and angle of underlying Shape
* Added description to ShapeComponent
* Fix test
* Update packages/flame/lib/src/components/shape_component.dart
Co-authored-by: Erick <erickzanardoo@gmail.com>
* Add absoluteScale and absoluteAngle to PositionComponent
* Refactor ShapeComponent
* Should be scaled by total scale, not scaled size
* Premature optimization for creation for objects in Polygon
* Use path for default Polygon constructor
* Do not sync component and hitbox shape
* Fix analyze issue
* Add example for flipping with collision detection
* Don't use absoluteScale
* Fix examples
* Fix examples
* Doesn't need super.render
* Fix Circle dartdoc
* Update changelog
* Update names of vertices caches in Polygon
* Update text docs
* Revert "Update text docs"
This reverts commit 73a68a465d76eb0eb50bb3753e57b2f4e3b5a7f4.
* Fix examples
* ShapeComponents docs
* Move example games to the top
* Fix dartdoc comment about polygon vertex relation
* Fix order of polygon vertices in dartdoc
* Fix anchor for PolygonComponent.fromPoints
* Add test with ancestors
* Update doc/components.md
Co-authored-by: Pasha Stetsenko <stpasha@google.com>
* Update doc/components.md
Co-authored-by: Erick <erickzanardoo@gmail.com>
* Rename example classes
* Fix linting issues in examples
* Don't use px
* Use isTrue and isFalse
* Update doc/components.md
Co-authored-by: Erick <erickzanardoo@gmail.com>
* Fixed comments on PR
Co-authored-by: Erick <erickzanardoo@gmail.com>
Co-authored-by: Pasha Stetsenko <stpasha@google.com>