diff options
author | Jose Antonio Marquez | 2012-03-10 16:27:48 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-10 16:27:48 -0800 |
commit | 615be47750fb86c07acd9354da12a76abe6c24e0 (patch) | |
tree | 6f180ddb9f631b49271670771144759c39f3c919 /js/mediators | |
parent | d8c9578ced2c0dad0a9152ff955511986d9c013d (diff) | |
download | ninja-615be47750fb86c07acd9354da12a76abe6c24e0.tar.gz |
Temp Runtime WebGL Fix
Added a temporary fix to allow for webGL runtime functionality. Copying the desired folder name into a static name. There is a lag in doing this, so obviously now ideal. Need to discuss adding dynamic path-ing during author and runtime.
Diffstat (limited to 'js/mediators')
-rw-r--r-- | js/mediators/io-mediator.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index 11aeb74d..e9661f20 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js | |||
@@ -355,7 +355,15 @@ exports.IoMediator = Montage.create(Component, { | |||
355 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { | 355 | if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { |
356 | rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); | 356 | rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); |
357 | rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; | 357 | rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; |
358 | this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, rdgeDirName); | 358 | this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, rdgeDirName, hackRename.bind(this)); |
359 | //TODO: Remove, this is copying the library into a static name | ||
360 | function hackRename (status) { | ||
361 | if (status) { | ||
362 | setTimeout(function () { | ||
363 | this.application.ninja.coreIoApi.copyDirectory({sourceUri: template.document.root+rdgeDirName, destUri: template.document.root+'assets'}); | ||
364 | }.bind(this), 3000); | ||
365 | } | ||
366 | } | ||
359 | } else { | 367 | } else { |
360 | //TODO: Error handle no available library to copy | 368 | //TODO: Error handle no available library to copy |
361 | } | 369 | } |
@@ -431,7 +439,6 @@ function initWebGl (e) {\n\ | |||
431 | }\n\ | 439 | }\n\ |
432 | //Creating data manager\n\ | 440 | //Creating data manager\n\ |
433 | cvsDataMngr = new CanvasDataManager();\n\ | 441 | cvsDataMngr = new CanvasDataManager();\n\ |
434 | g_Engine._assetPath = '"+rdgeDirName+"/';\n\ | ||
435 | //Loading data to canvas(es)\n\ | 442 | //Loading data to canvas(es)\n\ |
436 | cvsDataMngr.loadGLData(document.body, ninjaWebGlData.data, '"+rdgeDirName+"/');\n\ | 443 | cvsDataMngr.loadGLData(document.body, ninjaWebGlData.data, '"+rdgeDirName+"/');\n\ |
437 | }\ | 444 | }\ |