aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-04-04 15:54:33 -0700
committerJose Antonio Marquez2012-04-04 15:54:33 -0700
commita9bcc403df76ad2cb7c31ff7fdd42a85c35cf424 (patch)
tree9415f5ba25ad643df678e561719d2708fd3ead5a
parent0a469a14757b8cea262c21f652e75c85c9903f4b (diff)
parente721a7c1009f298a1bd8fea583da14535e039880 (diff)
downloadninja-a9bcc403df76ad2cb7c31ff7fdd42a85c35cf424.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into FileIO
-rw-r--r--.gitignore3
-rw-r--r--assets/canvas-runtime.js445
-rwxr-xr-xassets/rdge-compiled.js777
-rwxr-xr-xindex.html37
-rwxr-xr-xjs/document/html-document.js16
-rwxr-xr-xjs/helper-classes/RDGE/precompiled.js17
-rwxr-xr-xjs/helper-classes/RDGE/rdge-compiled.js777
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/MeshManager.js131
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/RenderInitProcs.js476
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/RenderProcs.js787
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/ScreenQuad.js32
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/ShaderManager.js124
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/TextureManager.js6
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/animation.js191
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/box.js181
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/camera.js468
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/engine.js417
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/fx/blur.js283
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/fx/ssao.js211
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/init_state.js249
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/input.js117
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/jpass.js771
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/jshader.js272
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/lightmanager.js148
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/mat4.js1085
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/quat.js237
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec2.js229
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec3.js423
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec4.js315
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/objectManager.js8
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/particle.js1591
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/precompiled.js123
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderUtils.js644
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/rendercontext.js451
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderer.js2310
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/run_state.js275
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/runtime.js280
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/scenegraph.js1754
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/scenegraphNodes.js463
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/shadowLight.js90
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/sockets.js243
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/ubershader.js159
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/util/dbgpanel.js237
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/util/fpsTracker.js51
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/util/statTracker.js338
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/utilities.js110
-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.js290
-rwxr-xr-xjs/lib/geom/brush-stroke.js12
-rwxr-xr-xjs/lib/geom/circle.js102
-rwxr-xr-xjs/lib/geom/geom-obj.js442
-rwxr-xr-xjs/lib/geom/line.js74
-rwxr-xr-xjs/lib/geom/rectangle.js118
-rw-r--r--js/lib/geom/shape-primitive.js4
-rwxr-xr-xjs/lib/rdge/materials/bump-metal-material.js64
-rw-r--r--js/lib/rdge/materials/cloud-material.js377
-rw-r--r--js/lib/rdge/materials/deform-material.js88
-rwxr-xr-xjs/lib/rdge/materials/flat-material.js141
-rw-r--r--js/lib/rdge/materials/fly-material.js9
-rw-r--r--js/lib/rdge/materials/julia-material.js8
-rw-r--r--js/lib/rdge/materials/keleidoscope-material.js8
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js426
-rw-r--r--js/lib/rdge/materials/mandel-material.js8
-rwxr-xr-xjs/lib/rdge/materials/material-parser.js81
-rwxr-xr-xjs/lib/rdge/materials/material.js15
-rw-r--r--js/lib/rdge/materials/plasma-material.js12
-rw-r--r--js/lib/rdge/materials/pulse-material.js68
-rw-r--r--js/lib/rdge/materials/radial-blur-material.js414
-rwxr-xr-xjs/lib/rdge/materials/radial-gradient-material.js438
-rw-r--r--js/lib/rdge/materials/relief-tunnel-material.js132
-rw-r--r--js/lib/rdge/materials/square-tunnel-material.js133
-rw-r--r--js/lib/rdge/materials/star-material.js133
-rw-r--r--js/lib/rdge/materials/taper-material.js401
-rw-r--r--js/lib/rdge/materials/tunnel-material.js79
-rw-r--r--js/lib/rdge/materials/twist-material.js161
-rw-r--r--js/lib/rdge/materials/twist-vert-material.js448
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js1560
-rw-r--r--js/lib/rdge/materials/water-material.js275
-rw-r--r--js/lib/rdge/materials/z-invert-material.js132
-rw-r--r--js/mediators/io-mediator.js1096
82 files changed, 11387 insertions, 14718 deletions
diff --git a/.gitignore b/.gitignore
index 40248468..6192b556 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,4 +20,5 @@ cloud/
20/.idea/scopes/scope_settings.xml 20/.idea/scopes/scope_settings.xml
21compass_app_log.txt 21compass_app_log.txt
22js/io/ui/cloudpopup.reel/.sass-cache/5fd824121af95f6044b06681535cf0639ffb5db3/cloudpopup.scssc 22js/io/ui/cloudpopup.reel/.sass-cache/5fd824121af95f6044b06681535cf0639ffb5db3/cloudpopup.scssc
23scss/.sass-cache/ \ No newline at end of file 23scss/.sass-cache/
24js/helper-classes/RDGE/src/tools/compiler.jar
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index f53a4ef6..a35f473d 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -4,11 +4,12 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */ 5</copyright> */
6 6
7 7// namespace for the Ninja Canvas Runtime
8var NinjaCvsRt = NinjaCvsRt || {};
8 9
9/////////////////////////////////////////////////////////////////////// 10///////////////////////////////////////////////////////////////////////
10//Loading webGL/canvas data 11//Loading webGL/canvas data
11function initWebGl (rootElement, directory) { 12NinjaCvsRt.initWebGl = function (rootElement, directory) {
12 var cvsDataMngr, ninjaWebGlData = JSON.parse((document.querySelectorAll(['script[data-ninja-webgl]'])[0].innerHTML.replace('(', '')).replace(')', '')); 13 var cvsDataMngr, ninjaWebGlData = JSON.parse((document.querySelectorAll(['script[data-ninja-webgl]'])[0].innerHTML.replace('(', '')).replace(')', ''));
13 if (ninjaWebGlData && ninjaWebGlData.data) { 14 if (ninjaWebGlData && ninjaWebGlData.data) {
14 for (var n=0; ninjaWebGlData.data[n]; n++) { 15 for (var n=0; ninjaWebGlData.data[n]; n++) {
@@ -16,16 +17,16 @@ function initWebGl (rootElement, directory) {
16 } 17 }
17 } 18 }
18 //Creating data manager 19 //Creating data manager
19 cvsDataMngr = new CanvasDataManager(); 20 cvsDataMngr = new NinjaCvsRt.CanvasDataManager();
20 //Loading data to canvas(es) 21 //Loading data to canvas(es)
21 cvsDataMngr.loadGLData(rootElement, ninjaWebGlData.data, directory); 22 cvsDataMngr.loadGLData(rootElement, ninjaWebGlData.data, directory);
22} 23};
23 24
24/////////////////////////////////////////////////////////////////////// 25///////////////////////////////////////////////////////////////////////
25// Class ShapeRuntime 26// Class ShapeRuntime
26// Manages runtime shape display 27// Manages runtime shape display
27/////////////////////////////////////////////////////////////////////// 28///////////////////////////////////////////////////////////////////////
28function CanvasDataManager() 29NinjaCvsRt.CanvasDataManager = function ()
29{ 30{
30 this.loadGLData = function(root, valueArray, assetPath ) 31 this.loadGLData = function(root, valueArray, assetPath )
31 { 32 {
@@ -54,31 +55,12 @@ function CanvasDataManager()
54 var canvas = this.findCanvasWithID( id, root ); 55 var canvas = this.findCanvasWithID( id, root );
55 if (canvas) 56 if (canvas)
56 { 57 {
57 new GLRuntime( canvas, jObj, assetPath ); 58 new NinjaCvsRt.GLRuntime( canvas, jObj, assetPath );
58 } 59 }
59 } 60 }
60 } 61 }
61 } 62 }
62 } 63 };
63
64 this.collectGLData = function( elt, dataArray )
65 {
66 if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld)
67 {
68 var data = elt.elementModel.shapeModel.GLWorld.export( true );
69 dataArray.push( data );
70 }
71
72 if (elt.children)
73 {
74 var nKids = elt.children.length;
75 for (var i=0; i<nKids; i++)
76 {
77 var child = elt.children[i];
78 this.collectGLData( child, dataArray );
79 }
80 }
81 }
82 64
83 this.findCanvasWithID = function( id, elt ) 65 this.findCanvasWithID = function( id, elt )
84 {