-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
ES6ify Two.js Codebase #592
Merged
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
This pull request introduces 9 alerts when merging 891d132 into fc7f667 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 6a16043 into fc7f667 - view on LGTM.com new alerts:
|
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.
🎯 Affects issues:
📋 This is a more-or-less entire rewrite of Two.js to use EcmaScript 6 features. In particular:
const
/let
instead ofvar
for tighter scopingclass
construction instead of prototypical modificationsTwo.Events
is now a classTwo.Element
is a new base class ofTwo.Shape
,Two.Gradient
, and anything else that can be queried in the scenegraphMakeObservable
methods in favor ofObject.defineProperty
invocations onconstructor
export
s and except for the root Two.js class, not withdefault
. So you'll need to import specific modules like so:🏁 These changes allow for improved:
Two.Vector
andTwo.Anchor
. For any curve, it's required you use anchors instead of vectors now.🗒️ All tests and first party examples are passing