aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/canvas-runtime.js243
-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.js4
-rwxr-xr-xjs/controllers/elements/component-controller.js4
-rwxr-xr-xjs/controllers/elements/element-controller.js102
-rwxr-xr-xjs/controllers/elements/shapes-controller.js103
-rwxr-xr-xjs/data/menu-data.js12
-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.js756
-rwxr-xr-xjs/document/models/base.js58
-rwxr-xr-xjs/document/models/html.js48
-rw-r--r--js/document/templates/app/main.js51
-rwxr-xr-xjs/document/templates/banner/index.html24
-rwxr-xr-xjs/document/templates/html/index.html27
-rwxr-xr-xjs/document/views/design.js92
-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.js93
-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.js712
-rwxr-xr-xjs/mediators/keyboard-mediator.js7
-rwxr-xr-xjs/models/element-model.js94
-rwxr-xr-xjs/ninja.reel/ninja.js41
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js96
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js64
-rwxr-xr-xjs/stage/stage.reel/stage.js5
-rw-r--r--js/tools/BrushTool.js15
-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/components-data/feed-reader.json1
-rw-r--r--node_modules/components-data/picasa-carousel.json1
-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
59 files changed, 2799 insertions, 1742 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index af860b95..4fb0a327 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -378,6 +378,10 @@ 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;
381 default: 385 default:
382 throw new Error( "Attempting to load unrecognized object type: " + type ); 386 throw new Error( "Attempting to load unrecognized object type: " + type );
383 break; 387 break;
@@ -1804,3 +1808,242 @@ NinjaCvsRt.RuntimePlasmaMaterial = Object.create(NinjaCvsRt.RuntimeMaterial, {
1804}); 1808});
1805 1809
1806 1810
1811
1812// **************************************************************************
1813// Runtime for the pen tool path
1814// **************************************************************************
1815NinjaCvsRt.AnchorPoint = Object.create(Object.prototype, {
1816 /////////////////////////////////////////
1817 // Instance variables
1818 /////////////////////////////////////////
1819 _x: {value: 0.0, writable: true},
1820 _y: {value: 0.0, writable: true},
1821 _z: {value: 0.0, writable: true},
1822
1823 _prevX: {value: 0.0, writable: true},
1824 _prevY: {value: 0.0, writable: true},
1825 _prevZ: {value: 0.0, writable: true},
1826
1827 _nextX: {value: 0.0, writable: true},
1828 _nextY: {value: 0.0, writable: true},
1829 _nextZ: {value: 0.0, writable: true},
1830
1831 // *********** setters ************
1832 setPos: {
1833 value: function(x,y,z){
1834 this._x = x;
1835 this._y = y;
1836 this._z = z;
1837 }
1838 },
1839
1840 setPrevPos: {
1841 value: function (x, y, z) {
1842 this._prevX = x;
1843 this._prevY = y;
1844 this._prevZ = z;
1845 }
1846 },
1847
1848 setNextPos: {
1849 value: function (x, y, z) {
1850 this._nextX = x;
1851 this._nextY = y;
1852 this._nextZ = z;
1853 }
1854 },
1855
1856 // *************** getters ******************
1857 // (add as needed)
1858 getPosX: {
1859 value: function () {
1860 return this._x;
1861 }
1862 },
1863
1864 getPosY: {
1865 value: function () {
1866 return this._y;
1867 }
1868 },
1869
1870 getPosZ: {
1871 value: function () {
1872 return this._z;
1873 }
1874 },
1875
1876 getPrevX: {
1877 value: function () {
1878 return this._prevX;
1879 }
1880 },
1881
1882 getPrevY: {
1883 value: function () {
1884 return this._prevY;
1885 }
1886 },
1887
1888 getPrevZ: {
1889 value: function () {
1890 return this._prevZ;
1891 }
1892 },
1893
1894 getNextX: {
1895 value: function () {
1896 return this._nextX;
1897 }
1898 },
1899
1900 getNextY: {
1901 value: function () {
1902 return this._nextY;
1903 }
1904 },
1905
1906 getNextZ: {
1907 value: function () {
1908 return this._nextZ;
1909 }
1910 }
1911});
1912
1913NinjaCvsRt.RuntimeSubPath = Object.create(NinjaCvsRt.RuntimeGeomObj, {
1914 // array of anchor points
1915 _Anchors: { value: null, writable: true },
1916
1917 //path properties
1918 _isClosed: {value: false, writable: true},
1919 _strokeWidth: {value: 0, writable: true},
1920 _strokeColor: {value: null, writable: true},
1921 _fillColor: {value: null, writable: true},
1922
1923 geomType: {