Forum Discussion

MathNotermans-9's avatar
MathNotermans-9
Community Member
4 years ago

ThreeJS in Storyline360

As i found that ThreeJs is included when publishing to HTML5 in Storyline360 i was wondering for what it is used in SL ?

As there are magnificent options for using WebGL with ThreeJS...as seen here:
https://threejs.org/examples/#webgl_animation_keyframes
So how it is used in Storyline now?

Some more info...inside bootstrapper.min.js i find these lines...
var n = document.createElement("canvas"),
i = n.getContext("2d"),
r = new THREE.CanvasTexture(n);
So clearly here a canvas is created for use with THREEJS as the code clearly shows... But can we do more with it ???

  • Hi Math, have you seen anymore on this or figured anything out with using ThreeJS natavly in storyline

    • MathNotermans-9's avatar
      MathNotermans-9
      Community Member

      Nah, i doubt its ThreeJS as we know it. Might be some other small unknown library.

  • Thanks,  Darn I really wanted to use three.js in storyline.  The biggest hurdle I have is the three.js library needs to live within my published file.  Do to where I work going ou to an external site to download the library is blocked.

    • Nathan_Hilliard's avatar
      Nathan_Hilliard
      Community Member

      I know this is a bit old, but for completeness Three is loaded by Storyline only when it is needed in the project, such as when you have a 360-degree image. Otherwise, the global THREE variable is just an empty object. Storyline actually loads a static version of Three (version 144). Current version is 170. I know the Three API has undergone changes, so the static library ensures consistent functionality. Like GSAP, most (all?) Three.js addons are not loaded, but you can add them as Math describes.

  • Using a WebObject you can add any library wanted/needed... i probably have some around ;-)

  • In my archives i found a working GSAP/ThreeJS sample. Adding that.
    Tried to add it to Review, but ( as often ) that wont work.

    Publish it and you will see it works. Basically only thing working now in ThreeJS is zooming in/out by using your mousewheel... but  it works...