-
Notifications
You must be signed in to change notification settings - Fork 520
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
Update demo to use flat API #1382
base: V3
Are you sure you want to change the base?
Conversation
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.
@hpb-htw Thanks for the changes. I asked for a few changes, and will review again after those are made.
For the changes to documentation, let's create a new set of changes for those. There will be a lot of changes, so let's do those togther as one big set of documentation changes.
@@ -7,7 +7,9 @@ import * as path2 from '../geometries/path2/index.js' | |||
import { isGT, isGTE, isNumberArray } from './commonChecks.js' | |||
|
|||
/** | |||
* |
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.
All the DOC changes are good but probably better in a separate set of changes, and pull request. I'll chat about the doc changes in the discussion.
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.
Okay, let chat about it!
@@ -0,0 +1 @@ | |||
../../modeling/dist/jscad-modeling.es.js |
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.
Adding a link doesn't work in Windows. It's better to add a comment to README, and have the user copy jscad-modeling.es.js
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.
Yes, TBD
// HACK... export the results of the design to global space | ||
window.shapes = main() | ||
</script> | ||
<script type="module" id="MODELING" src="model.js"></script> |
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'd prefer NOT to mix Common JS (require) and ES (import) in the same example. Let's keep these separated.
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.
Code in the file model.js
does not belong to package, it shows, that one can construct a model with the same code in both context ES6 or CommonJS. Otherwise I cannot understand why this is written in the commit before my commit in the file demo.html
:
<script language="javascript" src="./dist/jscad-regl-renderer.min.js" id="RENDERING"></script>
<div id="jscad"></div>
<script type="module" id="MODELING">
// ********************
// The design to render.
// ********************
import { booleans, colors, primitives } from "./jscad-modeling.es.js"
....
in the origin, which is dedicated for CommonJS.
<head> | ||
<title>Demo Application</title> | ||
<title>Demo Application Global</title> |
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.
Maybe 'Demo Application CommonJS'?
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.
Yes, TBD
@@ -12,56 +12,13 @@ | |||
</style> | |||
</head> | |||
<body> | |||
<script language="javascript" src="./dist/jscad-regl-renderer.min.js" id="RENDERING"></script> | |||
|
|||
<span>How to use regl-renderer as ES5 global variable <code>jscadReglRenderer</code></span> |
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.
...as 'CommonJS module'
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.
Yes, TBD
@z3dev Since I have'n never do a Merge Request with Code Review in Github before, can you explain me what I have to do now? Do the single changes as suggest in my branch and make a new request or just wait for you? |
You can make changes to YOUR branch. Just make the change, commit, and push back to your branch. Any new changes will also show up here. Don't worry too much. You can always start again. You will understand quickly. |
All Submissions:
Use V3 API in
utils/regl-renderer/{demo.html,demo.es.html}
symlink
modling/dist/jscad-modeling.es.js
toutils/regl-renderer/jscad-modeling.es.js
Move Modeling in both
demo.html
anddemo.es.html
into a separated JS filemodel
Have you followed the guidelines in our Contributing document?
Have you checked to ensure there aren't other open Pull Requests for the same update/change?
Does your submission pass tests?
Thank you for your help in advance, much appreciated !