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

Convert to TypeScript #544

Merged
merged 15 commits into from
Jun 3, 2020
Merged

Convert to TypeScript #544

merged 15 commits into from
Jun 3, 2020

Conversation

trusktr
Copy link
Member

@trusktr trusktr commented Jun 3, 2020

moved from #510

* master: (38 commits)
  update dist files
  rename some tests to better reflect what they test
  improve the conditional logic more so that values in nested arrays can also be animated
  add and example and test for animating values in an array
  start values aren't arrays, only to values are
  move _updateProperties function back out to a method
  fix yoyo with array values test
  temporary, move updateProperties function to make diff with master more clear
  move some code and update variable names to make mergin with master easier (less conflict)
  update dist
  improve state reset when stopping and starting a tween (fixes #512 where yoyo wouldn't restart properly)
  move value-swapping code for repeated tweens to a function (it will be re-used in an upcoming change)
  consolidate duplicate handling of relative values
  update dist files
  ignore VS Code's config folder
  small refactor to prevent update from doing anything when a tween has finished, yet still allow tweens to go back in time
  fix lint error
  rename _isFinished to _isComplete to match other wording
  add one more test for relative array values
  add editorconfig to settings editors can be consistently unique (because we use tabs so people can set their own tab width)
  ...
@trusktr trusktr merged commit 1f85d6e into master Jun 3, 2020
@trusktr trusktr deleted the typescript branch June 3, 2020 09:01
@trusktr
Copy link
Member Author

trusktr commented Jun 3, 2020

Done! Thanks @nidorx!

@trusktr trusktr added this to Opened Pull Requests in Pull Requests via automation Jun 3, 2020
@trusktr trusktr moved this from Opened Pull Requests to Done in Pull Requests Jun 3, 2020
@trusktr trusktr mentioned this pull request Jun 3, 2020
@amelnikoff
Copy link

Hello.
Can you provide some examples to readme.md how to use TS version correctly?

@trusktr
Copy link
Member Author

trusktr commented Apr 27, 2021

@amelnikoff Hello! It is fairly self explanatory if you know how to import TS libs into a TS project. npm install, then in your code import {whatever} from '@tweenjs/tween.js'. When you do that, the types of the things you import simply work within your TypeScript project.

If you need help with starting a TypeScript project in general, I'd suggest looking for a tutorial on that specifically.

We should add an examples though. I think an examples folder will be nice, with examples that are self-contained working little apps (f.e. importing with bundled ES modules in JS vs TS using build tools, importing as a global script tag, or importing as native ES Modules, etc).

@amelnikoff
Copy link

@trusktr thanks. Thanks, simple import {whatever} from '@tweenjs/tween.js' is enough for me and I think for most developers ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Pull Requests
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants