diff options
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/html-document.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js index 8592a445..44f90d41 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js | |||
@@ -8,7 +8,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
8 | // | 8 | // |
9 | var Montage = require("montage/core/core").Montage, | 9 | var 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 | //////////////////////////////////////////////////////////////////////// | 14 | //////////////////////////////////////////////////////////////////////// |
13 | // | 15 | // |
14 | exports.HTMLDocument = Montage.create(TextDocument, { | 16 | exports.HTMLDocument = Montage.create(TextDocument, { |
@@ -185,7 +187,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
185 | var elt = this.documentRoot; | 187 | var elt = this.documentRoot; |
186 | if (elt) | 188 | if (elt) |
187 | { | 189 | { |
188 | var loadForRuntime = false; | 190 | var loadForRuntime = true; |
189 | if (loadForRuntime) | 191 | if (loadForRuntime) |
190 | { | 192 | { |
191 | //console.log( "load canvas data: " , value ); | 193 | //console.log( "load canvas data: " , value ); |
@@ -224,7 +226,6 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
224 | var useWebGL = (index >= 0) | 226 | var useWebGL = (index >= 0) |
225 | var world = new GLWorld( canvas, useWebGL ); | 227 | var world = new GLWorld( canvas, useWebGL ); |
226 | world.import( importStr ); | 228 | world.import( importStr ); |
227 | canvas.elementModel.shapeModel.GLWorld = world; | ||
228 | 229 | ||
229 | this.buildShapeModel( canvas.elementModel, world ); | 230 | this.buildShapeModel( canvas.elementModel, world ); |
230 | } | 231 | } |
@@ -789,8 +790,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
789 | } | 790 | } |
790 | } | 791 | } |
791 | } | 792 | } |
792 | //return {mode: 'html', document: this._userDocument, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; | 793 | return {mode: 'html', document: this._userDocument, webgl: this.glData, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; |
793 | return {mode: 'html', document: this._userDocument, styles: styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; | ||
794 | } else if (this.currentView === "code"){ | 794 | } else if (this.currentView === "code"){ |
795 | //TODO: Would this get call when we are in code of HTML? | 795 | //TODO: Would this get call when we are in code of HTML? |
796 | } else { | 796 | } else { |
@@ -813,8 +813,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
813 | } | 813 | } |
814 | } | 814 | } |
815 | } | 815 | } |
816 | //return {mode: 'html', document: this._userDocument, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; | 816 | return {mode: 'html', document: this._userDocument, webgl: this.glData, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; |
817 | return {mode: 'html', document: this._userDocument, css: css, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; | ||
818 | } else if (this.currentView === "code"){ | 817 | } else if (this.currentView === "code"){ |
819 | //TODO: Would this get call when we are in code of HTML? | 818 | //TODO: Would this get call when we are in code of HTML? |
820 | } else { | 819 | } else { |