diff options
-rw-r--r-- | README.md | 61 | ||||
-rw-r--r-- | assets/descriptor.json | 12 | ||||
-rw-r--r-- | assets/shaders/Deform.frag.glsl | 30 | ||||
-rw-r--r-- | assets/shaders/Fly.frag.glsl | 24 | ||||
-rw-r--r-- | assets/shaders/Julia.frag.glsl | 26 | ||||
-rw-r--r-- | assets/shaders/Keleidoscope.frag.glsl | 29 | ||||
-rw-r--r-- | assets/shaders/Mandel.frag.glsl | 58 | ||||
-rw-r--r-- | assets/shaders/ReliefTunnel.frag.glsl | 38 | ||||
-rw-r--r-- | assets/shaders/SquareTunnel.frag.glsl | 22 | ||||
-rw-r--r-- | assets/shaders/Star.frag.glsl | 31 | ||||
-rw-r--r-- | assets/shaders/Tunnel.frag.glsl | 24 | ||||
-rw-r--r-- | assets/shaders/Twist.frag.glsl | 26 | ||||
-rw-r--r-- | assets/shaders/ZInvert.frag.glsl | 26 | ||||
-rwxr-xr-x | index.html | 2 | ||||
-rw-r--r-- | js/io/system/ninjalibrary.json | 2 | ||||
-rwxr-xr-x | js/models/materials-model.js | 78 | ||||
-rw-r--r-- | js/panels/Materials/materials-data.json | 52 | ||||
-rw-r--r-- | manifest.json | 6 | ||||
-rw-r--r-- | ninja_icon_16.png | bin | 0 -> 506 bytes |
19 files changed, 75 insertions, 472 deletions
@@ -7,46 +7,47 @@ | |||
7 | 7 | ||
8 | To run the Ninja Application you will need the following: | 8 | To run the Ninja Application you will need the following: |
9 | 9 | ||
10 | - Be able to access the Motorola internal network, using the blue port or VPN | ||
11 | - The latest stable version of Chrome | 10 | - The latest stable version of Chrome |
12 | - Ninja can be run in either a Chrome unpackaged application or packaged application (.crx). Instructions below | 11 | - Ninja can be run in either a Chrome unpacked application or packed application (.crx). Instructions below |
13 | 12 | ||
14 | ###Setup and Run Ninja as an unpackaged application | 13 | ###Setup and Run Ninja as an unpacked application |
15 | 14 | ||
16 | If you're already familiar with using Git, GitHub, and how to configure a local web server, | 15 | If you're already familiar with using Git, GitHub, you can clone master branch or download the source zip file. To use the stable branch, select V0.7.0 branch. |
17 | 16 | ||
18 | 1. Download Ninja Local Cloud: | 17 | 1. Download Ninja Local Cloud: Win: download Ninja Local Cloud app from the Ninja CRX on Chrome webstore, https://chrome.google.com/webstore/detail/jjdndclgmfdgpiccmlamlicfjmkognne |
19 | Win: get Ninja Local Cloud.exe from \\ninjateam.am.mot.com\users\jmayhew\Ninja Local Cloud, | ||
20 | Mac: get Ninja Local Cloud.app from smb://ninjateam.am.mot.com/users/jmayhew/Ninja Local Cloud | ||
21 | 2. Launch Ninja Local Cloud. On Mac, click Allow when asked to accept incoming network connection. | 18 | 2. Launch Ninja Local Cloud. On Mac, click Allow when asked to accept incoming network connection. |
22 | 3. Click Copy button to copy the Ninja Local Cloud URL. | 19 | 3. In the Chrome browser, go to chrome://chrome/extensions/ |
23 | 4. Launch your cloned master branch. | 20 | 4. Turn on Developer mode. |
24 | 5. You should get the Cloud Service Dialog. | 21 | 5. Load unpacked extension... and browse to your cloned master branch. |
25 | 6. Paste in the Ninja Local Cloud URL that you copied in step 3. | 22 | 6. Copy Ninja app ID from the Extensions page under the app name. |
26 | 7. Click the TEST button. It should still show Disconnected. | 23 | 7. On Windows: |
27 | 8. In the Ninja Local Cloud app, click on Advanced button, you should see an error that it ignores the url where you run Ninja. If you don't any text when clicking Test, there's no connection established between Ninja and Ninja Local Cloud, you probably did not click Allow the incoming connection, or check your network connection, try public network instead of DSA, disconnect from VPN, etc. | ||
28 | 9. Copy the URL in the error text, this is also the URL of where you run your Ninja build, something like http://localhost:9080 on Windows or http://yourmachinename.am.mot.com on Mac | ||
29 | 10. On Windows: | ||
30 | Click Start menu icon and type regedit | 24 | Click Start menu icon and type regedit |
31 | Browse to HKEY_CURRENT_USER/Software/Motorola Mobility/Ninja Local Cloud/Options | 25 | Browse to HKEY_CURRENT_USER/Software/Motorola Mobility/Ninja Local Cloud/Options |
32 | Right click and select New > String value | 26 | Right click and select New > String value |
33 | Type 'Local Ninja Origin' no quotes | 27 | Type 'Local Ninja Origin' no quotes |
34 | Double click on Local Ninja Origin and paste in the URL copied in step 10 in the Value data field. | 28 | Double click on Local Ninja Origin and paste in the ID copied in step 6 in the Value data field. Close Registry Editor. |
35 | Close Registry Editor. | 29 | 8. On Mac: |
36 | |||
37 | 11. On Mac: | ||
38 | Launch Finder. | 30 | Launch Finder. |
39 | Double click on <yourusername>/Library/Preferences/com.MotorolaMobility.Ninja-Local-Cloud.plist | 31 | Double click on /Library/Preferences/com.MotorolaMobility.Ninja-Local-Cloud.plist |
40 | Click on Add Child | 32 | Click on Add Child Type 'Local Ninja Origin' no quotes |
41 | Type 'Local Ninja Origin' no quotes | 33 | For value, paste in the ID copied in step 6. |
42 | For value, paste in the URL copied in step 10. | 34 | Save (File > Save or Cmd S) Close Property List Editor |
43 | Save (File > Save or Cmd S) | 35 | 9. Quit Ninja Local Cloud |
44 | Close Property List Editor | 36 | 10. Launch Ninja Local Cloud |
45 | 12. Quit Ninja Local Cloud | 37 | 11. Click Copy button to copy the Ninja Local Cloud URL. |
46 | 13. Launch Ninja Local Cloud | 38 | 12. New tab in Chrome and launch the Ninja app. |
47 | 14. In Ninja, click Test again, you should see the green text that said "Connected to Ninja Local Cloud". | 39 | 13. Paste in the Ninja Local Cloud URL that you copied in step 11 in the Cloud Service dialog in Ninja. |
40 | 14. Click the TEST button, you should see the green text that said "Connected to Ninja Local Cloud". | ||
48 | 15. Ninja is opened with no document. You should be able to do File > New File and select Basic HTML, give it a name and click browse to the directory. By default, files will be saved in Ninja Projects folder in user documents. As long as Ninja Local Cloud is running, you will not see the Cloud Service Dialog next time you launch. | 41 | 15. Ninja is opened with no document. You should be able to do File > New File and select Basic HTML, give it a name and click browse to the directory. By default, files will be saved in Ninja Projects folder in user documents. As long as Ninja Local Cloud is running, you will not see the Cloud Service Dialog next time you launch. |
49 | 42 | ||
50 | 43 | ||
51 | ###Setup and Run Ninja as a packaged application | 44 | ###Setup and Run Ninja as a packaged application (from Chrome Webstore) |
52 | 45 | ||
46 | 1. Get Ninja Authoring Tool from Chrome Webstore, https://chrome.google.com/webstore/detail/jjdndclgmfdgpiccmlamlicfjmkognne or search for 'Ninja Authoring'. | ||
47 | 2. New tab in Chrome and launch the Ninja app. | ||
48 | 3. In the Cloud Service dialog, download the Ninja Local Cloud app. | ||
49 | 4. Launch Ninja Local Cloud | ||
50 | 5. Click Copy button to copy the Ninja Local Cloud URL. | ||
51 | 6. Paste in the Ninja Local Cloud URL that you copied in step 5 in the Cloud Service dialog in Ninja. | ||
52 | 7. Click the TEST button, you should see the green text that said "Connected to Ninja Local Cloud". | ||
53 | 8. Ninja is opened with no document. You should be able to do File > New File and select Basic HTML, give it a name and click browse to the directory. By default, files will be saved in Ninja Projects folder in user documents. As long as Ninja Local Cloud is running, you will not see the Cloud Service Dialog next time you launch. | ||
diff --git a/assets/descriptor.json b/assets/descriptor.json index 2cd21830..d9d74e6b 100644 --- a/assets/descriptor.json +++ b/assets/descriptor.json | |||
@@ -28,35 +28,23 @@ | |||
28 | "shaders/TwistVert.vert.glsl", | 28 | "shaders/TwistVert.vert.glsl", |
29 | "shaders/Basic.vert.glsl", | 29 | "shaders/Basic.vert.glsl", |
30 | "shaders/Water.frag.glsl", | 30 | "shaders/Water.frag.glsl", |
31 | "shaders/Deform.frag.glsl", | ||
32 | "shaders/Water2.frag.glsl", | 31 | "shaders/Water2.frag.glsl", |
33 | "shaders/Flag.vert.glsl", | 32 | "shaders/Flag.vert.glsl", |
34 | "shaders/Flag.frag.glsl", | 33 | "shaders/Flag.frag.glsl", |
35 | "shaders/ZInvert.frag.glsl", | ||
36 | "shaders/Fly.frag.glsl", | ||
37 | "shaders/linearGradient.frag.glsl", | 34 | "shaders/linearGradient.frag.glsl", |
38 | "shaders/Julia.frag.glsl", | ||
39 | "shaders/linearGradient.vert.glsl", | 35 | "shaders/linearGradient.vert.glsl", |
40 | "shaders/Keleidoscope.frag.glsl", | ||
41 | "shaders/plasma.frag.glsl", | 36 | "shaders/plasma.frag.glsl", |
42 | "shaders/Mandel.frag.glsl", | ||
43 | "shaders/Paris.frag.glsl", | 37 | "shaders/Paris.frag.glsl", |
44 | "shaders/plasma.vert.glsl", | 38 | "shaders/plasma.vert.glsl", |
45 | "shaders/Pulse.frag.glsl", | 39 | "shaders/Pulse.frag.glsl", |
46 | "shaders/radialBlur.frag.glsl", | ||
47 | "shaders/ReliefTunnel.frag.glsl", | ||
48 | "shaders/radialGradient.frag.glsl", | 40 | "shaders/radialGradient.frag.glsl", |
49 | "shaders/SquareTunnel.frag.glsl", | ||
50 | "shaders/radialGradient.vert.glsl", | 41 | "shaders/radialGradient.vert.glsl", |
51 | "shaders/Star.frag.glsl", | ||
52 | "shaders/test_fshader.glsl", | 42 | "shaders/test_fshader.glsl", |
53 | "shaders/Taper.frag.glsl", | 43 | "shaders/Taper.frag.glsl", |
54 | "shaders/test_fshader_full.glsl", | 44 | "shaders/test_fshader_full.glsl", |
55 | "shaders/Taper.vert.glsl", | 45 | "shaders/Taper.vert.glsl", |
56 | "shaders/test_vshader.glsl", | 46 | "shaders/test_vshader.glsl", |
57 | "shaders/Tunnel.frag.glsl", | ||
58 | "shaders/ub_fshader.glsl", | 47 | "shaders/ub_fshader.glsl", |
59 | "shaders/Twist.frag.glsl", | ||
60 | "shaders/ub_vshader.glsl", | 48 | "shaders/ub_vshader.glsl", |
61 | "shaders/TwistVert.frag.glsl" | 49 | "shaders/TwistVert.frag.glsl" |
62 | ] | 50 | ] |
diff --git a/assets/shaders/Deform.frag.glsl b/assets/shaders/Deform.frag.glsl deleted file mode 100644 index a2bb4fa0..00000000 --- a/assets/shaders/Deform.frag.glsl +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | #ifdef GL_ES | ||
2 | precision highp float; | ||
3 | #endif | ||
4 | |||
5 | uniform float u_time; | ||
6 | uniform float u_speed; | ||
7 | uniform vec2 u_resolution; | ||
8 | //uniform vec4 mouse; | ||
9 | uniform sampler2D u_tex0; | ||
10 | |||
11 | void main(void) | ||
12 | { | ||
13 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; | ||
14 | //vec2 m = -1.0 + 2.0 * mouse.xy / u_resolution.xy; | ||
15 | vec2 m = vec2(-.8, .8); | ||
16 | |||
17 | float a1 = atan(p.y-m.y,p.x-m.x); | ||
18 | float r1 = sqrt(dot(p-m,p-m)); | ||
19 | float a2 = atan(p.y+m.y,p.x+m.x); | ||
20 | float r2 = sqrt(dot(p+m,p+m)); | ||
21 | |||
22 | vec2 uv; | ||
23 | uv.x = 0.2*u_time*u_speed + (r1-r2)*0.25; | ||
24 | uv.y = sin(2.0*(a1-a2)); | ||
25 | |||
26 | float w = r1*r2*0.8; | ||
27 | vec3 col = texture2D(u_tex0,uv).xyz; | ||
28 | |||
29 | gl_FragColor = vec4(col/(.1+w),1.0); | ||
30 | } \ No newline at end of file | ||
diff --git a/assets/shaders/Fly.frag.glsl b/assets/shaders/Fly.frag.glsl deleted file mode 100644 index d36928a1..00000000 --- a/assets/shaders/Fly.frag.glsl +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifdef GL_ES | ||
2 | precision highp float; | ||
3 | #endif | ||
4 | |||
5 | uniform vec2 u_resolution; | ||
6 | uniform float u_time; | ||
7 | uniform float u_speed; | ||
8 | uniform sampler2D u_tex0; | ||
9 | |||
10 | void main(void) | ||
11 | { | ||
12 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; | ||
13 | vec2 uv; | ||
14 | |||
15 | float an = u_time*u_speed*.25; | ||
16 | |||
17 | float x = p.x*cos(an)-p.y*sin(an); | ||
18 | float y = p.x*sin(an)+p.y*cos(an); | ||
19 | |||
20 | uv.x = .25*x/abs(y); | ||
21 | uv.y = .20*u_time*u_speed + .25/abs(y); | ||
22 | |||
23 | gl_FragColor = vec4(texture2D(u_tex0,uv).xyz * y*y, 1.0); | ||
24 | } | ||
diff --git a/assets/shaders/Julia.frag.glsl b/assets/shaders/Julia.frag.glsl deleted file mode 100644 index 7e616c40..00000000 --- a/assets/shaders/Julia.frag.glsl +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifdef GL_ES | ||
2 | precision highp float; | ||
3 | #endif | ||
4 | |||
5 | uniform vec2 u_resolution; | ||
6 | uniform float u_time; | ||
7 | uniform float u_speed; | ||
8 | |||
9 | void main(void) | ||
10 | { | ||
11 | vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / u_resolution.xy; | ||
12 | vec2 cc = vec2( cos(.25*u_time*u_speed), sin(.25*u_time*u_speed*1.423) ); | ||
13 | |||
14 | float dmin = 1000.0; | ||
15 | vec2 z = p*vec2(1.33,1.0); | ||
16 | for( int i=0; i<64; i++ ) | ||
17 | { | ||
18 | z = cc + vec2( z.x*z.x - z.y*z.y, 2.0*z.x*z.y ); | ||
19 | float m2 = dot(z,z); | ||
20 | if( m2>100.0 ) break; | ||
21 | dmin=min(dmin,m2); | ||
22 | } | ||
23 | |||
24 | float color = sqrt(sqrt(dmin))*0.7; | ||
25 | gl_FragColor = vec4(color,color,color,1.0); | ||
26 | } \ No newline at end of file | ||
diff --git a/assets/shaders/Keleidoscope.frag.glsl b/assets/shaders/Keleidoscope.frag.glsl deleted file mode 100644 index 7d95a95b..00000000 --- a/assets/shaders/Keleidoscope.frag.glsl +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifdef GL_ES |