DRAFT: Testing for Manifold 3D without top level async calls.#1
DRAFT: Testing for Manifold 3D without top level async calls.#1tonious wants to merge 6 commits intocookiecad:masterfrom
Conversation
|
Nice, thanks! I checked the changes, looks good to me. Once One more question though: Are these identical to the ones in the |
|
Thanks for checking this. And writing this extension! I'm already using it myself 😁 Even though it's explicitly among @elalish's use cases, I didn't really anticipate other projects using the web worker as is. That's why I'm thrilled to see this project -- it's using manifold differently than I do, and that forces me to check my assumptions. So, My feeling is that What do you think? You're the first developer to consume this refactored API. Where do you feel the boundary should be? |
|
OK, I just went through the existing wasm bindings in the manifold repo. Here's my feedback,
The other option is of course to just not publish that file, in that case anyone trying to do the same as manifoldCAD will just have to take a look at the source code, which I guess is fine too. |
|
I don't have any strong opinions here, but I'm all for publishing as much useful code as we can in our npm package. @Loosetooth, your suggestions sound reasonable to me, so @tonious if you agree, that's all good. However, I would say this is worth deciding on and implementing before we push our next npm release. |
b50da67 to
96dcebb
Compare
|
Almost ready to get rid of |
cefd03d to
a66625b
Compare
|
@Loosetooth did you see @tonious ' latest PR into manifold implementing your recommendations? Do you think we're at a good place for an npm release now? It's a significant expansion on what we've been publishing, so I'd like to get some eyes on it and make sure it's in good shape. |
a66625b to
41880b1
Compare
41880b1 to
b0842c7
Compare
|
And now As always, this is your codebase, and I don't know if I did that right :) |
Nice!
It's not correct yet. the way it is implemented now, it directly reads some files from the We should somehow get the strings from the type files at build time, and bundle them. (This would mean that the outer vscode-extension package should have Another option would be to have the Let me know if anything is unclear or you need further help with this. |
Perhaps it's good to wait with a review (and release) until we have this PR working with all the necessary files imported from |
|
I kind of split the difference. The |
|
Yes, perfect. I just tried this out, works fine. So with the exception of Looking great! Once the new |
|
Thanks a lot for all the work @tonious ! |
|
Now updated against this mega-refactor. |
|
@tonious I tried to send you an email but perhaps it went to spam - @Loosetooth and I would be interested in a short zoom/meet just to say hi and introduce ourselves. @elalish same goes for you if you are interested! |
|
Oh yeah, and would be great to finally meet @tonious too. Only trouble is I'm on NZ time. What time zone are the rest of you in? |
I'm on Eastern (GMT -5) and @Loosetooth is CET/GMT+1? So 3:00 pm my time (15:00), is 9:00 NZ and 9:00 pm (21:00) for Bart. I have the easiest time, being in the middle - what would work for each of you? |
|
Yep it got spamfiled. I'm in EST as well. |
|
Also if either of you want to join, we're discussing 3d coding in our zulip chat (its an open source slack-like chat we host) - here is an invite: https://chat.aptr.io/join/xkoc744gvajxnsuww53fx4va/ |
|
Thanks for the invite. I can do 9am on Saturday or Sunday, so Friday or Saturday afternoon/evening for you all. Either of those work? |
Those times work for me. |
|
Friday is out for me, but Saturday works. |
|
...I can do after 4:30pm on Friday, which should be 10:30am/pm if it doesn't throw anybody off. |
|
I can do 4:30 EST Friday / 10:30 Saturday NZ. If that works for everyone can you email me at nathan@cookiecad and I'll share a meeting link? |
|
@elalish are you able to join us in four hours? |
|
Sure, did you get my email? I haven't seen an invite yet. elalish@gmail |
Just sent! |
|
Now that v3.3 is released, should we merge this? I'd like to try this VSCode extension out more now that we can import libraries. |
|
Hmmm, this requires more work, because there have been quite some extra changes to ManifoldCAD after it became clear that dependencies/packages could be auto-imported/bundled in the browser. So if we want to support exact ManifoldCAD scripts inside the VS Code extension...
|
|
Considering VScode is the monico editor, hopefully the same process can be followed more or less. I'm not sure how VScode exposes its internal editor API to extensions. |
|
Model import might take a little more work. I think manifoldCAD will have to run at the extension level, then hand off the finished model to the webview. |
|
I think this is going to be amazing for larger projects. With dependencies installed via |
Did you try the extension in a "real npm" project @tonious? The way I saw it was that for a real javascript/typescript project (not ManifoldCAD script) the project should just be bundled and sent to the extension. The extension then executes the bundle, and shows the result in the webview / model-viewer. This should be quite simple to implement.
Yes, just read the model files from disk or fetch them, and execute the given "project" bundle. Or keep manifoldCAD in the webview, and somehow send the bundle and files to it. BUT: what about ManifoldCAD scripts? I'll have to look into this further at some point. Would be sad if we cannot support these directly. |
Or better: the extension can watch the bundled file on disk and execute it on every change. |
Watch out, Manifold may be quick, but a big model can still be lot more compute than a normal JS page. I would leave evaluation to an explicit activation. |
I've got a local test project, but I haven't pushed it very far.
Yeah, exactly this. So far, in this PR, the extension hands a single file off to the webview, which then bundles it ignoring other local files. So it might take a little rejiggering. Also, I had to import types locally, even when vscode should have found them: import {Manifold, CrossSection, getCircularSegments} from 'manifold-3d/manifoldCAD';
import type {Manifold as ManifoldType, CrossSection as CrossSectionType, Vec3, Vec2} from 'manifold-3d/manifoldCAD.d.ts';So there's some kind of packaging detail to sort out on the manifold side. |
030216e to
3a1ace2
Compare
|
I spent some time this weekend trying to get manifold running at the extension level, to no avail. Plan B is to allow the worker to request files. Which is not a bad idea anyhow; it'd make eventual memfs (or similar) integration easier if done correctly. |
This is just a test against Manifold PR #1375.
worker.ts,worker-wrapper.tsandeditor.d.ts.worker-wrapper.tsstill callssetWasmUrl().I've tried this locally and it seems to work, but I've been known to miss the perfectly obvious. Please let me know what you think!