aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/html-document.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 078a73b5..b2113623 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -9,7 +9,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
9var Montage = require("montage/core/core").Montage, 9var Montage = require("montage/core/core").Montage,
10 TextDocument = require("js/document/text-document").TextDocument, 10 TextDocument = require("js/document/text-document").TextDocument,
11 NJUtils = require("js/lib/NJUtils").NJUtils, 11 NJUtils = require("js/lib/NJUtils").NJUtils,
12 CanvasDataManager = require("js/lib/rdge/runtime/CanvasDataManager").CanvasDataManager,
13 GLWorld = require("js/lib/drawing/world").World; 12 GLWorld = require("js/lib/drawing/world").World;
14//////////////////////////////////////////////////////////////////////// 13////////////////////////////////////////////////////////////////////////
15// 14//
@@ -174,9 +173,9 @@ exports.HTMLDocument = Montage.create(TextDocument, {
174 this._glData = null; 173 this._glData = null;
175 if (elt) 174 if (elt)
176 { 175 {
177 var cdm = new CanvasDataManager();
178 this._glData = []; 176 this._glData = [];
179 cdm.collectGLData( elt, this._glData ); 177 var path = "assets/";
178 this.collectGLData( elt, this._glData, path );
180 } 179 }
181 180
182 return this._glData; 181 return this._glData;
@@ -187,9 +186,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
187 var elt = this.documentRoot; 186 var elt = this.documentRoot;
188 if (elt) 187 if (elt)
189 { 188 {
190// FOR JOSE: The following commented out lines are what the runtime 189// var loadForRuntime = false;
191// version should execute.
192// var loadForRuntime = true;
193// if (loadForRuntime) 190// if (loadForRuntime)
194// { 191// {
195// var cdm = new CanvasDataManager(); 192// var cdm = new CanvasDataManager();
@@ -367,11 +364,11 @@ exports.HTMLDocument = Montage.create(TextDocument, {
367 364
368 365
369 collectGLData: { 366 collectGLData: {
370 value: function( elt, dataArray ) 367 value: function( elt, dataArray, imagePath )
371 { 368 {
372 if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld) 369 if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld)
373 { 370 {
374 var data = elt.elementModel.shapeModel.GLWorld.export(); 371 var data = elt.elementModel.shapeModel.GLWorld.export( imagePath );
375 dataArray.push( data ); 372 dataArray.push( data );
376 } 373 }
377 374
@@ -381,7 +378,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
381 for (var i=0; i<nKids; i++) 378 for (var i=0; i<nKids; i++)
382 { 379 {
383 var child = elt.children[i]; 380 var child = elt.children[i];
384 this.collectGLData( child, dataArray ); 381 this.collectGLData( child, dataArray, imagePath );
385 } 382 }
386 } 383 }
387 } 384 }