diff options
24 files changed, 223 insertions, 257 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js index 4ab377c6..4181dd89 100644 --- a/assets/canvas-runtime.js +++ b/assets/canvas-runtime.js | |||
@@ -635,11 +635,11 @@ NinjaCvsRt.RuntimeGeomObj = Object.create(Object.prototype, { | |||
635 | case "plasma": mat = Object.create(NinjaCvsRt.RuntimePlasmaMaterial, {}); break; | 635 | case "plasma": mat = Object.create(NinjaCvsRt.RuntimePlasmaMaterial, {}); break; |
636 | case "taper": mat = Object.create(NinjaCvsRt.RuntimeTaperMaterial, {}); break; | 636 | case "taper": mat = Object.create(NinjaCvsRt.RuntimeTaperMaterial, {}); break; |
637 | 637 | ||
638 | case "paris": | 638 | case "blueSky": |
639 | case "water": mat = Object.create(NinjaCvsRt.RuntimeWaterMaterial, {}); break; | 639 | case "water": mat = Object.create(NinjaCvsRt.RuntimeWaterMaterial, {}); break; |
640 | 640 | ||
641 | case "deform": | 641 | case "deform": |
642 | case "raiders": | 642 | case "darkBlur": |
643 | case "tunnel": | 643 | case "tunnel": |
644 | case "reliefTunnel": | 644 | case "reliefTunnel": |
645 | case "squareTunnel": | 645 | case "squareTunnel": |
diff --git a/assets/descriptor.json b/assets/descriptor.json index d9d74e6b..db824387 100644 --- a/assets/descriptor.json +++ b/assets/descriptor.json | |||
@@ -20,9 +20,9 @@ | |||
20 | "images/cubelight.png", | 20 | "images/cubelight.png", |
21 | "images/random_normal.png", | 21 | "images/random_normal.png", |
22 | "images/white.png", | 22 | "images/white.png", |
23 | "images/paris.png", | 23 | "images/bluesky.png", |
24 | "images/powderblue.png", | 24 | "images/powderblue.png", |
25 | "images/raiders.png", | 25 | "images/darkblur.png", |
26 | "images/us_flag.png", | 26 | "images/us_flag.png", |
27 | "shaders/Basic.frag.glsl", | 27 | "shaders/Basic.frag.glsl", |
28 | "shaders/TwistVert.vert.glsl", | 28 | "shaders/TwistVert.vert.glsl", |
@@ -34,9 +34,9 @@ | |||
34 | "shaders/linearGradient.frag.glsl", | 34 | "shaders/linearGradient.frag.glsl", |
35 | "shaders/linearGradient.vert.glsl", | 35 | "shaders/linearGradient.vert.glsl", |
36 | "shaders/plasma.frag.glsl", | 36 | "shaders/plasma.frag.glsl", |
37 | "shaders/Paris.frag.glsl", | ||
38 | "shaders/plasma.vert.glsl", | 37 | "shaders/plasma.vert.glsl", |
39 | "shaders/Pulse.frag.glsl", | 38 | "shaders/Pulse.frag.glsl", |
39 | "shaders/radialBlur.frag.glsl", | ||
40 | "shaders/radialGradient.frag.glsl", | 40 | "shaders/radialGradient.frag.glsl", |
41 | "shaders/radialGradient.vert.glsl", | 41 | "shaders/radialGradient.vert.glsl", |
42 | "shaders/test_fshader.glsl", | 42 | "shaders/test_fshader.glsl", |
diff --git a/assets/images/paris.png b/assets/images/bluesky.png index b7ef6c7b..b7ef6c7b 100644 --- a/assets/images/paris.png +++ b/assets/images/bluesky.png | |||
Binary files differ | |||
diff --git a/assets/images/raiders.png b/assets/images/darkblur.png index 64c39c89..64c39c89 100644 --- a/assets/images/raiders.png +++ b/assets/images/darkblur.png | |||
Binary files differ | |||
diff --git a/assets/shaders/Paris.frag.glsl b/assets/shaders/Paris.frag.glsl deleted file mode 100644 index 690b1453..00000000 --- a/assets/shaders/Paris.frag.glsl +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | #ifdef GL_ES | ||
2 | precision highp float; | ||
3 | #endif | ||
4 | |||
5 | uniform sampler2D u_tex0; | ||
6 | uniform float u_time; | ||
7 | uniform vec2 u_resolution; | ||
8 | const float PI = 3.1415926535897932; | ||
9 | |||
10 | //speed | ||
11 | |||
12 | const float speed = 0.1; | ||
13 | const float speed_x = 0.075; | ||
14 | const float speed_y = 0.000; | ||
15 | |||
16 | // geometry | ||
17 | const float intensity = 1.5; | ||
18 | const int steps = 8; | ||
19 | //const float frequency = 4.0; | ||
20 | const float frequency = 2.0; | ||
21 | const int angle = 7; // better when a prime | ||
22 | |||
23 | // reflection and emboss | ||
24 | const float delta = 20.; | ||
25 | const float intence = 400.; | ||
26 | const float emboss = 0.3; | ||
27 | |||
28 | //---------- crystals effect | ||
29 | |||
30 | float col(vec2 coord) | ||
31 | { | ||
32 | float delta_theta = 2.0 * PI / float(angle); | ||
33 | float col = 0.0; | ||
34 | float theta = 0.0; | ||
35 | for (int i = 0; i < steps; i++) | ||
36 | { | ||
37 | vec2 adjc = coord; | ||
38 | theta = delta_theta*float(i); | ||
39 | adjc.x += cos(theta)*u_time*speed + u_time * speed_x; | ||
40 | adjc.y -= sin(theta)*u_time*speed - u_time * speed_y; | ||
41 | col = col + cos( (adjc.x*cos(theta) - adjc.y*sin(theta))*frequency)*intensity; | ||
42 | } | ||
43 | |||
44 | return cos(col); | ||
45 | } | ||
46 | |||
47 | //---------- main | ||
48 | |||
49 | void main(void) | ||
50 | { | ||
51 | vec2 p = (gl_FragCoord.xy) / u_resolution.xy, c1 = p, c2 = p; | ||
52 | float cc1 = col(c1); | ||
53 | |||
54 | c2.x += u_resolution.x/delta; | ||
55 | float dx = emboss*(cc1-col(c2))/delta; | ||
56 | |||
57 | c2.x = p.x; | ||
58 | c2.y += u_resolution.y/delta; | ||
59 | float dy = emboss*(cc1-col(c2))/delta; | ||
60 | |||
61 | c1.x += dx; | ||
62 | c1.y = -(c1.y+dy); | ||
63 | |||
64 | float alpha = 1.+dot(dx,dy)*intence; | ||
65 | gl_FragColor = texture2D(u_tex0,c1)*(alpha); | ||
66 | // gl_FragColor = vec4(col(p),0,0,1); | ||
67 | |||
68 | } | ||
diff --git a/js/clipboard/external-apps-clipboard-agent.js b/js/clipboard/external-apps-clipboard-agent.js index 65410543..b82784d3 100644 --- a/js/clipboard/external-apps-clipboard-agent.js +++ b/js/clipboard/external-apps-clipboard-agent.js | |||
@@ -148,16 +148,12 @@ var ExternalAppsClipboardAgent = exports.ExternalAppsClipboardAgent = Montage.cr | |||
148 | data = htmlData ? htmlData : textData; | 148 | data = htmlData ? htmlData : textData; |
149 | 149 | ||
150 | if (data && data.length) { | 150 | if (data && data.length) { |
151 | //deselect current selections | ||
152 | this.application.ninja.selectedElements.length = 0; | ||
153 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": true} ); | ||
154 | |||
155 | divWrapper = document.application.njUtils.make("div", null, this.application.ninja.currentDocument); | 151 | divWrapper = document.application.njUtils.make("div", null, this.application.ninja.currentDocument); |
156 | this.application.ninja.elementMediator.addElements(divWrapper, {"height": "68px", | 152 | this.application.ninja.elementMediator.addElements(divWrapper, {"height": "68px", |
157 | "left": "0px", | 153 | "left": "0px", |
158 | "position": "absolute", | 154 | "position": "absolute", |
159 | "top": "0px", | 155 | "top": "0px", |
160 | "width": "161px"}, false); | 156 | "width": "161px"}, false/*notify*/, false/*callAddDelegate*/); |
161 | 157 | ||
162 | divWrapper.innerHTML = data; | 158 | divWrapper.innerHTML = data; |
163 | 159 | ||
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js index c3543c95..3eba1bec 100644 --- a/js/controllers/clipboard-controller.js +++ b/js/controllers/clipboard-controller.js | |||
@@ -82,16 +82,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component | |||
82 | 82 | ||
83 | // Don't do anything if an input or other control is focused except the copy menu button | 83 | // Don't do anything if an input or other control is focused except the copy menu button |
84 | if(document.activeElement.nodeName !== "BODY") { | 84 | if(document.activeElement.nodeName !== "BODY") { |
85 | if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") { | 85 | if(!(document.activeElement.getAttribute("data-montage-id") === "menuItemButton")) { |
86 | return; | 86 | return; |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | //perform clipboard operations only if selection tool is selected | ||
91 | if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){ | ||
92 | return; | ||
93 | } | ||
94 | |||
95 | if(this.clipboardContext === "stage"){ | 90 | if(this.clipboardContext === "stage"){ |
96 | ElementsClipboardAgent.copy(clipboardEvent); | 91 | ElementsClipboardAgent.copy(clipboardEvent); |
97 | } | 92 | } |
@@ -106,16 +101,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component | |||
106 | 101 | ||
107 | // Don't do anything if an input or other control is focused | 102 | // Don't do anything if an input or other control is focused |
108 | if(document.activeElement.nodeName !== "BODY") { | 103 | if(document.activeElement.nodeName !== "BODY") { |
109 | if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") { | 104 | if(!(document.activeElement.getAttribute("data-montage-id") === "menuItemButton")) { |
110 | return; | 105 | return; |
111 | } | 106 | } |
112 | } | 107 | } |
113 | 108 | ||
114 | //perform clipboard operations only if selection tool is selected | ||
115 | if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){ | ||
116 | return; | ||
117 | } | ||
118 | |||
119 | if |