From 82b6b752123022670c422b8a083c93d865c9533a Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 9 Mar 2012 11:01:59 -0800 Subject: Adding webGL I/O runtime functionality There is a problem that needs to be resolved in the CanvasRuntime. --- js/mediators/io-mediator.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'js/mediators') diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js index c22d95be..277b3a1b 100644 --- a/js/mediators/io-mediator.js +++ b/js/mediators/io-mediator.js @@ -389,7 +389,7 @@ exports.IoMediator = Montage.create(Component, { if (!webgllibtag) { webgllibtag = template.document.content.document.createElement('script'); webgllibtag.setAttribute('type', 'text/javascript'); - webgllibtag.setAttribute('src', rdgeDirName+'/CanvasDataManager.js'); + webgllibtag.setAttribute('src', rdgeDirName+'/CanvasRuntime.js'); webgllibtag.setAttribute('data-ninja-webgl-lib', 'true'); template.document.content.document.head.appendChild(webgllibtag); } @@ -421,11 +421,11 @@ function initWebGl (e) {\n\ //Creating data manager\n\ cvsDataMngr = new CanvasDataManager();\n\ //Loading data to canvas(es)\n\ - cvsDataMngr.loadGLData(document.body, ninjaWebGlData, '"+rdgeDirName+"');\n\ + cvsDataMngr.loadGLData(document.body, ninjaWebGlData.data);\n\ }\ "; //TODO: Add version and other data for RDGE - json = '\n({\n\t"version": "'+rdgeVersion+'",\n\t"data": ['; + json = '\n({\n\t"version": "'+rdgeVersion+'",\n\t"directory": "'+rdgeDirName+'/",\n\t"data": ['; //Looping through data to create escaped array for (var j=0; template.webgl[j]; j++) { if (j === 0) { @@ -437,7 +437,11 @@ function initWebGl (e) {\n\ //Closing array (make-shift JSON string to validate data in