aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-11 11:04:29 -0700
committerArmen Kesablyan2012-06-11 11:04:29 -0700
commit0f040acabfb7a4bf3138debec5aff869487ceb11 (patch)
tree53eaa8ba54cf23a1c3ea0c8b39377773198c3e19
parent7d3bdf39e6d1534de1848ca2744aed66dfeb5d2a (diff)
parent756cbfad2b98b300af8db3793aa21718b88dd950 (diff)
downloadninja-0f040acabfb7a4bf3138debec5aff869487ceb11.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
-rw-r--r--assets/canvas-runtime.js493
-rwxr-xr-xcss/ninja.css14
-rw-r--r--js/components/converter/string-units-converter.js2
-rw-r--r--js/components/converter/string-value-converter.js2
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.html41
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.js19
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.css15
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html116
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js28
-rwxr-xr-xjs/components/tools-properties/pen-properties.reel/pen-properties.js27
-rwxr-xr-xjs/controllers/document-controller.js26
-rwxr-xr-xjs/controllers/elements/body-controller.js9
-rwxr-xr-xjs/controllers/elements/controller-factory.js4
-rwxr-xr-xjs/controllers/elements/element-controller.js102
-rwxr-xr-xjs/controllers/elements/shapes-controller.js103
-rwxr-xr-xjs/controllers/styles-controller.js4
-rwxr-xr-xjs/data/menu-data.js12
-rwxr-xr-xjs/data/pi/pi-data.js10
-rwxr-xr-xjs/data/tools-data.js4
-rwxr-xr-xjs/document/document-html.js14
-rwxr-xr-xjs/document/helpers/webgl-helper.js14
-rwxr-xr-xjs/document/mediators/template.js796
-rwxr-xr-xjs/document/models/base.js99
-rwxr-xr-xjs/document/models/html.js50
-rw-r--r--js/document/templates/app/main.js1
-rwxr-xr-xjs/document/templates/banner/index.html47
-rwxr-xr-xjs/document/templates/html/index.html50
-rwxr-xr-xjs/document/views/design.js106
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js6
-rwxr-xr-xjs/helper-classes/3D/math-utils.js11
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js14
-rw-r--r--js/io/system/ninjalibrary.js42
-rw-r--r--js/io/system/ninjalibrary.json2
-rw-r--r--js/io/ui/new-file-dialog/new-file-options-navigator.reel/new-file-options-navigator.js5
-rwxr-xr-xjs/lib/NJUtils.js120
-rwxr-xr-xjs/lib/geom/brush-stroke.js1352
-rwxr-xr-xjs/lib/geom/sub-path.js331
-rwxr-xr-xjs/mediators/drag-drop-mediator.js2
-rwxr-xr-xjs/mediators/element-mediator.js123
-rw-r--r--js/mediators/io-mediator.js716
-rwxr-xr-xjs/mediators/keyboard-mediator.js7
-rwxr-xr-xjs/models/element-model.js100
-rwxr-xr-xjs/ninja.reel/ninja.js41
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js22
-rwxr-xr-xjs/panels/properties.reel/properties.js4
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js2
-rw-r--r--js/panels/resize-composer.js5
-rwxr-xr-xjs/stage/stage.reel/stage.js5
-rw-r--r--js/tools/BrushTool.js17
-rwxr-xr-xjs/tools/EyedropperTool.js1
-rwxr-xr-xjs/tools/FillTool.js33
-rwxr-xr-xjs/tools/InkBottleTool.js50
-rwxr-xr-xjs/tools/LineTool.js109
-rwxr-xr-xjs/tools/PenTool.js445
-rwxr-xr-xjs/tools/SelectionTool.js114
-rwxr-xr-xjs/tools/ShapeTool.js45
-rwxr-xr-xjs/tools/TagTool.js15
-rwxr-xr-xjs/tools/drawing-tool.js3
-rwxr-xr-xjs/tools/modifier-tool-base.js2
-rw-r--r--node_modules/montage-google/feed-reader/feed-entry.reel/feed-entry.html3
-rw-r--r--node_modules/montage-google/feed-reader/feed-reader.reel/feed-reader.js8
-rw-r--r--node_modules/montage-google/map.reel/map.js96
-rwxr-xr-xscss/imports/scss/_ScrollBars.scss26
63 files changed, 3751 insertions, 2334 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index af860b95..fe5f839c 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -378,6 +378,16 @@ NinjaCvsRt.GLRuntime = Object.create(Object.prototype, {
378 obj.importJSON( jObj ); 378 obj.importJSON( jObj );
379 break; 379 break;
380 380
381 case 5: //subpath (created by pen tool)
382 obj = Object.create(NinjaCvsRt.RuntimeSubPath, {_materials: { value:[], writable:true}});
383 obj.importJSON (jObj );
384 break;
385
386 case 6: //brushstroke (created by brush tool)
387 obj = Object.create(NinjaCvsRt.RuntimeBrushStroke, {_materials: { value:[], writable:true}});
388 obj.importJSON (jObj );
389 break;
390
381 default: 391 default:
382 throw new Error( "Attempting to load unrecognized object type: " + type ); 392 throw new Error( "Attempting to load unrecognized object type: " + type );
383 break; 393 break;
@@ -520,6 +530,7 @@ NinjaCvsRt.RuntimeGeomObj = Object.create(Object.prototype, {
520 GEOM_TYPE_LINE: { value: 3, writable: false }, 530 GEOM_TYPE_LINE: { value: 3, writable: false },
521 GEOM_TYPE_PATH: { value: 4, writable: false }, 531 GEOM_TYPE_PATH: { value: 4, writable: false },
522 GEOM_TYPE_CUBIC_BEZIER: { value: 5, writable: false }, 532 GEOM_TYPE_CUBIC_BEZIER: { value: 5, writable: false },
533 GEOM_TYPE_BRUSH_STROKE: { value: 6, writable: false },
523 GEOM_TYPE_UNDEFINED: { value: -1, writable: false }, 534 GEOM_TYPE_UNDEFINED: { value: -1, writable: false },
524 535
525 /////////////////////////////////////////////////////////////////////// 536 ///////////////////////////////////////////////////////////////////////
@@ -1804,3 +1815,485 @@ NinjaCvsRt.RuntimePlasmaMaterial = Object.create(NinjaCvsRt.RuntimeMaterial, {
1804}); 1815});
1805 1816
1806 1817
1818
1819// **************************************************************************
1820// Runtime for the pen tool path
1821// **************************************************************************
1822NinjaCvsRt.AnchorPoint = Object.create(Object.prototype, {
1823 /////////////////////////////////////////
1824 // Instance variables
1825 /////////////////////////////////////////
1826 _x: {value: 0.0, writable: true},
1827 _y: {value: 0.0, writable: true},
1828 _z: {value: 0.0, writable: true},
1829
1830 _prevX: {value: 0.0, writable: true},
1831 _prevY: {value: 0.0, writable: true},
1832 _prevZ: {value: 0.0, writable: true},
1833
1834 _nextX: {value: 0.0, writable: true},
1835 _nextY: {value: 0.0, writable: true},
1836 _nextZ: {value: 0.0, writable: true},
1837
1838 // *********** setters ************
1839 setPos: {
1840 value: function(x,y,z){
1841 this._x = x;
1842 this._y = y;
1843 this._z = z;
1844 }
1845 },
1846
1847 setPrevPos: {
1848 value: function (x, y, z) {
1849 this._prevX = x;
1850 this._prevY = y;
1851 this._prevZ = z;
1852 }
1853 },
1854
1855 setNextPos: {
1856 value: function (x, y, z) {
1857 this._nextX = x;
1858 this._nextY = y;
1859 this._nextZ = z;
1860 }
1861 },
1862
1863 // *************** getters ******************
1864 // (add as needed)
1865 getPosX: {
1866 value: function () {
1867 return this._x;
1868 }
1869 },
1870
1871 getPosY: {
1872 value: function () {
1873 return this._y;
1874 }
1875 },
1876
1877 getPosZ: {
1878 value: function () {
1879 return this._z;
1880 }
1881 },
1882
1883 getPrevX: {
1884 value: function () {
1885 return this._prevX;
1886 }
1887 },
1888
1889 getPrevY: {
1890 value: function () {
1891 return this._prevY;
1892 }
1893 },
1894
1895 getPrevZ: {
1896 value: function () {
1897 return this._prevZ;
1898 }
1899 },
1900
1901 getNextX: {
1902 value: function () {
1903 return this._nextX;
1904 }
1905 },
1906
1907 getNextY: {
1908 value: function () {
1909 return this._nextY;
1910 }
1911 },
1912