Skip to content
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

feat(v3)!: [closes #177] Convert to TypeScript #178

Merged
merged 95 commits into from
Jul 2, 2023
Merged
Changes from 1 commit
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
53d76ef
chore: [#177] set up TypeScript infrastructure
jeremyckahn Apr 26, 2023
86111f9
chore: remove ts-jest
jeremyckahn Apr 26, 2023
1357e81
chore: set up eslint for typescript
jeremyckahn Apr 26, 2023
cf94722
chore: set up type roots
jeremyckahn Apr 26, 2023
9d0ad76
chore: [wip] [#177] start converting tweenable.js to TypeScript
jeremyckahn Apr 26, 2023
59aa578
fix: use setTimeout for scheduleFunction
jeremyckahn Apr 27, 2023
90003ca
chore: type linked list variables
jeremyckahn Apr 27, 2023
5325bfe
chore: [wip] convert JSDoc types to TypeScript types
jeremyckahn Apr 27, 2023
7e5f112
chore: [wip] update some types
jeremyckahn Apr 27, 2023
826e5e8
chore: [wip] type tweenProps
jeremyckahn Apr 28, 2023
b6cf16e
refactor: define TweenConfig interface
jeremyckahn Apr 28, 2023
7d01423
refactor(Tweenable): use TweenConfig in more places
jeremyckahn Apr 28, 2023
34d27eb
refactor(Tweenable): type Tweenable members
jeremyckahn Apr 29, 2023
5c0eb77
refactor(Tweenable): improve default member values
jeremyckahn Apr 29, 2023
fd20cbc
refactor(Tweenable): type composeEasingObject
jeremyckahn Apr 29, 2023
303a13c
refactor(Tweenable): fix type errors in remove function
jeremyckahn Apr 30, 2023
5c4e90c
refactor(Tweenable): fix various type errors
jeremyckahn Apr 30, 2023
fee0687
refactor(Tweenable): improve types related to easing
jeremyckahn Apr 30, 2023
e879987
refactor(Tweenable): use typeof instead of instanceof
jeremyckahn Apr 30, 2023
6cf22be
refactor(Tweenable): fix filter types
jeremyckahn Apr 30, 2023
f54d1d0
refactor(Tweenable): improve filter types
jeremyckahn Apr 30, 2023
3335bb7
refactor(Tweenable): improve promise types
jeremyckahn Apr 30, 2023
b226561
refactor(Tweenable): fix remaining type errors
jeremyckahn Apr 30, 2023
d48bca7
refactor(lint): fix lint errors
jeremyckahn Apr 30, 2023
1c08340
feat(Tweenable): optimize some type checks
jeremyckahn Apr 30, 2023
a40a7ad
refactor(types): [wip] partially convert token.js to TypeScript
jeremyckahn May 25, 2023
e94abfb
refactor(token): [wip] fix some type errors
jeremyckahn May 26, 2023
129e458
refactor(token): [wip] fix some type errors
jeremyckahn May 27, 2023
923b261
refactor(token): fix remaining type errors
jeremyckahn May 27, 2023
acd6647
fix(Tweenable): make isEasingKey support custom easings
jeremyckahn May 27, 2023
111327b
refactor(bezier): [wip] start converting bezier extension to TypeScript
jeremyckahn May 27, 2023
c87d4ba
refactor(bezier): fix remaining type errors
jeremyckahn May 27, 2023
a123c01
refactor(easing-functions): convert to TypeScript
jeremyckahn May 27, 2023
bcbbda3
refactor(interpolate): convert to TypeScript
jeremyckahn May 30, 2023
b463b68
refactor(Scene): [#177] convert Scene to TypeScript
jeremyckahn Jun 8, 2023
1e7bb91
chore(cleanup): remove .jshintrc
jeremyckahn Jun 8, 2023
8b14af3
refactor(bezier): [#177] convert tests to TypeScript
jeremyckahn Jun 8, 2023
5f900f6
refactor(interpolate): convert tests to TypeScript
jeremyckahn Jun 9, 2023
4db1859
refactor(scene): convert tests to TypeScript
jeremyckahn Jun 9, 2023
0ba9f5b
refactor(token): convert tests to TypeScript
jeremyckahn Jun 9, 2023
b0a29aa
fix(build): use core.index.ts
jeremyckahn Jun 10, 2023
bf2fa06
refactor(tweenable): convert tests to TypeScript
jeremyckahn Jun 11, 2023
13543d1
feat(Tweenable): define Data type
jeremyckahn Jun 11, 2023
6d97ef0
refactor(types): move types to their own file
jeremyckahn Jun 11, 2023
9907d6d
feat(types): widen Easing to be an arbitrary string
jeremyckahn Jun 12, 2023
9bf1a42
refactor(types): compute EasingKey union
jeremyckahn Jun 12, 2023
bb05acc
docs(README): document breaking changes
jeremyckahn Jun 19, 2023
3c36c07
docs(typedoc): [wip] set up typedoc
jeremyckahn Jun 20, 2023
48910b8
docs: improve type documentation
jeremyckahn Jun 21, 2023
51e74f0
docs: use index.md for landing page
jeremyckahn Jun 21, 2023
ab59946
docs(tutorials): improve easing-function-in-depth.md
jeremyckahn Jun 22, 2023
cf4de93
feat(easing)!: rename Tweenable.formulas to Tweenable.easing
jeremyckahn Jun 22, 2023
e3ba114
docs(tutorials): improve content
jeremyckahn Jun 23, 2023
f89a8a1
docs(Tweenable): improve annotations
jeremyckahn Jun 23, 2023
02c3004
docs(Scene): remove annotations
jeremyckahn Jun 23, 2023
88e64e8
docs(types): move some descriptions from index.ts to types.ts
jeremyckahn Jun 23, 2023
1a3d7ce
docs(filter): improve type docs
jeremyckahn Jun 24, 2023
11c03ca
docs(Tweenable): improve API docs
jeremyckahn Jun 24, 2023
ffa412b
chore(typedoc): set up typedoc-plugin-mdn-links
jeremyckahn Jun 24, 2023
b6a8c42
docs(Tweenable): improve TypeDoc annotations
jeremyckahn Jun 24, 2023
ebcd744
docs(Tweenable): use inline param for cancel
jeremyckahn Jun 26, 2023
5b1681c
feat(Tweenable)!: change hasEnded to a getter
jeremyckahn Jun 26, 2023
9000adc
feat(Tweenable)!: change Tweenable#get() to Tweenable#state
jeremyckahn Jun 26, 2023
d607fb9
feat(Tweenable)!: change Tweenable#isPlaying() to Tweenable#isPlaying
jeremyckahn Jun 26, 2023
72089db
feat(Scene)!: change Scene#isPlaying() to Scene#isPlaying
jeremyckahn Jun 26, 2023
a8796a7
docs(Tweenable): improve API annotations
jeremyckahn Jun 26, 2023
d16968b
feat(Tweenable)!: rename Tweenable#set() to Tweenable#setState()
jeremyckahn Jun 26, 2023
4660107
docs(interpolate): improve API annotations
jeremyckahn Jun 26, 2023
a60973b
feat(Tweenable)!: remove Tweenable#setScheduleFunction
jeremyckahn Jun 27, 2023
ffdb0bc
docs(Tweenable): improve TypeDoc annotations
jeremyckahn Jun 27, 2023
140d646
docs(tutorials): change @tutorial annotations to @page
jeremyckahn Jun 27, 2023
965bbda
feat(Tweenable)!: include token extension in Shifty Core
jeremyckahn Jun 27, 2023
0634597
feat(Scene)!: remove Scene#playingTweenables()
jeremyckahn Jun 28, 2023
08d883f
feat(Scene)!: rename Scene#play to Scene#tween
jeremyckahn Jun 28, 2023
1a704d0
docs(Scene): clean up TypeDoc annotations
jeremyckahn Jun 28, 2023
720a012
refactor(types): rename FilterName to FilterType
jeremyckahn Jun 29, 2023
5f2c3e0
refactor(types): inline FilterType
jeremyckahn Jun 29, 2023
9002fc3
docs(types): improve some annotations
jeremyckahn Jun 30, 2023
fa70a11
feat(RenderFunction)!: reorder data and timeElapsed
jeremyckahn Jul 1, 2023
798130e
docs(types): improve descriptions
jeremyckahn Jul 1, 2023
5f13814
refactor(bezier): simplify typing
jeremyckahn Jul 1, 2023
36465df
feat(bezier)!: remove unsetBezierFunction
jeremyckahn Jul 1, 2023
da9c345
feat(build)!: remove core build
jeremyckahn Jul 2, 2023
a1eb22f
feat(easing): protect baseEasingFunctions with Object.create
jeremyckahn Jul 2, 2023
53fb0bd
docs(tweenable): remove unnecessary annotations
jeremyckahn Jul 2, 2023
920a89d
docs(typedoc): improve annotations
jeremyckahn Jul 2, 2023
c89afc8
docs(readme): document version 2
jeremyckahn Jul 2, 2023
0cbcafb
chore(deps): remove unused
jeremyckahn Jul 2, 2023
3f8f7cd
chore(types): emit type declarations
jeremyckahn Jul 2, 2023
2edd717
3.0.0-0
jeremyckahn Jul 2, 2023
dbb6fac
chore(ci): build artifacts
jeremyckahn Jul 2, 2023
a1beb65
fix(ci): use dist for build artifacts
jeremyckahn Jul 2, 2023
2a6915e
chore(deps): use [email protected]
jeremyckahn Jul 2, 2023
09fc873
docs(readme): update for v3
jeremyckahn Jul 2, 2023
2fcde54
chore: remove old FIXME
jeremyckahn Jul 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: use setTimeout for scheduleFunction
  • Loading branch information
jeremyckahn committed Apr 27, 2023
commit 59aa5786c3e626e22af17857ac4c3d034a068619
20 changes: 12 additions & 8 deletions src/tweenable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ const TYPE_STRING = 'string'
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
let scheduleFunction = root.requestAnimationFrame

if (!scheduleFunction && typeof window !== 'undefined') {
scheduleFunction =
window.webkitRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
(window.mozCancelRequestAnimationFrame &&
window.mozRequestAnimationFrame) ||
setTimeout
if (!scheduleFunction) {
if (typeof window === 'undefined') {
scheduleFunction = setTimeout
} else {
scheduleFunction =
window.webkitRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
(window.mozCancelRequestAnimationFrame &&
window.mozRequestAnimationFrame) ||
setTimeout
}
}

const noop = () => {}
Expand Down