aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/src
diff options
context:
space:
mode:
authorJohn Mayhew2012-04-02 14:57:31 -0700
committerJohn Mayhew2012-04-02 14:57:31 -0700
commitfb0a659c9ca3479fd6799325498b11f074689936 (patch)
tree46342298281aa93e48756e040715f42770ccc526 /js/helper-classes/RDGE/src
parentc24f58c10231c30d3a8a4c9fb9a4f395dd746180 (diff)
downloadninja-fb0a659c9ca3479fd6799325498b11f074689936.tar.gz
-Namespaced all RDGE javascript.
-Removed the following unused files from the build script /core/script/fx/blur.js /core/script/fx/ssao.js /core/script/animation.js - Fully removed the following from the build and from source control as they are unused or no longer needed /core/script/util/dbgpanel.js /core/script/util/fpsTracker.js /core/script/util/statTracker.js /core/script/input.js /core/script/TextureManager.js /core/script/ubershader.js
Diffstat (limited to 'js/helper-classes/RDGE/src')
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/MeshManager.js255
-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.js513
-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.js553
-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.js260
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/lightmanager.js148
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/mat4.js1055
-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.js454
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderer.js2299
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/run_state.js711
-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.js1016
-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.js282
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.bat2
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.sh2
41 files changed, 8077 insertions, 9842 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/MeshManager.js b/js/helper-classes/RDGE/src/core/script/MeshManager.js
index 43813078..2c31781e 100755
--- a/js/helper-classes/RDGE/src/core/script/MeshManager.js
+++ b/js/helper-classes/RDGE/src/core/script/MeshManager.js
@@ -4,86 +4,80 @@ 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
7function Model(name, mesh) 7// RDGE namespaces
8{ 8var RDGE = RDGE || {};
9
10RDGE.Model = function (name, mesh) {
9 this.name = name; 11 this.name = name;
10 this.mesh = mesh; 12 this.mesh = mesh;
11 this.camera = null; 13 this.camera = null;
12} 14};
13 15
14/* 16/*
15 * Maintains a list of meshes to allow instancing of data 17* Maintains a list of meshes to allow instancing of data
16 */ 18*/
17function MeshManager() { 19RDGE.MeshManager = function () {
18 this.contentUrl = "assets_web/mesh/"; 20 this.contentUrl = "assets_web/mesh/";
19 this.modelMap = {}; 21 this.modelMap = {};
20 this.readyList = []; // meshes that have data ready 22 this.readyList = []; // meshes that have data ready
21 this.meshesLoading = true; // indicates that no meshes have loaded or that they are still loading 23 this.meshesLoading = true; // indicates that no meshes have loaded or that they are still loading
22 this.postMeshLoadCallbackList = []; 24 this.postMeshLoadCallbackList = [];
23 this.tempSphere = null; 25 this.tempSphere = null;
24 this.requestCounter = 0; 26 this.requestCounter = 0;
25} 27};
26 28
27/* 29/*
28 * Pass the scene meshNode stump, loads temp object while real mesh is downloading 30* Pass the scene meshNode stump, loads temp object while real mesh is downloading
29 */ 31*/
30MeshManager.prototype.loadMesh = function (meshStump, tempMesh) 32RDGE.MeshManager.prototype.loadMesh = function (meshStump, tempMesh) {
31{
32 // if it exists already, return the mesh requested 33 // if it exists already, return the mesh requested
33 if ( this.modelMap[meshStump.name] !== undefined ) 34 if (this.modelMap[meshStump.name] !== undefined)
34 return this.modelMap[meshStump.name]; 35 return this.modelMap[meshStump.name];
35 36
36 meshStump.ready = false; 37 meshStump.ready = false;
37 meshStump.addr = this.contentUrl + meshStump.name + "_mesh.json"; 38 meshStump.addr = this.contentUrl + meshStump.name + "_mesh.json";
38 meshStump.ctxID = g_Engine.getContext().renderer.id; 39 meshStump.ctxID = RDGE.globals.engine.getContext().renderer.id;
39 40
40 // sets a temp mesh up in place of the final mesh to load 41 // sets a temp mesh up in place of the final mesh to load
41 if (!tempMesh) 42 if (!tempMesh) {
42 { 43 if (this.tempSphere == null) {
43 if (this.tempSphere == null) 44 this.tempSphere = RDGE.renderUtils.makeSphere(RDGE.globals.engine.getContext().renderer.ctx, 25, 5, 5);
44 {
45 this.tempSphere = makeSphere(g_Engine.getContext().renderer.ctx, 25, 5, 5);
46 } 45 }
47 46
48 tempMesh = this.tempSphere; 47 tempMesh = this.tempSphere;
49 } 48 }
50 49
51 // add the temp mesh to the map of loaded meshes 50 // add the temp mesh to the map of loaded meshes
52 this.modelMap[meshStump.name] = tempMesh; 51 this.modelMap[meshStump.name] = tempMesh;
53 52
54 // update the request counter - we now have one more mesh to load 53 // update the request counter - we now have one more mesh to load
55 this.requestCounter++; 54 this.requestCounter++;
56 55
57 requestMesh(meshStump); 56 RDGE.requestMesh(meshStump);
58 57
59 return null; 58 return null;
60}; 59};
61 60
62/* 61/*
63 * Deletes the passed mesh from the manager as well as all renderers 62* Deletes the passed mesh from the manager as well as all renderers
64 */ 63*/
65MeshManager.prototype.deleteMesh = function (name) 64RDGE.MeshManager.prototype.deleteMesh = function (name) {
66{ 65 var model = this.modelMap[name];
67 var model = this.modelMap[name]; 66
68 67 if (model) {
69 if (model) 68 RDGE.globals.engine.ctxMan.forEach(function (context) {
70 { 69 context.renderer.deletePrimitive(model.primitive);
71 g_Engine.ctxMan.forEach(function(context) 70 });
72 { 71
73 context.renderer.deletePrimitive(model.primitive); 72 delete this.modelMap[name];
74 }); 73 }
75
76 delete this.modelMap[name];
77 }
78}; 74};
79 75
80MeshManager.prototype.getModelByName = function (name) 76RDGE.MeshManager.prototype.getModelByName = function (name) {
81{
82 return this.modelMap[name]; 77 return this.modelMap[name];
83}; 78};
84 79
85MeshManager.prototype.getModelNames = function () 80RDGE.MeshManager.prototype.getModelNames = function () {
86{
87 var names = []; 81 var names = [];
88 for (var index in this.modelMap) { 82 for (var index in this.modelMap) {
89 names.push(this.modelList[index].name); 83 names.push(this.modelList[index].name);
@@ -93,134 +87,121 @@ MeshManager.prototype.getModelNames = function ()
93}; 87};
94 88
95 89
96MeshManager.prototype.processMeshData = function () { 90RDGE.MeshManager.prototype.processMeshData = function () {
97 var renderer = g