flame_camera_tools 5.1.0
flame_camera_tools: ^5.1.0 copied to clipboard
Intuitive tools for creating immersive and dynamic camera behaviors in Flame-based games.
5.1.0 #
Behavior changes #
ShakeEffectnow reaches its fullamplitudeon each axis. Before, it only moved up to half of it, so shakes are now twice as strong. Halve your amplitudes to keep the previous feel.ShakeEffectis no longer aMoveEffect, socamera.stop(),chase()andlookAt()no longer cancel a running shake.ShakeEffectno longer implementsmeasure(). Speed-based controllers (EffectController(speed: ...)) are not supported for shakes and now trigger an assertion in debug builds. Before, they silently ended the shake immediately.- Futures returned by camera effects now complete when the effect is removed, one frame after it finishes.
Fixes #
- Futures returned by
shake,zoomBy,zoomTo,rotateByandlookAtnow complete when the effect is cancelled, instead of never completing.effectSequenceno longer gets stuck on a cancelled effect. - Starting the same kind of effect twice in one frame now replaces the first one instead of running both. The same applies to calling
chase()twice in one frame. ShakeEffectnow adds its offset on top of the target's position, so the camera keeps following its target while shaking. The offset is undone if the shake is removed early.ShakeEffectcan now be reset without throwing aLateInitializationError.horizontalOnlyandverticalOnlynow work withCircularDeadZone: the distance on the locked axis no longer pushes the target out of the dead zone.chase(snap: true)now snaps to the target plusoffset.zoomBynow asserts thatvalueis greater than-1.- Setting both
horizontalOnlyandverticalOnlyonAdvancedFollowBehaviornow triggers an assertion. - The documentation of
rotateBynow correctly says the angle is in degrees.
Deprecations #
- Renamed
Deadzone,CircularDeadzoneandRectangularDeadzonetoDeadZone,CircularDeadZoneandRectangularDeadZone. The old names still work, but are deprecated and will be removed in 6.0.0.
Other #
- The minimum Flutter version is now 3.27.2, matching the existing Dart SDK constraint.
- Added tests and CI, including a check against the oldest supported versions.
- Updated the documentation, README and example.
5.0.2 #
- Updated Documentation.
5.0.1 #
- Updated Documentation.
5.0.0 #
- Renamed
SmoothFollowBehaviortoAdvancedFollowBehavior. - Renamed
camera.smoothFollowtocamera.chasewhich now returns aAdvancedFollowBehaviorinstance, which allows to tweak options such asoffset,deadzoneorstiffnesslater on. - All camera effect methods take now
EffectControlleras a parameter, which adds even more modularity. - Remove
weakenOverTimeparameter fromShakeEffectwhich is the default action now. - Updated Documentation.
4.1.0 #
- The
stiffnessanddeadZoneparameters ofSmoothFollowBehaviorare now adjustable. - Added the
offsetparameter toSmoothFollowBehaviorandcamera.smoothFollowto allow following a point offset from the target, enabling look-ahead or custom camera focus. - Added
RectangularDeadzone.allandRectangularDeadzone.symmetricconstructors.
4.0.1 #
- Updated
README.md
4.0.0 #
- Replaced
deadZoneparameter from a fixed rectangular Rect to a flexible Deadzone abstraction. - Added new deadzone implementations:
RectangularDeadzoneandCircularDeadzone, allowing for customizable deadzone shapes. - Updated
SmoothFollowBehaviorto use the newDeadzonesystem, enhancing how the camera follows targets based on configurable deadzone boundaries. - Improved documentation
3.0.1 #
- Fixed
stiffnessvalue in the example code
3.0.0 #
- Changed the
stiffnessparameter ofSmoothFollowBehaviorto be a value between 0.0 and 1.0, where a value of 0.0 means no movement at all and a value of 1.0 means immediate following.
2.0.0 #
- Merge
SmoothFollowBehaviorandAreaFollowBehaviorinto one class
1.2.0 #
- Added
moveAlongPath()method for CameraComponent - Adjusted effect duration defaults to 1 second
1.1.0 #
- Added demo GIFs
1.0.1 #
- Calling
complete()on completers when duration is zero - Cosmetic changes inside
README.md
1.0.0 #
- Added
weakenOverTimeparameter toshake()method - Using
doubleinstead of theDurationclass for the duration of the effects
0.0.5+1 #
- fix: use
radians()also when the duration is zero
0.0.5 #
- Added
rotateBy()method for CameraComponent - Refactor method parameter defaults
0.0.4 #
- Removed
stiffnessparameter fromareaFollow() - Added
maxSpeedparameter toareaFollow()andAreaFollowBehavior
0.0.3 #
0.0.2 #
- Added
AreaFollowBehavior - Added
areaFollow()method for CameraComponent - Added Documentation
0.0.1 #
- Initial Release