aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-16 15:58:26 -0800
committerJose Antonio Marquez2012-02-16 15:58:26 -0800
commit6bc07657c8ef58e6efddd383748ecf84d1c789ad (patch)
tree8295fddc012c023f23bb128c7fb10a7bcb2cbf7d /js
parent63cdd5a614aacdebd9e3c9a6118bbe4a2c79145e (diff)
downloadninja-6bc07657c8ef58e6efddd383748ecf84d1c789ad.tar.gz
Adding new RDGE library data
Diffstat (limited to 'js')
-rw-r--r--js/io/system/ninjalibrary.js2
-rw-r--r--js/io/system/ninjalibrary.json3
-rw-r--r--js/mediators/io-mediator.js21
3 files changed, 13 insertions, 13 deletions
diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js
index 8c58883a..960bdef9 100644
--- a/js/io/system/ninjalibrary.js
+++ b/js/io/system/ninjalibrary.js
@@ -145,6 +145,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, {
145 synchronize: { 145 synchronize: {
146 enumerable: true, 146 enumerable: true,
147 value: function(chromeLibs, chrome) { 147 value: function(chromeLibs, chrome) {
148 //TODO: Remove
149 window.wipeLibrary = this.deleteLibraries.bind(this);
148 // 150 //
149 this.chromeApi = chrome; 151 this.chromeApi = chrome;
150 // 152 //
diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json
index 05e0a427..a61c30d1 100644
--- a/js/io/system/ninjalibrary.json
+++ b/js/io/system/ninjalibrary.json
@@ -1,7 +1,6 @@
1{ 1{
2 "libraries": [ 2 "libraries": [
3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0.0"}, 3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0.0"},
4 {"name": "Assets", "path": "/assets/descriptor.json", "version": "0.5.0.0"}, 4 {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.0.1"}
5 {"name": "RDGE", "path": "/js/helper-classes/RDGE/rdge-compiled.js", "version": "0.5.0.0", "file": "rdge-compiled.js"}
6 ] 5 ]
7} \ No newline at end of file 6} \ No newline at end of file
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index e9958ec3..56869839 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -143,6 +143,16 @@ exports.IoMediator = Montage.create(Component, {
143 // 143 //
144 switch (file.mode) { 144 switch (file.mode) {
145 case 'html': 145 case 'html':
146 //Copy webGL library if needed
147 if (file.webgl.length > 0) {
148 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) {
149 //if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') {
150 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') {
151 this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(file.document.root, (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase());
152 }
153 }
154 }
155 //
146 contents = this.parseNinjaTemplateToHtml(file); 156 contents = this.parseNinjaTemplateToHtml(file);
147 break; 157 break;
148 default: 158 default:
@@ -192,17 +202,6 @@ exports.IoMediator = Montage.create(Component, {
192 // 202 //
193 template.document.content.document.body.innerHTML = template.body; 203 template.document.content.document.body.innerHTML = template.body;
194 template.document.content.document.head.innerHTML = template.head; 204 template.document.content.document.head.innerHTML = template.head;
195 //
196 if (template.webgl.length > 0) {
197 for (var i in this.application.ninja.coreIoApi.ninjaLibrary.libs) {
198 if (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'Assets' || this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name === 'RDGE') {
199 this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(template.document.root, (this.application.ninja.coreIoApi.ninjaLibrary.libs[i].name+this.application.ninja.coreIoApi.ninjaLibrary.libs[i].version).toLowerCase());
200 }
201 }
202
203 //this.application.ninja.coreIoApi.ninjaLibrary.copyLibToCloud(path, libname);
204 //console.log(this.application.ninja.coreIoApi.ninjaLibrary.libs);
205 }
206 //TODO: Remove temp fix for styles 205 //TODO: Remove temp fix for styles
207 if (template.style) { 206 if (template.style) {
208 template.document.content.document.head.getElementsByTagName('style')[0].innerHTML = this.getCssFromRules(template.style.cssRules); 207 template.document.content.document.head.getElementsByTagName('style')[0].innerHTML = this.getCssFromRules(template.style.cssRules);