-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
chore(TS): animation #8297
Merged
Merged
chore(TS): animation #8297
Changes from all commits
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
827cf88
initial undocumented types
kristbp2 9224364
documenting types,
kristbp2 fc9300f
remove defaults obj for animate
kristbp2 badf63c
Merge remote-tracking branch 'origin/master' into laz-animate-typing
kristbp2 c263864
run prettier
kristbp2 8c39dd5
Typing for color animation and fixes for animate
kristbp2 2903682
resolve some comments on the PR
kristbp2 a0e52f2
remove WithReturnType
kristbp2 d2075e6
animation registry typings
ShaMan123 8895a5f
revert animate_color.ts
kristbp2 4cc9713
more explicit typing in animation_registry.ts
kristbp2 bb86ef1
Merge remote-tracking branch 'origin/master' into laz-animate-typing
kristbp2 1ddd449
more explicit typing in animation_registry.ts
kristbp2 757fd7a
fix comments
kristbp2 6ebfbda
changelog update
kristbp2 f2b0f89
made the animate function more typesafe
kristbp2 1b49cb3
refactor(): animation directory
ShaMan123 fd134b9
extract request/cancel AnimFrame
ShaMan123 1f5f12e
rename
ShaMan123 ae4d15b
revert(): animate
ShaMan123 91af64a
Update types.ts
ShaMan123 c9e9a14
refactor(): remove from registry
ShaMan123 052bd3f
fix(): TDegree/TRadian & number
ShaMan123 e9b8f2a
Revert "fix(): TDegree/TRadian & number"
ShaMan123 ff27f6c
Merge branch 'master' into ts-animation
ShaMan123 213ac95
Merge remote-tracking branch 'origin/master' into laz-animate-typing
kristbp2 a728316
move stuff in from the ts-animation branch
kristbp2 966f341
fix building
kristbp2 9b8397e
WIP. fix bug
kristbp2 a596aab
refactor(): classes
ShaMan123 d13069c
prepare for color
ShaMan123 f5d24be
generics
ShaMan123 ab4eb7d
Update color.class.ts
ShaMan123 d3c998b
refactor(): color animation
ShaMan123 00c1adf
refactor(): extract to files
ShaMan123 a1466cd
Update CHANGELOG.md
ShaMan123 79628f4
rename
ShaMan123 f5842c7
rename
ShaMan123 7134f75
naming
ShaMan123 d5edccb
cleanup
ShaMan123 55f62b7
cleanup
ShaMan123 ce996cf
Update types.ts
ShaMan123 52211c8
Update misc.ts
ShaMan123 9655360
Merge branch 'master' into pr/8297
ShaMan123 fceb050
cleanup
ShaMan123 f53e2f5
BREAKING: return context
ShaMan123 2142869
Update CHANGELOG.md
ShaMan123 f692967
fix timestamps
ShaMan123 cb1d54f
fix cancelling empty
ShaMan123 fc0217d
fix: timestamp , abort before start
ShaMan123 c022254
fix tests
ShaMan123 fd763b7
dep(): `colorEasing`
ShaMan123 139ee11
BREAKING change `animateColor` signature
ShaMan123 d1c1037
accept color byValue
ShaMan123 a7a9d28
Revert "accept color byValue"
ShaMan123 41adf12
fix(): `byValue` over `endValue`
ShaMan123 aa32d24
block `byValue` on color options
ShaMan123 470854a
Revert "fix(): `byValue` over `endValue`"
ShaMan123 dfb5910
Update AnimationBase.ts
ShaMan123 11de652
fix(): color chage rate
ShaMan123 86d31db
color byValue
ShaMan123 7ea80e9
fix(): round color pixels
ShaMan123 9156442
fix tests
ShaMan123 cf883e2
fix(): endValue
ShaMan123 43e76a2
comment
ShaMan123 1b63622
fix(): immutable state
ShaMan123 127d7a2
cleanup endValue in class
ShaMan123 d9609d2
Update types.ts
ShaMan123 abce738
fix(): byValue endValue type
ShaMan123 20778ec
fix type
ShaMan123 abfb814
extract AnimationState
ShaMan123 7bf61db
change naming from rate to ratio
kristbp2 587e8f8
stray rate -> ratio
kristbp2 ee985b5
rate => ratio
ShaMan123 ffc83f7
currentTime => timeElapsed
ShaMan123 f239704
Update types.ts
ShaMan123 6098d0a
comment
ShaMan123 c35ad7e
types(): no any
ShaMan123 fb20679
fix return type
ShaMan123 dee235c
revert(): no options
ShaMan123 422ec25
fix ts
ShaMan123 a637f81
add ts tests
ShaMan123 d6b9b3e
remove getter
ShaMan123 89e7fe0
Update animation.ts
ShaMan123 0aac2f2
Merge branch 'master' into pr/8297
ShaMan123 fcccc69
Update AnimationRegistry.ts
ShaMan123 8e7c894
Merge branch 'master' into pr/8297
ShaMan123 1e655c5
fix merge
ShaMan123 f8f220e
type color
ShaMan123 f8601df
dep(): fromSource
ShaMan123 dad8a09
Update color.class.ts
ShaMan123 f8d9870
Update util.ts
ShaMan123 5c75285
Update object_animation.mixin.ts
ShaMan123 70cf087
Update color.class.ts
ShaMan123 e582c7e
fix
ShaMan123 c128245
Update object_animation.mixin.ts
ShaMan123 b2b203e
refactor very old code
ShaMan123 2a78e5b
restore abort
ShaMan123 167ea19
default abort
ShaMan123 5e90298
Update AnimationBase.ts
ShaMan123 fbb08d9
Doc additions and fixes
Lazauya de550d2
Merge remote-tracking branch 'laz-fork/laz-animate-typing' into laz-a…
Lazauya 58f0ffc
Merge remote-tracking branch 'origin/master' into laz-animate-typing
Lazauya b56fd41
Merge remote-tracking branch 'origin/master' into laz-animate-typing
Lazauya d488aef
Doc additions and fixes
Lazauya 3e7e0c5
Merge remote-tracking branch 'origin/master' into laz-animate-typing
Lazauya a9cd9b8
import fix, commenting, and removed unused color code
Lazauya 76823da
@see fix
Lazauya a89ce35
cleanup JSDOC
ShaMan123 98f9966
fix merge conflict
ShaMan123 36cd48a
imports
ShaMan123 68fdc11
accept color instance
ShaMan123 6e8861e
Update color.js
ShaMan123 9d6c71e
Merge branch 'master' into pr/8297
ShaMan123 53779e6
fix imports
ShaMan123 dab0ade
solved merge conflicts
asturur e1e2c0b
removed unnecessary changes to object.ts
asturur e5f3cd7
ooops
asturur 30c5172
it builds now
asturur 3366fe6
rename: Animation => ValueAnimation
ShaMan123 f644fd2
no arrow methods
ShaMan123 02d8c0d
Merge branch 'laz-animate-typing' of https://github.com/Lazauya/fabri…
ShaMan123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This calculation is strange.
Should
otherAlpha
be 0.5?If so we can simplify to:
Math.round(value * + otherSource[index] * 0.25)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of ways to blend colors, and using the current RGB method is honestly a pretty crappy way to do it, though still technically correct. This Stackoverflow answer has a good overview. I personally prefer HSL color mixing/interpolation and it's generally described as being the most "intuitive" result wise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could expose an option for color interpolation, the
calculate
method is there for such subclassing.But I want to finalize this PR.
So if you want to propose something fork this branch and start another PR, that's what I do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change
ColorAnimation
to accept color string values orTRGBAColorSource
or preferably aColor
instance, that way it can accept any color space.Then with a color space option it becomes very powerful