-
mganss
@eeropic FWIW here are two more things I'd love to have:
-
Autowatch. Here's a small cross platform solution: https://github.com/FigBug/Gin/blob/master/modules/gin/utilities/gin_filesystemwatcher.cpp
-
Chrome Developer Tools integration (debugging): https://hyperandroid.com/2020/02/12/v8-inspector-from-an-embedder-standpoint/
Not sure if this would allow debugging from VS Code as well.
-
-
mganss
@ingox Very nice! Perhaps pdjs could be extended by allowing script to be provided in the
[js]
object's arguments, thereby circumventing the requirement for a script file.Max has the ability to edit the script using an internal editor. Is there a way to provide something similar in PD? Perhaps using a separate editor object and passing the text to pdjs via a message?
-
mganss
@lacuna Thanks. Here's a nice HOWTO about writing externals for PD: https://github.com/pure-data/externals-howto
Documentation about embedding V8 can be found here: https://v8.dev/docs/embed -
mganss
@tabache You can find a few patches in the
test-*
directories of the pdjs repo here: https://github.com/mganss/pdjs/tree/master/test
These are part of the automated tests for pdjs so don't reflect real use cases but might be helpful to get a feel for how pdjs can be used. You'll probably need to add[declare -path pdjs]
if pdjs isn't in PD's default search paths. -
mganss
@emviveros Not much, hopefully. If all goes well I just need to set up a development environment on a Mac and build V8 and pdjs. I'll try to get this done early next week.
-
mganss
Hey, I've made pdjs, an external that executes JavaScript using V8 and tries to emulate Max's js object.
It lives at https://github.com/mganss/pdjs and is available through deken for x64-windows, x64-linux, and arm64-linux currently (x64-macos planned).
Most core functionality is there so a lot of code written for Max js that doesn't use any extra objects (like LiveAPI, Buffer, Dict, etc.) should run unchanged.
Please report any issues or missing features at GitHub.