I've gotten spine-webgl.js to work following the pattern shown in demo code. In the demo, spine-webgl.js is included the old-fashioned HTML way with a <script> tag added to the DOM.
But this causes a few other problems for me. Without plaguing y'all with those reasons, let's just it would be preferable to load in the runtime from javascript code instead with either a require() or import statement.
While I can load in the file with either
import 'spine-webgl.js'
or
require('spine-webgl.js')
, the spine object remains undefined in the scope of the module. It seems necessary for spine-webgl.js to define spine as an export for it be accessible.
Is there a way to import spine from JS without requiring an HTML script tag and without making modifications to the run-time code?
-Erik