diff options
author | hwc487 | 2012-03-05 16:33:51 -0800 |
---|---|---|
committer | hwc487 | 2012-03-05 16:33:51 -0800 |
commit | 232784ffafe834f75a46ca7fc311e8ca2ff5eec9 (patch) | |
tree | c4571d35f51153b218a6a17c7897225a2659cacb /js/helper-classes/RDGE/runtime/CanvasDataManager.js | |
parent | ec10bf44c711e9c552780d2cd9ac0baef21de445 (diff) | |
download | ninja-232784ffafe834f75a46ca7fc311e8ca2ff5eec9.tar.gz |
Corrections for canvas file IO
Diffstat (limited to 'js/helper-classes/RDGE/runtime/CanvasDataManager.js')
-rw-r--r-- | js/helper-classes/RDGE/runtime/CanvasDataManager.js | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/js/helper-classes/RDGE/runtime/CanvasDataManager.js b/js/helper-classes/RDGE/runtime/CanvasDataManager.js index 46d944a1..efbfe4db 100644 --- a/js/helper-classes/RDGE/runtime/CanvasDataManager.js +++ b/js/helper-classes/RDGE/runtime/CanvasDataManager.js | |||
@@ -12,7 +12,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
12 | /////////////////////////////////////////////////////////////////////// | 12 | /////////////////////////////////////////////////////////////////////// |
13 | function CanvasDataManager() | 13 | function CanvasDataManager() |
14 | { | 14 | { |
15 | this.loadGLData = function(root, valueArray) | 15 | this.loadGLData = function(root, valueArray, NinjaUtils) |
16 | { | 16 | { |
17 | var value = valueArray; | 17 | var value = valueArray; |
18 | var nWorlds = value.length; | 18 | var nWorlds = value.length; |
@@ -29,32 +29,7 @@ function CanvasDataManager() | |||
29 | var canvas = this.findCanvasWithID( id, root ); | 29 | var canvas = this.findCanvasWithID( id, root ); |
30 | if (canvas) | 30 | if (canvas) |
31 | { | 31 | { |
32 | //var loadForAuthoring = true; | 32 | var rt = new GLRuntime( canvas, importStr ); |
33 | var index = importStr.indexOf( "scenedata: " ); | ||
34 | //if (index >= 0) loadForAuthoring = false; | ||
35 | var loadForAuthoring = false; | ||
36 | |||
37 | if (loadForAuthoring) | ||
38 | { | ||
39 | if (!canvas.elementModel) | ||
40 | { | ||
41 | NJUtils.makeElementModel(canvas, "Canvas", "shape", true); | ||
42 | } | ||
43 | |||
44 | if (canvas.elementModel) | ||
45 | { | ||
46 | if (canvas.elementModel.shapeModel.GLWorld) | ||
47 | canvas.elementModel.shapeModel.GLWorld.clearTree(); | ||
48 | |||
49 | var world = new GLWorld( canvas ); | ||
50 | canvas.elementModel.shapeModel.GLWorld = world; | ||
51 | world.import( importStr ); | ||
52 | } | ||
53 | } | ||
54 | else | ||
55 | { | ||
56 | var rt = new GLRuntime( canvas, importStr ); | ||
57 | } | ||
58 | } | 33 | } |
59 | } | 34 | } |
60 | } | 35 | } |