-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation overhaul #39
Draft
Multirious
wants to merge
130
commits into
main
Choose a base branch
from
rewrite
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add Setter trait Add blanket impls like previously Interpolator trait Add sprite module Add SpriteColor setter
Remove Interpolation trait Add ease_function_system Add ease_closure_system Remove ease_closure_system
Add AToB generic curve struct Remove ease_function_system Add a_to_b_ease_function_system Register a_to_b_ease_function_system for - f32 - Vec2 - Vec3 - Quat - Color
Make value argument take a reference in Setter's set method Make SpriteColor setter component Add test plugin Add ColorMaterial setter Add SkipSetter component Add set_component_from_curve_value_system
Add animation_target module to lib Inside the module: - Add AnimationTarget - Add AnimationTargetResolver - Add resolve_animation_target_system Old animation target is not changed yet
…_system And complete the system implementation
Add apply_resource_tween_system Add apply_asset_tween_system Add apply_handle_component_tween_system
Content: - `ComponentTweenPlugin` with shortcut function `component` - `ResourceTweenPlugin` with shortcut function `resource` - `AssetTweenPlugin` with shortcut function `asset` - `HandleComponentTweenPlugin` with shortcut function `handle_component` Add DefaultTweenPlugins and has - component::<SpriteColor, _, _>() - asset::<ColorMaterial, _, _>() - handle_component::<ColorMaterial, _, _>();
Remove `marker()` method Change `TargetComponent`'s Default to `TargetComponent::None`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
This crate is not flexible enough for any curve more than a single f32, forcing user to create a custom system that's not within the crate's framework, if anyone even attempted it.
Solution:
The solution is to change how interpolator is implemented.
Don't store curve in an interpolator and make value generic.
From
To
Curve is now decoupled from interpolator and implementor should set the item with whatever it receive from the
value
argument.To reflect this change, interpolator should be renamed to
Set
which directly describe what it should do.Change
TweenInterpolationValue(f32)
toCurveValue<V>(V)
to support the new design.The original curve will be in another component called
AToB<V, C> { a: V, b: V, curve: C }
with curve that returns value within [0, 1]
Problem:
Users must extends this crate by registering systems directly to register new tween. I even add more trait just to smooth this up. It's also hard for this crate to make changes to systems without breaking changes. And system cannot access the App.
Solution:
Use a plugin. This causes a lot of code due to each systems needing its own plugin. I've avoided this in the early versions because of this reason, but after awhile I've realized the advantages of using plugin outweigh the boilerplate.
Some more changes...
todo!()