aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/canvas-runtime.js64
-rwxr-xr-xassets/shaders/linearGradient.vert.glsl5
-rw-r--r--assets/shaders/radialGradient.vert.glsl4
-rw-r--r--js/components/controllers/tree-controller.js10
-rw-r--r--js/components/editable.reel/editable.js43
-rw-r--r--js/components/hintable.reel/hintable.js46
-rwxr-xr-xjs/components/layout/document-entry.reel/document-entry.js4
-rwxr-xr-xjs/components/layout/tool-button.reel/tool-button.html4
-rwxr-xr-xjs/components/layout/tool-button.reel/tool-button.js11
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html12
-rwxr-xr-xjs/components/radio.reel/radio.html9
-rwxr-xr-xjs/components/radio.reel/radio.js24
-rw-r--r--js/components/toolbar.reel/toolbar.css62
-rw-r--r--js/components/toolbar.reel/toolbar.html53
-rw-r--r--js/components/toolbar.reel/toolbar.js123
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.html46
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.js79
-rw-r--r--js/components/treeview/tree-node.js4
-rw-r--r--js/components/treeview/treeview.reel/treeview.js5
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js13
-rwxr-xr-xjs/components/ui/file-input.reel/file-input.js2
-rwxr-xr-xjs/components/ui/input-group.reel/input-group.html3
-rwxr-xr-xjs/components/ui/property-control.reel/property-control.js12
-rw-r--r--js/controllers/code-editor-controller.js40
-rwxr-xr-xjs/controllers/document-controller.js247
-rwxr-xr-xjs/controllers/elements/body-controller.js2
-rwxr-xr-xjs/controllers/selection-controller.js4
-rwxr-xr-xjs/controllers/styles-controller.js149
-rw-r--r--js/data/panels-data.js8
-rwxr-xr-xjs/data/tools-data.js13
-rwxr-xr-xjs/document/document-html.js43
-rwxr-xr-xjs/document/document-text.js52
-rwxr-xr-xjs/document/html-document.js82
-rwxr-xr-xjs/document/models/base.js22
-rwxr-xr-xjs/document/models/html.js22
-rwxr-xr-xjs/document/models/text.js57
-rwxr-xr-xjs/document/templates/html/index.html4
-rwxr-xr-xjs/document/views/base.js2
-rwxr-xr-xjs/document/views/code.js152
-rwxr-xr-xjs/document/views/design.js47
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js4
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js166
-rwxr-xr-xjs/helper-classes/3D/view-utils.js75
-rw-r--r--js/io/system/ninjalibrary.json2
-rwxr-xr-xjs/lib/NJUtils.js9
-rwxr-xr-xjs/lib/geom/circle.js124
-rwxr-xr-xjs/lib/geom/rectangle.js190
-rw-r--r--js/lib/geom/shape-primitive.js27
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js36
-rwxr-xr-xjs/lib/rdge/materials/material.js4
-rwxr-xr-xjs/lib/rdge/materials/radial-gradient-material.js70
-rw-r--r--js/mediators/io-mediator.js212
-rwxr-xr-xjs/mediators/keyboard-mediator.js2
-rwxr-xr-xjs/ninja.reel/ninja.js34
-rwxr-xr-xjs/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js19
-rwxr-xr-xjs/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html12
-rwxr-xr-xjs/panels/CSSPanel/ComputedStyleSubPanel.reel/computed-style-sub-panel.css32
-rwxr-xr-xjs/panels/CSSPanel/css-property-name-list.js2
-rwxr-xr-xjs/panels/CSSPanel/css-shorthand-map.js45
-rwxr-xr-xjs/panels/CSSPanel/css-value-completion-map.js5
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.html2
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js7
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html3
-rwxr-xr-xjs/panels/Splitter.js7
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js6
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js9
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js6
-rw-r--r--js/panels/collapse-composer.js137
-rw-r--r--js/panels/css-panel/css-panel-container.js15
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.css63
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.html56
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.js19
-rw-r--r--js/panels/css-panel/css-style.reel/css-style.css188
-rw-r--r--js/panels/css-panel/css-style.reel/css-style.html87
-rw-r--r--js/panels/css-panel/css-style.reel/css-style.js416
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.css93
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html90
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js174
-rw-r--r--js/panels/css-panel/rule-list-container.reel/rule-list-container.html48
-rw-r--r--js/panels/css-panel/rule-list-container.reel/rule-list-container.js185
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.css30
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.html25
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.js213
-rw-r--r--js/panels/css-panel/style-declaration.reel/style-declaration.css13
-rw-r--r--js/panels/css-panel/style-declaration.reel/style-declaration.html63
-rw-r--r--js/panels/css-panel/style-declaration.reel/style-declaration.js326
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.css145
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.html101
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.js267
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css53
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html116
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js270
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.css33
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.html82
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js184
-rw-r--r--js/panels/css-panel/styles-view-delegate.js296
-rwxr-xr-xjs/panels/properties.reel/properties.css31
-rwxr-xr-xjs/panels/properties.reel/properties.js53
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.html10
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/dual-row.reel/dual-row.js3
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js2
-rwxr-xr-xjs/stage/stage-deps.js73
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js154
-rwxr-xr-xjs/stage/stage.reel/stage.html3
-rwxr-xr-xjs/stage/stage.reel/stage.js144
-rwxr-xr-xjs/tools/drawing-tool-base.js39
106 files changed, 5719 insertions, 1275 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index eeafaab6..af860b95 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -8,9 +8,37 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
8var NinjaCvsRt = NinjaCvsRt || {}; 8var NinjaCvsRt = NinjaCvsRt || {};
9 9
10/////////////////////////////////////////////////////////////////////// 10///////////////////////////////////////////////////////////////////////
11//Loading webGL/canvas data on window load
12window.addEventListener('load', loadCanvasData, false);
13//Load data function (on document loaded)
14function loadCanvasData (e) {
15 //Cleaning up events
16 window.removeEventListener('load', loadCanvasData, false);
17 //Getting tag with data, MUST contain attribute
18 var xhr, tag = document.querySelectorAll(['script[data-ninja-canvas-lib]'])[0];
19 //Checking for data to be external file
20 if (tag.getAttribute('data-ninja-canvas-json') !== null) {
21 //Loading JSON data
22 xhr = new XMLHttpRequest();
23 xhr.open("GET", tag.getAttribute('data-ninja-canvas-json'), false);
24 xhr.send();
25 //Checking for data
26 if (xhr.readyState === 4) {
27 //Calling method to initialize all webGL/canvas(es)
28 NinjaCvsRt.initWebGl(document.body, tag.getAttribute('data-ninja-canvas-libpath'), xhr.response);
29 } else {
30