-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
Modules plus docs #444
Modules plus docs #444
Conversation
If it helps with reviewing, I could also create a separate PR that only includes the removal of |
This is awesome! If you don't mind, can you split this into to two PRs? This is a lot to go through! Excited to merge it all in and make this the jsdocs branch. |
With this PR merged (link). Where does this leave us in regards to this PR? |
I rebased the "modules" changes on top of #445 in a different branch, which I can create a different PR for. It looks like the |
Got it, I'll make this PR the new |
4b82562
to
f19892a
Compare
Have those changes been pushed yet? I have all the December changes merged, and the version number/readme updates shouldn't be too hard to include. |
Also, is there any reason to keep |
These have all been pushed to |
I think it's fine to have half-finished things in |
f19892a
to
18889e5
Compare
Alternatively, I just rebased #425 so you can merge that into |
"qunit": "^2.9.3", | ||
"resemblejs": "^3.2.3", | ||
"rollup": "^1.27.9", |
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 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 don't. What versions of Node and NPM are you running?
@@ -0,0 +1,27 @@ | |||
/** | |||
* @name Utils.defineGetterSetter |
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 understand paradigms like the file src/utils/get-ratio.js
which is accessible at Utils.getRatio
, but this doesn't share that paradigm and the accessor is different from the previous version of Two.js. What's the thinking here?
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.
original location was Two.Utils.defineProperty
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 thought defineGetterSetter
was a clearer name, since it has different behavior to Object.defineProperty
.
Sorry for the flurry of small single line comments. I haven't even gone through the files you changed that don't show their diffs in the github web editor. But, I can't reiterate how awesome this is general! It's really putting Two.js into the 2020's, something my developer knowledge is too antiquated to do. So thank you and these nitpicks are more open ended questions to about long term ways to maintain the project. Looking forward to your thoughts on it and awesome work! |
|
@jonobr1 I still need clarification on points 1 and 3. |
Sorry for the delay on this @adroitwhiz. To answer those specific questions:
I'm still in the thick of my thesis writing.., so I unfortunately won't have a ton of time in the next couple of weeks to look through the rest of the changes and run more tests / debugs. But, I definitely appreciate and certainly haven't forgotten! It'll be the first thing I spend time on once I'm done. |
I made some name changes and updated to the current
The error I get from roll up is: UnhandledPromiseRejectionWarning: Error: 'Curve' is not exported by src\utils\curves.js I think with |
The
export {
Curve,
getComponentOnCubicBezier,
subdivide,
getCurveLength,
getCurveBoundingBox,
integrate,
getCurveFromPoints,
getControlPoints,
getReflection,
getAnchorsFromArcData
}; This means you need brackets to import from it: import {Curve, getComponentOnCubicBezier} from './curves.js' Or you can just import all the exports at once with:
This is somewhat complicated, but this guide might help a bit. Two other things:
|
Thanks for the second pair of eyes. I'll make those changes now. |
I'm sure there will be some additional growing pains, but thanks so much for this PR. Excited to be moving Two.js closer toward the present state of JavaScript development. |
Modules plus docs
As promised, here are the changes from both my modules PR and the
jsdocs
branch. I've made these changes in a different branch from #425 just in case.I'm not really sure which branch this should be merged into, so I went with
jsdocs
. This will probably be nearly impossible to manually merge intojsdocs
, so you may want to replacejsdocs
with this branch or just create a new branch instead.The docs are still a tad broken--if you want me to take another pass over them before merging, I can do so, but this is a big complicated PR as is, so I think it'd be best to do that in another PR.