aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/images/CL13.pngbin0 -> 40537 bytes
-rw-r--r--assets/images/cloud10.pngbin0 -> 58580 bytes
-rw-r--r--assets/images/us_flag.pngbin0 -> 9946 bytes
-rwxr-xr-xassets/shaders/Basic.vert.glsl3
-rw-r--r--assets/shaders/BasicTex.frag.glsl19
-rw-r--r--assets/shaders/Cloud.frag.glsl25
-rw-r--r--assets/shaders/Cloud.vert.glsl51
-rw-r--r--assets/shaders/Flag.frag.glsl20
-rw-r--r--assets/shaders/Flag.vert.glsl24
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.bat1
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.sh1
-rwxr-xr-xjs/lib/drawing/world.js316
-rwxr-xr-xjs/lib/geom/geom-obj.js110
-rwxr-xr-xjs/lib/geom/rectangle.js83
-rw-r--r--js/lib/geom/shape-primitive.js130
-rwxr-xr-xjs/lib/math/matrix.js9
-rwxr-xr-xjs/lib/rdge/materials/bump-metal-material.js84
-rw-r--r--js/lib/rdge/materials/cloud-material.js427
-rw-r--r--js/lib/rdge/materials/deform-material.js5
-rw-r--r--js/lib/rdge/materials/flag-material.js148
-rwxr-xr-xjs/lib/rdge/materials/flat-material.js2
-rw-r--r--js/lib/rdge/materials/fly-material.js5
-rw-r--r--js/lib/rdge/materials/julia-material.js5
-rw-r--r--js/lib/rdge/materials/keleidoscope-material.js5
-rw-r--r--js/lib/rdge/materials/mandel-material.js5
-rwxr-xr-xjs/lib/rdge/materials/material.js78
-rw-r--r--js/lib/rdge/materials/pulse-material.js55
-rw-r--r--js/lib/rdge/materials/relief-tunnel-material.js7
-rw-r--r--js/lib/rdge/materials/square-tunnel-material.js5
-rw-r--r--js/lib/rdge/materials/star-material.js5
-rw-r--r--js/lib/rdge/materials/taper-material.js13
-rw-r--r--js/lib/rdge/materials/tunnel-material.js5
-rw-r--r--js/lib/rdge/materials/twist-material.js5
-rw-r--r--js/lib/rdge/materials/twist-vert-material.js60
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js118
-rw-r--r--js/lib/rdge/materials/water-material.js4
-rw-r--r--js/lib/rdge/materials/z-invert-material.js5
-rw-r--r--js/lib/rdge/texture.js329
-rwxr-xr-xjs/models/materials-model.js14
39 files changed, 1831 insertions, 350 deletions
diff --git a/assets/images/CL13.png b/assets/images/CL13.png
new file mode 100644
index 00000000..236eb3f8
--- /dev/null
+++ b/assets/images/CL13.png
Binary files differ
diff --git a/assets/images/cloud10.png b/assets/images/cloud10.png
new file mode 100644
index 00000000..2d87a4de
--- /dev/null
+++ b/assets/images/cloud10.png
Binary files differ
diff --git a/assets/images/us_flag.png b/assets/images/us_flag.png
new file mode 100644
index 00000000..1545edc2
--- /dev/null
+++ b/assets/images/us_flag.png
Binary files differ
diff --git a/assets/shaders/Basic.vert.glsl b/assets/shaders/Basic.vert.glsl
index 0d5b8d63..f96f8322 100755
--- a/assets/shaders/Basic.vert.glsl
+++ b/assets/shaders/Basic.vert.glsl
@@ -14,6 +14,8 @@ precision highp float;
14attribute vec3 a_pos; 14attribute vec3 a_pos;
15attribute vec2 texcoord; 15attribute vec2 texcoord;
16 16
17// varying
18varying vec2 v_texCoord0;
17 19
18// matrix uniforms 20// matrix uniforms
19uniform mat4 u_mvMatrix; 21uniform mat4 u_mvMatrix;
@@ -22,5 +24,6 @@ uniform mat4 u_worldMatrix;
22 24
23void main(void) 25void main(void)
24{ 26{
27 v_texCoord0 = texcoord;
25 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0) ; 28 gl_Position = u_projMatrix * u_mvMatrix * vec4(a_pos,1.0) ;
26} \ No newline at end of file 29} \ No newline at end of file
diff --git a/assets/shaders/BasicTex.frag.glsl b/assets/shaders/BasicTex.frag.glsl
new file mode 100644
index 00000000..a716e77d
--- /dev/null
+++ b/assets/shaders/BasicTex.frag.glsl
@@ -0,0 +1,19 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7
8#ifdef GL_ES
9precision highp float;
10#endif
11
12uniform sampler2D u_tex0;
13
14varying vec2 v_texCoord0;
15
16
17void main() {
18 gl_FragColor = texture2D(u_tex0, v_texCoord0);
19}
diff --git a/assets/shaders/Cloud.frag.glsl b/assets/shaders/Cloud.frag.glsl
new file mode 100644
index 00000000..2447fd79
--- /dev/null
+++ b/assets/shaders/Cloud.frag.glsl
@@ -0,0 +1,25 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7
8#ifdef GL_ES
9precision highp float;
10#endif
11
12uniform sampler2D u_tex0;
13uniform float u_surfaceAlpha;
14
15varying vec2 v_texCoord0;
16
17
18void main()
19{
20 vec4 c = texture2D(u_tex0, v_texCoord0);
21 //c.a *= u_surfaceAlpha;
22 //if ((c.r == 0.0) && (c.b == 0.0) && (c.g == 0.0) && (c.a == 1.0)) c = vec4( 0.0, 0.0, 1.0, 1.0 );
23 gl_FragColor = c;
24}
25 \ No newline at end of file
diff --git a/assets/shaders/Cloud.vert.glsl b/assets/shaders/Cloud.vert.glsl
new file mode 100644
index 00000000..acd581fc
--- /dev/null
+++ b/assets/shaders/Cloud.vert.glsl
@@ -0,0 +1,51 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7
8#ifdef GL_ES
9precision highp float;
10#endif
11
12// attributes
13attribute vec3 a_pos;
14attribute vec2 texcoord;
15
16// uniforms
17uniform float u_time;
18uniform float u_zmin;
19uniform float u_zmax;
20uniform float u_surfaceAlpha;
21
22// matrix uniforms
23uniform mat4 u_mvMatrix;
24uniform mat4 u_projMatrix;
25
26// varying
27varying vec2 v_texCoord0;
28
29// constants
30const float zSpeed = 10.0;
31
32
33void main()
34{
35 // Transform position
36 vec4 pos = vec4(a_pos,1);
37
38 float dz = u_time*zSpeed;
39 float n = floor( dz/(u_zmax-u_zmin) );
40 dz -= n*(u_zmax - u_zmin);
41 float z = pos.z + dz;
42 if (z > u_zmax)
43 {
44 z = u_zmin + (z - u_zmax);
45 }
46 pos.z = z;
47
48 gl_Position = u_projMatrix * u_mvMatrix * pos;
49
50 v_texCoord0 = texcoord;
51} \ No newline at end of file
diff --git a/assets/shaders/Flag.frag.glsl b/assets/shaders/Flag.frag.glsl
new file mode 100644
index 00000000..b05b4888
--- /dev/null
+++ b/assets/shaders/Flag.frag.glsl
@@ -0,0 +1,20 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7
8#ifdef GL_ES
9precision highp float;
10#endif
11
12uniform sampler2D u_tex0;
13
14varying vec2 v_uv;
15
16void main(void)
17{
18 vec3 col = texture2D(u_tex0, v_uv).xyz;
19 gl_FragColor = vec4(col,1.0);
20} \ No newline at end of file
diff --git a/assets/shaders/Flag.vert.glsl b/assets/shaders/Flag.vert.glsl
index 7dc932a7..a5e8b2f7 100644
--- a/assets/shaders/Flag.vert.glsl
+++ b/assets/shaders/Flag.vert.glsl
@@ -16,20 +16,32 @@ attribute vec2 texcoord;
16 16
17// scalar uniforms 17// scalar uniforms
18uniform float u_time; 18uniform float u_time;
19uniform float u_waveWidth;
20uniform float u_waveHeight;
19 21
20// matrix uniforms 22// matrix uniforms
21uniform mat4 u_mvMatrix; 23uniform mat4 u_mvMatrix;
22uniform mat4 u_projMatrix; 24uniform mat4 u_projMatrix;
23uniform mat4 u_worldMatrix; 25uniform mat4 u_worldMatrix;
24 26
27// varying variables
28varying vec2 v_uv;
29
30
25void main() 31void main()
26{ 32{
27 float angle = (u_time%360)*2; 33 float pi = 3.14159;
34 float angle = u_time;
35
36 v_uv = texcoord;
28