aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-03-06 17:02:44 -0800
committerJose Antonio Marquez2012-03-06 17:02:44 -0800
commitfca92904597895675ddd216399cd235f3c5a7cfa (patch)
tree77c30a958c0283a6aa208b93640c6008eeb943e2 /js/ninja.reel
parentec7cbc95de031d2be667c2a8629a9d63e91f7e1a (diff)
parenteebb7de4d19cddec9c763a073d8cf41d76fe70f7 (diff)
downloadninja-fca92904597895675ddd216399cd235f3c5a7cfa.tar.gz
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-xjs/ninja.reel/ninja.html13
-rwxr-xr-xjs/ninja.reel/ninja.js30
2 files changed, 9 insertions, 34 deletions
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html
index 112f844e..8f6f6d7b 100755
--- a/js/ninja.reel/ninja.html
+++ b/js/ninja.reel/ninja.html
@@ -16,12 +16,6 @@
16 16
17 <script type="text/montage-serialization"> 17 <script type="text/montage-serialization">
18 { 18 {
19
20 "preloader1": {
21 "module": "js/preloader/preloader",
22 "name": "Preloader"
23 },
24
25 "localStorage": { 19 "localStorage": {
26 "module": "js/controllers/local-storage-controller", 20 "module": "js/controllers/local-storage-controller",
27 "name": "LocalStorage" 21 "name": "LocalStorage"
@@ -37,6 +31,11 @@
37 "name": "AppModel" 31 "name": "AppModel"
38 }, 32 },
39 33
34 "materialsModel": {
35 "module": "js/models/materials-model",
36 "name": "MaterialsModel"
37 },
38
40 "menu": { 39 "menu": {
41 "module": "js/components/menu/menu.reel", 40 "module": "js/components/menu/menu.reel",
42 "name": "Menu", 41 "name": "Menu",
@@ -167,7 +166,7 @@
167 }, 166 },
168 167
169 "panelContainer": { 168 "panelContainer": {
170 "module": "js/panels/PanelContainer/PanelContainer.reel", 169 "module": "js/panels/PanelContainer.reel",
171 "name": "PanelContainer", 170 "name": "PanelContainer",
172 "properties": { 171 "properties": {
173 "element": {"#": "rightPanelContent"}, 172 "element": {"#": "rightPanelContent"},
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 6efeef8a..88361fd9 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -8,10 +8,9 @@ var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component, 8 Component = require("montage/ui/component").Component,
9 AppData = require("js/data/appdata").AppData; 9 AppData = require("js/data/appdata").AppData;
10 10
11exports.Ninja = Montage.create(Component, { 11var matrix = require("js/lib/math/matrix");
12 12
13 _appLoaded: { value: false }, 13exports.Ninja = Montage.create(Component, {
14 _preload: { value: false },
15 14
16 ninjaVersion: { 15 ninjaVersion: {
17 value: null 16 value: null
@@ -54,7 +53,7 @@ exports.Ninja = Montage.create(Component, {
54 53
55 window.addEventListener("resize", this, false); 54 window.addEventListener("resize", this, false);
56 55
57 this.eventManager.addEventListener( "appLoading", this, false); 56// this.eventManager.addEventListener( "appLoading", this, false); // Don't need this anymore
58 this.eventManager.addEventListener( "selectTool", this, false); 57 this.eventManager.addEventListener( "selectTool", this, false);
59 this.eventManager.addEventListener( "selectSubTool", this, false); 58 this.eventManager.addEventListener( "selectSubTool", this, false);
60 this.eventManager.addEventListener( "onOpenDocument", this, false); 59 this.eventManager.addEventListener( "onOpenDocument", this, false);
@@ -79,29 +78,6 @@ exports.Ninja = Montage.create(Component, {
79 } 78 }
80 }, 79 },
81 80
82 handlePreloadFinish: {
83 value: function(e) {
84 this._preload = true;
85 this.appLoaded();
86 }
87 },
88
89 handleAppLoading: {
90 value: function(e) {
91 this._appLoaded = true;
92 this.appLoaded();
93 }
94 },
95
96 appLoaded: {
97 value: function() {
98 if(this._appLoaded && this._preload) {
99 // App is now deserialized and files are preloaded
100 this.appModel.materials = MaterialsLibrary.materials;
101 }
102 }
103 },
104
105 _didDraw: { 81 _didDraw: {
106 value: false 82 value: false
107 }, 83 },