diff options
82 files changed, 11387 insertions, 14718 deletions
@@ -20,4 +20,5 @@ cloud/ | |||
20 | /.idea/scopes/scope_settings.xml | 20 | /.idea/scopes/scope_settings.xml |
21 | compass_app_log.txt | 21 | compass_app_log.txt |
22 | js/io/ui/cloudpopup.reel/.sass-cache/5fd824121af95f6044b06681535cf0639ffb5db3/cloudpopup.scssc | 22 | js/io/ui/cloudpopup.reel/.sass-cache/5fd824121af95f6044b06681535cf0639ffb5db3/cloudpopup.scssc |
23 | scss/.sass-cache/ \ No newline at end of file | 23 | scss/.sass-cache/ |
24 | js/helper-classes/RDGE/src/tools/compiler.jar | ||
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js index f53a4ef6..a35f473d 100644 --- a/assets/canvas-runtime.js +++ b/assets/canvas-runtime.js | |||
@@ -4,11 +4,12 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | 7 | // namespace for the Ninja Canvas Runtime | |
8 | var NinjaCvsRt = NinjaCvsRt || {}; | ||
8 | 9 | ||
9 | /////////////////////////////////////////////////////////////////////// | 10 | /////////////////////////////////////////////////////////////////////// |
10 | //Loading webGL/canvas data | 11 | //Loading webGL/canvas data |
11 | function initWebGl (rootElement, directory) { | 12 | NinjaCvsRt.initWebGl = function (rootElement, directory) { |
12 | var cvsDataMngr, ninjaWebGlData = JSON.parse((document.querySelectorAll(['script[data-ninja-webgl]'])[0].innerHTML.replace('(', '')).replace(')', '')); | 13 | var cvsDataMngr, ninjaWebGlData = JSON.parse((document.querySelectorAll(['script[data-ninja-webgl]'])[0].innerHTML.replace('(', '')).replace(')', '')); |
13 | if (ninjaWebGlData && ninjaWebGlData.data) { | 14 | if (ninjaWebGlData && ninjaWebGlData.data) { |
14 | for (var n=0; ninjaWebGlData.data[n]; n++) { | 15 | for (var n=0; ninjaWebGlData.data[n]; n++) { |
@@ -16,16 +17,16 @@ function initWebGl (rootElement, directory) { | |||
16 | } | 17 | } |
17 | } | 18 | } |
18 | //Creating data manager | 19 | //Creating data manager |
19 | cvsDataMngr = new CanvasDataManager(); | 20 | cvsDataMngr = new NinjaCvsRt.CanvasDataManager(); |
20 | //Loading data to canvas(es) | 21 | //Loading data to canvas(es) |
21 | cvsDataMngr.loadGLData(rootElement, ninjaWebGlData.data, directory); | 22 | cvsDataMngr.loadGLData(rootElement, ninjaWebGlData.data, directory); |
22 | } | 23 | }; |
23 | 24 | ||
24 | /////////////////////////////////////////////////////////////////////// | 25 | /////////////////////////////////////////////////////////////////////// |
25 | // Class ShapeRuntime | 26 | // Class ShapeRuntime |
26 | // Manages runtime shape display | 27 | // Manages runtime shape display |
27 | /////////////////////////////////////////////////////////////////////// | 28 | /////////////////////////////////////////////////////////////////////// |
28 | function CanvasDataManager() | 29 | NinjaCvsRt.CanvasDataManager = function () |
29 | { | 30 | { |
30 | this.loadGLData = function(root, valueArray, assetPath ) | 31 | this.loadGLData = function(root, valueArray, assetPath ) |
31 | { | 32 | { |
@@ -54,31 +55,12 @@ function CanvasDataManager() | |||
54 | var canvas = this.findCanvasWithID( id, root ); | 55 | var canvas = this.findCanvasWithID( id, root ); |
55 | if (canvas) | 56 | if (canvas) |
56 | { | 57 | { |
57 | new GLRuntime( canvas, jObj, assetPath ); | 58 | new NinjaCvsRt.GLRuntime( canvas, jObj, assetPath ); |
58 | } | 59 | } |
59 | } | 60 | } |
60 | } | 61 | } |
61 | } | 62 | } |
62 | } | 63 | }; |
63 | |||
64 | this.collectGLData = function( elt, dataArray ) | ||
65 | { | ||
66 | if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld) | ||
67 | { | ||
68 | var data = elt.elementModel.shapeModel.GLWorld.export( true ); | ||
69 | dataArray.push( data ); | ||
70 | } | ||
71 | |||
72 | if (elt.children) | ||
73 | { | ||
74 | var nKids = elt.children.length; | ||
75 | for (var i=0; i<nKids; i++) | ||
76 | { | ||
77 | var child = elt.children[i]; | ||
78 | this.collectGLData( child, dataArray ); | ||
79 | } | ||
80 | } | ||
81 | } | ||
82 | 64 | ||
83 | this.findCanvasWithID = function( id, elt ) | 65 | this.findCanvasWithID = function( id, elt ) |
84 | { | 66 | { |
@@ -95,14 +77,14 @@ function CanvasDataManager() | |||
95 | if (foundElt) return foundElt; | 77 | if (foundElt) return foundElt; |
96 | } | 78 | } |
97 | } | 79 | } |
98 | } |