aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-26 11:50:42 -0800
committerJose Antonio Marquez2012-02-26 11:50:42 -0800
commite67540d23a1bd5d2480ce47634c0cbe523dd5e4a (patch)
treee9ffbe4e14d687b38369817848d6dace50bda21f
parent3638492098a21aef63842366fbfc035fc6414fb0 (diff)
downloadninja-e67540d23a1bd5d2480ce47634c0cbe523dd5e4a.tar.gz
Cleaning up formatting for webGL data
-rw-r--r--js/mediators/io-mediator.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index c33ccced..30180155 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -297,15 +297,19 @@ exports.IoMediator = Montage.create(Component, {
297 webgltag.setAttribute('data-ninja-webgl', 'true'); 297 webgltag.setAttribute('data-ninja-webgl', 'true');
298 template.document.content.document.head.appendChild(webgltag); 298 template.document.content.document.head.appendChild(webgltag);
299 } 299 }
300 // 300 //TODO: Add version and other data for RDGE
301 json = '\n({\n\t"version": "X.X.X.X",\n\t"data": ['; 301 json = '\n({\n\t"version": "X.X.X.X",\n\t"data": [';
302 // 302 //Looping through data to create escaped array
303 for (var j=0; template.webgl[j]; j++) { 303 for (var j=0; template.webgl[j]; j++) {
304 json += '\n\t"'+escape(template.webgl[j])+'"'; 304 if (j === 0) {
305 json += '\n\t\t\t"'+escape(template.webgl[j])+'"';
306 } else {
307 json += ',\n\t\t\t"'+escape(template.webgl[j])+'"';
308 }
305 } 309 }
306 // 310 //Closing array (make-shift JSON string to validate data in <script> tag)
307 json += ']\n})\n'; 311 json += '\n\t\t]\n})\n';
308 // 312 //Setting string in tag
309 webgltag.innerHTML = json; 313 webgltag.innerHTML = json;
310 } 314 }
311 // 315 //