aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/canvas-runtime.js3381
-rw-r--r--assets/descriptor.json2
-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.glsl23
-rw-r--r--assets/shaders/Cloud.vert.glsl51
-rw-r--r--assets/shaders/Flag.frag.glsl20
-rw-r--r--assets/shaders/Flag.vert.glsl32
-rw-r--r--assets/shaders/Pulse.frag.glsl12
-rw-r--r--assets/shaders/TwistVert.frag.glsl1
-rw-r--r--assets/shaders/TwistVert.vert.glsl11
-rw-r--r--assets/shaders/Water2.frag.glsl30
-rw-r--r--assets/shaders/plasma.frag.glsl16
-rwxr-xr-xassets/shaders/test_fshader.glsl2
-rwxr-xr-xjs/controllers/elements/shapes-controller.js4
-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.js311
-rwxr-xr-xjs/lib/geom/circle.js44
-rwxr-xr-xjs/lib/geom/geom-obj.js12
-rwxr-xr-xjs/lib/geom/rectangle.js82
-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.js79
-rw-r--r--js/lib/rdge/materials/cloud-material.js422
-rw-r--r--js/lib/rdge/materials/deform-material.js18
-rw-r--r--js/lib/rdge/materials/flag-material.js249
-rwxr-xr-xjs/lib/rdge/materials/flat-material.js2
-rw-r--r--js/lib/rdge/materials/fly-material.js26
-rw-r--r--js/lib/rdge/materials/julia-material.js23
-rw-r--r--js/lib/rdge/materials/keleidoscope-material.js23
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js4
-rw-r--r--js/lib/rdge/materials/mandel-material.js24
-rwxr-xr-xjs/lib/rdge/materials/material.js78
-rw-r--r--js/lib/rdge/materials/plasma-material.js98
-rw-r--r--js/lib/rdge/materials/pulse-material.js192
-rw-r--r--js/lib/rdge/materials/radial-blur-material.js10
-rwxr-xr-xjs/lib/rdge/materials/radial-gradient-material.js5
-rw-r--r--js/lib/rdge/materials/relief-tunnel-material.js20
-rw-r--r--js/lib/rdge/materials/square-tunnel-material.js18
-rw-r--r--js/lib/rdge/materials/star-material.js18
-rw-r--r--js/lib/rdge/materials/taper-material.js13
-rw-r--r--js/lib/rdge/materials/tunnel-material.js18
-rw-r--r--js/lib/rdge/materials/twist-material.js18
-rw-r--r--js/lib/rdge/materials/twist-vert-material.js448
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js119
-rw-r--r--js/lib/rdge/materials/water-material.js182
-rw-r--r--js/lib/rdge/materials/z-invert-material.js18
-rw-r--r--js/lib/rdge/texture.js335
-rwxr-xr-xjs/mediators/element-mediator.js26
-rwxr-xr-xjs/models/materials-model.js68
-rw-r--r--js/panels/Materials/materials-data.json84
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.js13
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js108
-rwxr-xr-xjs/tools/LineTool.js2
-rwxr-xr-xjs/tools/TagTool.js2
59 files changed, 4574 insertions, 2386 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index af860b95..ef1d01a9 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -56,60 +56,60 @@ NinjaCvsRt.initWebGl = function (rootElement, directory, data) {
56/////////////////////////////////////////////////////////////////////// 56///////////////////////////////////////////////////////////////////////
57NinjaCvsRt.CanvasDataManager = Object.create(Object.prototype, { 57NinjaCvsRt.CanvasDataManager = Object.create(Object.prototype, {
58 58
59 loadGLData: { 59 loadGLData: {
60 value: function(root, valueArray, assetPath) { 60 value: function(root, valueArray, assetPath) {
61 if (assetPath) 61 if (assetPath)
62 this._assetPath = assetPath.slice(); 62 this._assetPath = assetPath.slice();
63 63
64 var value = valueArray; 64 var value = valueArray;
65 var nWorlds = value.length; 65 var nWorlds = value.length;
66 for (var i=0; i<nWorlds; i++) 66 for (var i=0; i<nWorlds; i++)
67 { 67 {
68 var importStr = value[i]; 68 var importStr = value[i];
69 69
70 // there should be some version information in 70 // there should be some version information in
71 // the form of 'v0.0;' Pull that off. (the trailing ';' should 71 // the form of 'v0.0;' Pull that off. (the trailing ';' should
72 // be in the first 24 characters). 72 // be in the first 24 characters).
73 var index = importStr.indexOf( ';' ); 73 var index = importStr.indexOf( ';' );
74 if ((importStr[0] === 'v') && (index < 24)) 74 if ((importStr[0] === 'v') && (index < 24))
75 { 75 {
76 // JSON format. pull off the version info 76 // JSON format. pull off the version info
77 importStr = importStr.substr( index+1 ); 77 importStr = importStr.substr( index+1 );
78 78
79 var jObj = JSON.parse( importStr ); 79 var jObj = JSON.parse( importStr );
80 var id = jObj.id; 80 var id = jObj.id;
81 if (id) 81 if (id)
82 { 82 {
83 var canvas = this.findCanvasWithID( id, root ); 83 var canvas = this.findCanvasWithID( id, root );
84 if (canvas) 84 if (canvas)
85 { 85 {
86// new NinjaCvsRt.GLRuntime( canvas, jObj, assetPath ); 86// new NinjaCvsRt.GLRuntime( canvas, jObj, assetPath );
87 var glRt = Object.create(NinjaCvsRt.GLRuntime, {}); 87 var glRt = Object.create(NinjaCvsRt.GLRuntime, {});
88 glRt.renderWorld(canvas, jObj, this._assetPath); 88 glRt.renderWorld(canvas, jObj, this._assetPath);
89 } 89 }
90 } 90 }
91 } 91 }
92 } 92 }
93 } 93 }
94 }, 94 },
95 95
96 findCanvasWithID: { 96 findCanvasWithID: {
97 value: function(id, elt) { 97 value: function(id, elt) {
98 var cid = elt.getAttribute( "data-RDGE-id" ); 98 var cid = elt.getAttribute( "data-RDGE-id" );
99 if (cid == id) return elt; 99 if (cid == id) return elt;
100 100
101 if (elt.children) 101 if (elt.children)
102 { 102 {
103 var nKids = elt.children.length; 103 var nKids = elt.children.length;
104 for (var i=0; i<nKids; i++) 104 for (var i=0; i<nKids; i++)
105 { 105 {
106 var child = elt.children[i]; 106 var child = elt.children[i];
107 var foundElt = this.findCanvasWithID( id, child ); 107 var foundElt = this.findCanvasWithID( id, child );
108 if (foundElt) return foundElt; 108 if (foundElt) return foundElt;
109 } 109 }
110 } 110 }
111 } 111 }
112 } 112 }
113}); 113});
114 114
115/////////////////////////////////////////////////////////////////////// 115///////////////////////////////////////////////////////////////////////
@@ -117,394 +117,394 @@ NinjaCvsRt.CanvasDataManager = Object.create(Object.prototype, {
117// Manages runtime fora WebGL canvas 117// Manages runtime fora WebGL canvas
118/////////////////////////////////////////////////////////////////////// 118///////////////////////////////////////////////////////////////////////
119NinjaCvsRt.GLRuntime = Object.create(Object.prototype, { 119NinjaCvsRt.GLRuntime = Object.create(Object.prototype, {
120 /////////////////////////////////////////////////////////////////////// 120 ///////////////////////////////////////////////////////////////////////
121 // Instance variables 121 // Instance variables
122 /////////////////////////////////////////////////////////////////////// 122 ///////////////////////////////////////////////////////////////////////
123 _canvas: { value: null, writable: true }, 123 _canvas: { value: null, writable: true },
124 _context : { value: null, writable: true }, 124 _context : { value: null, writable: true },
125 //this._importStr = importStr; 125 //this._importStr = importStr;
126 _jObj: { value: null, writable: true }, 126 _jObj: { value: null, writable: true },
127 127
128 _renderer: { value: null, writable: true }, 128 _renderer: { value: null, writable: true },
129 myScene: { value: null, writable: true }, 129 myScene: { value: null, writable: true },
130 light: { value: null, writable: true }, 130 light: { value: null, writable: true },
131 light2: { value: null, writable: true }, 131 light2: { value: null, writable: true },
132 _rootNode: { value: null, writable: true }, 132 _rootNode: { value: null, writable: true },