Using a External library ShapeJS

Discussion in 'ShapeJS' started by wawwright, Feb 3, 2016.

  1. wawwright
    wawwright Active Member
    Does anyone know of a good way to load an external library in the ShapeJS code?
    I would like to use an SVG library like raphael or pablo to create the image for the ImageBitmap method.
    However I am not sure how to load the library without html.
     
  2. AlanHudson
    AlanHudson Shapeways Employee Dev Team
    I don't know of a good javascript mechanism for inlining code. Since we are just taking a single javascript file we don't really have a container to specify includes. I'll ask around to our web developers and see if they have an idea. Likely the only real way todo it right now would be to concatenate the library into one file. Some javascript minifiers/obscure libraries will do this for you.

    That said I'm not totally certain how well general javascript libraries will work. We're using a fairly old Javascript interpreter right now so it won't support modern Javascript conventions. Basically the javascript would need to limit itself to Javascript 5.