Repository navigation
AsyncScene 2.0.1
AsyncScene 2.0.1
This is a major feature release that significantly expands the transition system and improves the API's flexibility.
Added
- Expanded Transition Library: Added 9 new built-in transition types, providing a wide range of visual effects for scene changes:
- Directional Wipes:
WipeLeft,WipeRight,WipeUp,WipeDown. - Directional Slides:
SlideLeft,SlideRight,SlideUp,SlideDown. - Circular Iris:
Iris.
- Directional Wipes:
- Customizable Transition Visuals:
- The
with_transitionmethod can now accept aTexture2Dobject, allowing you to use images and patterns forFadeandWipetransitions instead of just a solid color.
- The
- Pausable Transitions:
- A new
with_pause(duration: float)method allows you to pauseFade,Wipe, andIristransitions at their midpoint (when the screen is fully covered). - The pause can be a timed delay (e.g.,
with_pause(2.0)for 2 seconds) or an indefinite manual pause (with_pause(-1.0)) that requires user intervention. - A new
resume_transition()method was added to continue a manually paused transition.
- A new
- Midpoint Signal:
- A new
OnTransitionMidpointsignal is emitted when a pausable transition reaches its halfway point. This occurs after the new scene has been loaded and added to the tree, making it ideal for displaying tips, level titles, or waiting for player input.
- A new
- Method Chaining:
- The configuration methods (
with_parameters,with_transition,with_pause) now return the loader instance, allowing for a cleaner, chained initialization syntax.
- The configuration methods (
Changed
- API for
with_transition: The method signature was updated towith_transition(type: TransitionType, duration: float, visual: Variant). Thevisualparameter replaces the oldcolorparameter and can accept either aColoror aTexture2D. - Internal Architecture: The core transition logic was refactore to support the new effects and features, making it more robust and extensible.
Fixed
- Resource Management: The loader now correctly cleans itself up when using
TransitionType.None, preventing the loader node from remaining in the scene tree after a scene change without a transition.
Full Changelog: 2.0.0...2.0.1