The info on how to embed the viewer is located here: https://nglviewer.org/ngl/api/manual/usage/embedding.html
My workflow is attached. The API requires to instantiate a ‘stage’ object:
var stage = new NGL.Stage("viewport");
However when I execute and view the Generic JS View node I get error: “Reference Error: NGL is not defined”. I also tried instantiating the stage object using a DOMContentLoaded event listener and I get no error, but also no view (I included a separate JS node for that).
I’m using Windows 10 and KNIME 4.1.1
My workflow: ngl_js_viewer.knwf (310.9 KB)