orbix-engine 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/orbix.d.ts CHANGED
@@ -546,7 +546,8 @@ declare namespace Orbix {
546
546
  CAMERA: PerspectiveCamera;
547
547
  RENDERER: Renderer;
548
548
  NUKE: Nuke;
549
- ELEMENT: HTMLCanvasElement;
549
+ ELEMENT: any;
550
+ CANVAS: HTMLCanvasElement;
550
551
  instance(): typeof World;
551
552
  init(): void;
552
553
  };
package/dist/orbix.js CHANGED
@@ -61259,6 +61259,9 @@ Class((function Main() {
61259
61259
  // Add the WebGL canvas to the page
61260
61260
  Stage.add(World.ELEMENT);
61261
61261
 
61262
+ // Expose raw canvas DOM node for CDN users (World.ELEMENT is a Hydra wrapper)
61263
+ World.CANVAS = (World.ELEMENT && World.ELEMENT.div) ? World.ELEMENT.div : World.ELEMENT;
61264
+
61262
61265
  // Signal engine ready
61263
61266
  window.ORBIX_ENGINE._world = World;
61264
61267
  window.ORBIX_ENGINE._ready = true;
@@ -61634,7 +61637,7 @@ window._BUILT_ = false;
61634
61637
  camera: World.CAMERA,
61635
61638
  nuke: World.NUKE,
61636
61639
  renderer: World.RENDERER,
61637
- element: World.ELEMENT
61640
+ element: World.CANVAS || World.ELEMENT
61638
61641
  };
61639
61642
  };
61640
61643