diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/components/layout/bread-crumb.reel/bread-crumb.css | 10 | ||||
-rwxr-xr-x | js/controllers/color-controller.js | 4 | ||||
-rwxr-xr-x | js/controllers/elements/shapes-controller.js | 4 | ||||
-rwxr-xr-x | js/lib/drawing/world.js | 21 | ||||
-rwxr-xr-x | js/lib/geom/geom-obj.js | 2 | ||||
-rw-r--r-- | js/lib/rdge/materials/radial-blur-material.js | 18 | ||||
-rwxr-xr-x | js/models/materials-model.js | 1 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.html | 101 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 120 | ||||
-rwxr-xr-x | js/panels/Splitter.js | 2 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css | 4 | ||||
-rw-r--r-- | js/panels/resize-composer.js | 34 | ||||
-rwxr-xr-x | js/stage/stage-view.reel/stage-view.js | 12 | ||||
-rwxr-xr-x | js/tools/EyedropperTool.js | 28 |
14 files changed, 304 insertions, 57 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.css b/js/components/layout/bread-crumb.reel/bread-crumb.css index dcfd471c..26a56b45 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.css +++ b/js/components/layout/bread-crumb.reel/bread-crumb.css | |||
@@ -4,14 +4,20 @@ | |||
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 | .breadcrumbTrail{ | 7 | .breadcrumbTrail { |
8 | |||
8 | background-color: #282828; | 9 | background-color: #282828; |
9 | border-style: double; | ||
10 | height: 26px; | 10 | height: 26px; |
11 | position:relative; | 11 | position:relative; |
12 | -webkit-box-flex: 0; | 12 | -webkit-box-flex: 0; |
13 | } | 13 | } |
14 | 14 | ||
15 | .mainContentContainer > section.breadcrumbTrail { | ||
16 | border:0; | ||
17 | margin:0; | ||
18 | border-bottom:1px solid #000; | ||
19 | margin-bottom:1px; | ||
20 | } | ||
15 | .breadcrumbTrail button.nj-skinned { | 21 | .breadcrumbTrail button.nj-skinned { |
16 | float: left; | 22 | float: left; |
17 | width: 60px; | 23 | width: 60px; |
diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js index 8e000b19..c6d664cf 100755 --- a/js/controllers/color-controller.js +++ b/js/controllers/color-controller.js | |||
@@ -227,14 +227,14 @@ exports.ColorController = Montage.create(Component, { | |||
227 | // | 227 | // |
228 | this.fill = color; | 228 | this.fill = color; |
229 | // | 229 | // |
230 | if(e._event.wasSetByCode && mode !== 'nocolor') return; | 230 | if(e._event.wasSetByCode) return; |
231 | // | 231 | // |
232 | this.setColor(mode, color, true); | 232 | this.setColor(mode, color, true); |
233 | } else if (input === 'stroke') { | 233 | } else if (input === 'stroke') { |
234 | // | 234 | // |
235 | this.stroke = color; | 235 | this.stroke = color; |
236 | // | 236 | // |
237 | if(e._event.wasSetByCode && mode !== 'nocolor') return; | 237 | if(e._event.wasSetByCode) return; |
238 | 238 | ||
239 | this.setColor(mode, color, false); | 239 | this.setColor(mode, color, false); |
240 | } | 240 | } |
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index 5b9e4672..f0e9458b 100755 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -274,6 +274,10 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
274 | color = this.getShapeProperty(el, "stroke"); | 274 | color = this.getShapeProperty(el, "stroke"); |
275 | } | 275 | } |
276 | 276 | ||
277 | if(!css) { | ||
278 | return null; | ||
279 | } | ||
280 | |||
277 | css = this.application.ninja.colorController.colorModel.webGlToCss(color); | 281 | css = this.application.ninja.colorController.colorModel.webGlToCss(color); |
278 | return this.application.ninja.colorController.getColorObjFromCss(css); | 282 | return this.application.ninja.colorController.getColorObjFromCss(css); |
279 | } | 283 | } |
diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js index 781695b6..fec6a478 100755 --- a/js/lib/drawing/world.js +++ b/js/lib/drawing/world.js | |||
@@ -761,13 +761,10 @@ World.prototype.exportJSON = function() | |||
761 | // We need to rebuild everything | 761 | // We need to rebuild everything |
762 | if (this._useWebGL) | 762 | if (this._useWebGL) |
763 | { | 763 | { |
764 | var root = this._rootNode; | ||
765 | root.children = new Array(); | ||
766 | if (worldObj.children && (worldObj.children.length === 1)) | 764 | if (worldObj.children && (worldObj.children.length === 1)) |
767 | { | 765 | { |
768 | this.init(); | 766 | this.rebuildTree(this._geomRoot); |
769 | this._geomRoot = undefined; | 767 | this.restartRenderLoop(); |
770 | this.importObjectsJSON( worldObj.children[0] ); | ||
771 | } | 768 | } |
772 | } | 769 | } |
773 | 770 | ||
@@ -783,6 +780,20 @@ World.prototype.exportJSON = function() | |||
783 | return jStr; | 780 | return jStr; |
784 | } | 781 | } |
785 | 782 | ||
783 | World.prototype.rebuildTree = function( obj ) | ||
784 | { | ||
785 | if (!obj) return; | ||
786 | |||
787 | obj.buildBuffers(); | ||
788 | |||
789 | if (obj.getChild()) { | ||
790 | this.rebuildTree( obj.getChild () ); | ||
791 | } | ||
792 | |||
793 | if (obj.getNext()) | ||
794 | this.rebuildTree( obj.getNext() ); | ||
795 | } | ||
796 | |||
786 | World.prototype.exportObjectsJSON = function( obj, parentObj ) | 797 | World.prototype.exportObjectsJSON = function( obj, parentObj ) |
787 | { | 798 | { |
788 | if (!obj) return; | 799 | if (!obj) return; |
diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js index a87bdbf5..3c4e4bbf 100755 --- a/js/lib/geom/geom-obj.js +++ b/js/lib/geom/geom-obj.js | |||
@@ -302,6 +302,7 @@ var GeomObj = function GLGeomObj() { | |||
302 | case "deform": | 302 | case "deform": |
303 | case "water": | 303 | case "water": |
304 | case "paris": | 304 | case "paris": |
305 | case "raiders": | ||
305 | case "tunnel": | 306 | case "tunnel": |
306 | case "reliefTunnel": | 307 | case "reliefTunnel": |
307 | case "squareTunnel": | 308 | case "squareTunnel": |
@@ -375,6 +376,7 @@ var GeomObj = function GLGeomObj() { | |||
375 | case "deform": | 376 | case "deform": |
376 | case "water": | 377 | case "water": |
377 | case "paris": | 378 | case "paris": |
379 | case "raiders": | ||
378 | case "tunnel": | 380 | case "tunnel": |
379 | case "reliefTunnel": | 381 | case "reliefTunnel": |
380 | case "squareTunnel": | 382 | case "squareTunnel": |
diff --git a/js/lib/rdge/materials/radial-blur-material.js b/js/lib/rdge/materials/radial-blur-material.js index f4a4baa2..fee02a1d 100644 --- a/js/lib/rdge/materials/radial-blur-material.js +++ b/js/lib/rdge/materials/radial-blur-material.js | |||
@@ -282,10 +282,26 @@ var RaidersMaterial = function RaidersMaterial() | |||
282 | this.inheritedFrom(); | 282 | this.inheritedFrom(); |
283 | 283 | ||
284 | this._name = "RaidersMaterial"; | 284 | this._name = "RaidersMaterial"; |
285 | this._shaderName = "radialBlur"; | 285 | this._shaderName = "raiders"; |
286 | 286 | ||
287 | this._texMap = 'assets/images/raiders.png'; | 287 | this._texMap = 'assets/images/raiders.png'; |
288 | this._propValues[ this._propNames[0] ] = this._texMap.slice(0); | 288 | this._propValues[ this._propNames[0] ] = this._texMap.slice(0); |
289 | |||
290 | |||
291 | // duplcate method requirde | ||
292 | this.dup = function( world ) { | ||
293 | // allocate a new uber material | ||
294 | var newMat = new RaidersMaterial(); | ||
295 | |||
296 | // copy over the current values; | ||
297 | var propNames = [], propValues = [], propTypes = [], propLabels = []; | ||
298 | this.getAllProperties( propNames, propValues, propTypes, propLabels); | ||
299 | var n = propNames.length; | ||
300 | for (var i=0; i<n; i++) | ||
301 | newMat.setProperty( propNames[i], propValues[i] ); | ||
302 | |||
303 | return newMat; | ||
304 | }; | ||
289 | } | 305 | } |
290 | 306 | ||
291 | RaidersMaterial.prototype = new Material(); | 307 | RaidersMaterial.prototype = new Material(); |
diff --git a/js/models/materials-model.js b/js/models/materials-model.js index 692ac09a..44364aa2 100755 --- a/js/models/materials-model.js +++ b/js/models/materials-model.js | |||
@@ -238,6 +238,7 @@ exports.MaterialsModel = Montage.create(Component, { | |||
238 | case "fly": mat = new FlyMaterial(); break; | 238 | case "fly": mat = new FlyMaterial(); break; |
239 | case "water": mat = new WaterMaterial(); break; | 239 | case "water": mat = new WaterMaterial(); break; |
240 | case "paris": mat = new ParisMaterial(); break; | 240 | case "paris": mat = new ParisMaterial(); break; |
241 | case "raiders": mat = new RaidersMaterial(); break; | ||
241 | case "zinvert": mat = new ZInvertMaterial(); break; | 242 | case "zinvert": mat = new ZInvertMaterial(); break; |
242 | case "deform": mat = new DeformMaterial(); break; | 243 | case "deform": mat = new DeformMaterial(); break; |
243 | case "star": mat = new StarMaterial(); break; | 244 | case "star": mat = new StarMaterial(); break; |
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index a4779ee3..ead7f576 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -77,34 +77,83 @@ | |||
77 | "name": "Splitter", | 77 | "name": "Splitter", |
78 | "properties": { | 78 | "properties": { |
79 | "element": {"#": "bottomSplitter"}, | 79 | "element": {"#": "bottomSplitter"}, |
80 | "panel": {"#": "bottomPanelContainer"}, | 80 | "panel": {"@": "timeline"} |
81 | "resizeBar": {"#": "timelineResizer"} | ||
82 | } | 81 | } |
83 | }, | 82 | }, |
84 | 83 | ||
85 | "resizer1": { | 84 | "resizer1": { |
86 | "module": "js/panels/Resizer", | 85 | "module": "js/panels/resize-composer", |
87 | "name": "Resizer", | 86 | "name": "ResizeComposer", |
88 | "properties": { | 87 | "propert |