repo: janusweb action: commit revision: path_from: revision_from: 831f5793e24570dadee69490e3a7bf537d2c13de: path_to: revision_to:
commit 831f5793e24570dadee69490e3a7bf537d2c13de Author: James BaicoianuDate: Fri Feb 8 13:00:08 2019 -0800 Delay custom element initialization until assetpack is loaded diff --git a/scripts/janusweb.js b/scripts/janusweb.js
--- a/scripts/janusweb.js
+++ b/scripts/janusweb.js
@@ -112,7 +112,10 @@ elation.require([
}
this.initScripting();
// TODO - this should be config-driven
- this.registerAdditionalElements(['raycaster', 'teleporter']);
+
+ this.assetpack.executeWhenLoaded(() => {
+ this.registerAdditionalElements(['raycaster', 'teleporter']);
+ });
}
this.initScripting = function() {
if (this.scriptingInitialized) return;
-----END OF PAGE-----