Re: plugin dev and JSOnline

by Puybaret » Fri Apr 07, 2023 6:57 pm

There's no plug-in mechanism prepared for Sweet Home 3D JS at the moment. Not sure there will be one day, because JavaScript is much more flexible than Java and you may add user interface elements and code easily in JavaScript (even from the console prompt).
Note that JavaScript API is close to Java API, so starting to program shouldn't be too difficult if you already used Java API. In the demo test as well as in server index page, the "entry point" of Sweet Home 3D JS is the variable named [font=courier new]application[/font] which will let you access to all Sweet Home 3D data.
In the current version, changes to the displayed home can be saved only if embedded in an undoable operation that incremental recorder will handle, but an other direct recorder should be soon available also.