From d8c9578ced2c0dad0a9152ff955511986d9c013d Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 10 Mar 2012 13:21:50 -0800 Subject: Setting local path to assets This is still no resolving issues with webGL runtime. --- js/mediators/io-mediator.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/mediators') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index d26c7a88..11aeb74d 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -431,6 +431,7 @@ function initWebGl (e) {\n\ }\n\ //Creating data manager\n\ cvsDataMngr = new CanvasDataManager();\n\ + g_Engine._assetPath = '"+rdgeDirName+"/';\n\ //Loading data to canvas(es)\n\ cvsDataMngr.loadGLData(document.body, ninjaWebGlData.data, '"+rdgeDirName+"/');\n\ }\ -- cgit v1.2.3 From 615be47750fb86c07acd9354da12a76abe6c24e0 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 10 Mar 2012 16:27:48 -0800 Subject: 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. --- js/mediators/io-mediator.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'js/mediators') 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, { if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') { rdgeDirName = (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase(); rdgeVersion = this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version; - this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, rdgeDirName); + this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, rdgeDirName, hackRename.bind(this)); + //TODO: Remove, this is copying the library into a static name + function hackRename (status) { + if (status) { + setTimeout(function () { + this.application.ninja.coreIoApi.copyDirectory({sourceUri: template.document.root+rdgeDirName, destUri: template.document.root+'assets'}); + }.bind(this), 3000); + } + } } else { //TODO: Error handle no available library to copy } @@ -431,7 +439,6 @@ function initWebGl (e) {\n\ }\n\ //Creating data manager\n\ cvsDataMngr = new CanvasDataManager();\n\ - g_Engine._assetPath = '"+rdgeDirName+"/';\n\ //Loading data to canvas(es)\n\ cvsDataMngr.loadGLData(document.body, ninjaWebGlData.data, '"+rdgeDirName+"/');\n\ }\ -- cgit v1.2.3