JavaScript tool on Builder



  • Hi,
    I didn't find information how to create Builder data types (e.g. matrices or images).
    Can I find more information somewhere, what there's available in JavaScript tool?
    Is there way to import external scripts or packages?



  • This is intentional. The JavaScript API hasn't stabilized, and we didn't want to publish the details yet. If you are OK with a breaking your app when upgrading, here's how you get a list of functions and definitions available to JS code in the JavaScript tool:

    for (var i in VisionAppster)
      print(i);
    

    If you put this code to a JavaScript tool and run it, you'll see all API entries in the console.

    For example, this creates a new color image:

    var img = VisionAppster.image(640, 480, VisionAppster.Rgb32);
    

    When it comes to using external libraries, the answer is yes in principle, but the feature isn't publicly available. Integrating something like Node.js modules may or may not be supported in the future.



  • Thanks. This was helpful.


Log in to reply