aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-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
-rw-r--r--js/io/system/ninjalibrary.json2
-rwxr-xr-xjs/lib/drawing/world.js361
-rwxr-xr-xjs/lib/geom/circle.js90
-rwxr-xr-xjs/lib/geom/geom-obj.js29
-rwxr-xr-xjs/lib/geom/line.js1
-rwxr-xr-xjs/lib/geom/rectangle.js105
-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.js170
-rw-r--r--js/lib/rdge/materials/cloud-material.js439
-rw-r--r--js/lib/rdge/materials/deform-material.js36
-rw-r--r--js/lib/rdge/materials/flag-material.js136
-rwxr-xr-xjs/lib/rdge/materials/flat-material.js99
-rw-r--r--js/lib/rdge/materials/fly-material.js38
-rw-r--r--js/lib/rdge/materials/julia-material.js49
-rw-r--r--js/lib/rdge/materials/keleidoscope-material.js52
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js250
-rw-r--r--js/lib/rdge/materials/mandel-material.js46
-rwxr-xr-xjs/lib/rdge/materials/material.js306
-rw-r--r--js/lib/rdge/materials/plasma-material.js61
-rw-r--r--js/lib/rdge/materials/pulse-material.js185
-rw-r--r--js/lib/rdge/materials/radial-blur-material.js124
-rwxr-xr-xjs/lib/rdge/materials/radial-gradient-material.js277
-rw-r--r--js/lib/rdge/materials/relief-tunnel-material.js49
-rw-r--r--js/lib/rdge/materials/square-tunnel-material.js45
-rw-r--r--js/lib/rdge/materials/star-material.js53
-rw-r--r--js/lib/rdge/materials/taper-material.js131
-rw-r--r--js/lib/rdge/materials/tunnel-material.js45
-rw-r--r--js/lib/rdge/materials/twist-material.js58
-rw-r--r--js/lib/rdge/materials/twist-vert-material.js325
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js129
-rw-r--r--js/lib/rdge/materials/water-material.js313
-rw-r--r--js/lib/rdge/materials/z-invert-material.js50
-rw-r--r--js/lib/rdge/texture.js332
-rwxr-xr-xjs/mediators/element-mediator.js1
-rwxr-xr-xjs/models/materials-model.js151
-rw-r--r--js/panels/Materials/materials-data.json99
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.html13
-rwxr-xr-xjs/panels/Materials/materials-library-panel.reel/materials-library-panel.js13
-rwxr-xr-xjs/panels/Materials/materials-popup.reel/materials-popup.js181
-rwxr-xr-xjs/tools/LineTool.js2
-rwxr-xr-xjs/tools/TagTool.js1
45 files changed, 2751 insertions, 2241 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 9fc9b576..e62af921 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -166,10 +166,10 @@ exports.ShapesController = Montage.create(CanvasController, {
166 } 166 }
167 break; 167 break;
168 case "editStrokeMaterial": 168 case "editStrokeMaterial":
169 NJevent("showMaterialPopup",{materialId : this.getProperty(el, "strokeMaterial")}); 169 NJevent("showMaterialPopup",{materialId : this.getProperty(el, "strokeMaterial"), useSelection: true, whichMaterial: 'stroke'});
170 break; 170 break;
171 case "editFillMaterial": 171 case "editFillMaterial":
172 NJevent("showMaterialPopup",{materialId : this.getProperty(el, "fillMaterial")}); 172 NJevent("showMaterialPopup",{materialId : this.getProperty(el, "fillMaterial"), useSelection: true, whichMaterial: 'fill'});
173 break; 173 break;
174 case "animate": 174 case "animate":
175 if(value) 175 if(value)
diff --git a/js/helper-classes/RDGE/src/tools/compile-rdge-core.bat b/js/helper-classes/RDGE/src/tools/compile-rdge-core.bat
deleted file mode 100644
index 50a9a460..00000000
--- a/js/helper-classes/RDGE/src/tools/compile-rdge-core.bat
+++ /dev/null
@@ -1 +0,0 @@
1java -jar ./compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --manage_closure_dependencies --js ../core/script/math/vec2.js --js ../core/script/math/vec3.js --js ../core/script/math/vec4.js --js ../core/script/math/mat4.js --js ../core/script/math/quat.js --js ../core/script/objectManager.js --js ../core/script/precompiled.js --js ../core/script/renderer.js --js ../core/script/renderUtils.js --js ../core/script/jshader.js --js ../core/script/jpass.js --js ../core/script/RenderProcs.js --js ../core/script/RenderInitProcs.js --js ../core/script/MeshManager.js --js ../core/script/ShaderManager.js --js ../core/script/ScreenQuad.js --js ../core/script/box.js --js ../core/script/camera.js --js ../core/script/shadowLight.js --js ../core/script/utilities.js --js ../core/script/engine.js --js ../core/script/scenegraphNodes.js --js ../core/script/scenegraph.js --js ../core/script/lightmanager.js --js ../core/script/rendercontext.js --js ../core/script/particle.js --js ../core/script/run_state.js --js ../core/script/init_state.js --js ../core/script/runtime.js --js_output_file ../../rdge-compiled.js
diff --git a/js/helper-classes/RDGE/src/tools/compile-rdge-core.sh b/js/helper-classes/RDGE/src/tools/compile-rdge-core.sh
deleted file mode 100644
index ed6d521a..00000000
--- a/js/helper-classes/RDGE/src/tools/compile-rdge-core.sh
+++ /dev/null
@@ -1 +0,0 @@
1java -jar ./compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --manage_closure_dependencies --js ../core/script/math/vec2.js --js ../core/script/math/vec3.js --js ../core/script/math/vec4.js --js ../core/script/math/mat4.js --js ../core/script/math/quat.js --js ../core/script/objectManager.js --js ../core/script/precompiled.js --js ../core/script/renderer.js --js ../core/script/renderUtils.js --js ../core/script/jshader.js --js ../core/script/jpass.js --js ../core/script/RenderProcs.js --js ../core/script/RenderInitProcs.js --js ../core/script/MeshManager.js --js ../core/script/ShaderManager.js --js ../core/script/ScreenQuad.js --js ../core/script/box.js --js ../core/script/camera.js --js ../core/script/shadowLight.js --js ../core/script/utilities.js --js ../core/script/engine.js --js ../core/script/scenegraphNodes.js --js ../core/script/scenegraph.js --js ../core/script/lightmanager.js --js ../core/script/rendercontext.js --js ../core/script/particle.js --js ../core/script/run_state.js --js ../core/script/init_state.js --js ../core/script/runtime.js --js_output_file rdge-compiled.js
diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json
index fb108937..de11034b 100644
--- a/js/io/system/ninjalibrary.json
+++ b/js/io/system/ninjalibrary.json
@@ -1,6 +1,6 @@
1{ 1{
2 "libraries": [ 2 "libraries": [
3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.10.1.0"}, 3 {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.10.1.0"},
4 {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.6.0.0"} 4 {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.6.0.2"}
5 ] 5 ]
6} \ No newline at end of file 6} \ No newline at end of file
diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js
index 0dde9af4..8068284e 100755
--- a/js/lib/drawing/world.js
+++ b/js/lib/drawing/world.js
@@ -29,13 +29,19 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) {
29 } 29 }
30 30
31 this._canvas = canvas; 31 this._canvas = canvas;
32 if (this._useWebGL) { 32 if (this._useWebGL)
33 if(preserveDrawingBuffer) { 33 {
34 if(preserveDrawingBuffer)
35 {
34 this._glContext = canvas.getContext("experimental-webgl", {preserveDrawingBuffer: true}); 36 this._glContext = canvas.getContext("experimental-webgl", {preserveDrawingBuffer: true});
35 } else { 37 }
38 else
39 {
36 this._glContext = canvas.getContext("experimental-webgl"); 40 this._glContext = canvas.getContext("experimental-webgl");
37 } 41 }
38 } else { 42 }
43 else
44 {
39 this._2DContext = canvas.getContext( "2d" ); 45 this._2DContext = canvas.getContext( "2d" );
40 } 46 }
41 47
@@ -77,6 +83,9 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) {
77 // keep a counter for generating node names 83 // keep a counter for generating node names
78 this._nodeCounter = 0; 84 this._nodeCounter = 0;
79 85
86 // for sending notifications to listeners
87 this._notifier = new Notifier();
88
80 /////////////////////////////////////////////////////////////////////// 89 ///////////////////////////////////////////////////////////////////////
81 // Property accessors 90 // Property accessors
82 /////////////////////////////////////////////////////////////////////// 91 ///////////////////////////////////////////////////////////////////////
@@ -119,6 +128,7 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) {
119 128
120 // Flag to play/pause animation at authortime 129 // Flag to play/pause animation at authortime
121 this._previewAnimation = true; 130 this._previewAnimation = true;
131
122 //////////////////////////////////////////////////////////////////////////////////// 132 ////////////////////////////////////////////////////////////////////////////////////
123 // RDGE 133 // RDGE
124 // local variables 134 // local variables
@@ -143,7 +153,8 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) {
143 this.setCameraMat( camMat ); 153 this.setCameraMat( camMat );
144 154
145 // post-load processing of the scene 155 // post-load processing of the scene
146 this.init = function() { 156 this.init = function()
157 {
147 var ctx1 = RDGE.globals.engine.ctxMan.handleToObject(this._canvas.rdgeCtxHandle), 158 var ctx1 = RDGE.globals.engine.ctxMan.handleToObject(this._canvas.rdgeCtxHandle),
148 ctx2 = RDGE.globals.engine.getContext(); 159 ctx2 = RDGE.globals.engine.getContext();
149 if (ctx1 != ctx2) console.log( "***** different contexts *****" ); 160 if (ctx1 != ctx2) console.log( "***** different contexts *****" );
@@ -169,14 +180,14 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) {
169 180
170 // create some lights 181 // create some lights
171 // light 1 182 // light 1
172 this.light = RDGE.createLightNode("myLight"); 183// this.light = RDGE.createLightNode("myLight");
173 this.light.setPosition([0,0,1.2]); 184// this.light.setPosition([0,0,1.2]);
174 this.light.setDiffuseColor([0.75,0.9,1.0,1.0]); 185// this.light.setDiffuseColor([0.75,0.9,1.0,1.0]);
175 186
176 // light 2 187 // light 2
177 this.light2 = RDGE.createLightNode("myLight2"); 188// this.light2 = RDGE.createLightNode("myLight2");
178 this.light2.setPosition([-0.5,0,1.2]); 189// this.light2.setPosition([-0.5,0,1.2]);
179 this.light2.setDiffuseColor([1.0,0.9,0.75,1.0]); 190// this.light2.setDiffuseColor([1.0,0.9,0.75,1.0]);
180 191
181 // create a light transform 192 // create a light transform
182 var lightTr = RDGE.createTransformNode("lightTr"); 193 var lightTr = RDGE.createTransformNode("lightTr");
@@ -185,8 +196,8 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) {
185 lightTr.attachMaterial(RDGE.createMaterialNode("lights")); 196 lightTr.attachMaterial(RDGE.createMaterialNode("lights"));
186 197
187 // enable light channels 1, 2 - channel 0 is used by the default shader 198 // enable light channels 1, 2 - channel 0 is used by the default shader
188 lightTr.materialNode.enableLightChannel(1, this.light); 199// lightTr.materialNode.enableLightChannel(1, this.light);
189 lightTr.materialNode.enableLightChannel(2, this.light2); 200// lightTr.materialNode.enableLightChannel(2, this.light2);
190 201
191 // all added objects are parented to the light node 202 // all added objects are parented to the light node
192 this._rootNode = lightTr; 203 this._rootNode = lightTr;
@@ -201,19 +212,21 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) {
201 }; 212 };
202 213
2