-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
math: move to es6 classes #19997
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
Merged
Merged
math: move to es6 classes #19997
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
938a4cf
Vector2
yomotsu 881697f
missing semi
yomotsu 9d14b87
Vector3, Vector4
yomotsu 979f99d
solve hoisting in Vector3
yomotsu b6e40eb
Matrix3, Matrix4
yomotsu 22eca2d
Quaternion
yomotsu 5eef1d2
Euler
yomotsu f549b79
fix static value of Euler
yomotsu 8bcfccd
move internal use instances to the end of the file
yomotsu 8000b03
Euler.DefaultOrder should be writable
yomotsu 027a6b1
revert Euler.RotationOrders to be writable
yomotsu a53fcce
is*** should not be a getter function
yomotsu 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 hidden or 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.
We should do a setter for this one too.
Uh oh!
There was an error while loading. Please reload this page.
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.
@mrdoob
Thank you for reviewing.
Sorry, I got it wrong, I thought
DefaultOrderis read-only too.I will fix it.
Before that, I have a question: How do we declare Public class fields?
The readable-writable static value can be declare like
However It seems Buble transpiler does not support the syntax, while Babel support that
Which option would be preferable in three.js (with Buble)?
or using
Object.definePropertyor
or other?
Thank you in advance🙇♂️
maybe @DefinitelyMaybe or @ianpurvis could give a suggestion?
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 think this style is nice for read/write 👍
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.
Thanks, I'll do that then!
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.
For future reference:
There are only three things in the current
r120dev build where Buble is being used.Curves,GeometriesandMaterials.When Buble is no longer needed, i.e. after converting everything to es6 classes, we should have a look back into this
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.
nvm. I've got Buble's purpose backwards. Buble is our 'convert classes back to support IE' tool and output it as
build/three.js.