aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/src/core
diff options
context:
space:
mode:
authorhwc4872012-07-09 16:08:02 -0700
committerhwc4872012-07-09 16:08:02 -0700
commit5085d0f67df89a21715308956004164597a6ba79 (patch)
tree2c896163143a66331205a39b0a3b1b45d51bf12a /js/helper-classes/RDGE/src/core
parent51f1691f792dbda9b740ded8aa0457c9406db156 (diff)
parent84b3327bd92faafab7954b5eb64c7abe24a3fe13 (diff)
downloadninja-5085d0f67df89a21715308956004164597a6ba79.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into GridFixes
Conflicts: js/helper-classes/3D/StageLine.js
Diffstat (limited to 'js/helper-classes/RDGE/src/core')
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/MeshManager.js494
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/RenderInitProcs.js518
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/RenderProcs.js1022
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/ScreenQuad.js106
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/ShaderManager.js220
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/animation.js690
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/box.js324
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/camera.js550
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/engine.js922
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/fx/blur.js434
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/fx/ssao.js278
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/init_state.js570
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/jpass.js1346
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/jshader.js1528
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/lightmanager.js238
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/mat4.js1538
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/quat.js500
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec2.js432
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec3.js748
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec4.js566
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/objectManager.js196
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/particle.js1594
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/precompiled.js196
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderUtils.js792
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/rendercontext.js578
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderer.js3370
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/run_state.js730
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/runtime.js446
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/scenegraph.js2006
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/scenegraphNodes.js1140
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/shadowLight.js152
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/sockets.js362
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/utilities.js530
33 files changed, 12558 insertions, 12558 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/MeshManager.js b/js/helper-classes/RDGE/src/core/script/MeshManager.js
index 768b7213..eea94b74 100755
--- a/js/helper-classes/RDGE/src/core/script/MeshManager.js
+++ b/js/helper-classes/RDGE/src/core/script/MeshManager.js
@@ -1,247 +1,247 @@
1/* <copyright> 1/* <copyright>
2Copyright (c) 2012, Motorola Mobility, Inc 2Copyright (c) 2012, Motorola Mobility, Inc
3All Rights Reserved. 3All Rights Reserved.
4BSD License. 4BSD License.
5 5
6Redistribution and use in source and binary forms, with or without 6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met: 7modification, are permitted provided that the following conditions are met:
8 8
9 - Redistributions of source code must retain the above copyright notice, 9 - Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer. 10 this list of conditions and the following disclaimer.
11 - Redistributions in binary form must reproduce the above copyright 11 - Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the 12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution. 13 documentation and/or other materials provided with the distribution.
14 - Neither the name of Motorola Mobility nor the names of its contributors 14 - Neither the name of Motorola Mobility nor the names of its contributors
15 may be used to endorse or promote products derived from this software 15 may be used to endorse or promote products derived from this software
16 without specific prior written permission. 16 without specific prior written permission.
17 17
18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28POSSIBILITY OF SUCH DAMAGE. 28POSSIBILITY OF SUCH DAMAGE.
29</copyright> */ 29</copyright> */
30 30
31// RDGE namespaces 31// RDGE namespaces
32var RDGE = RDGE || {}; 32var RDGE = RDGE || {};
33 33
34RDGE.Model = function (name, mesh) { 34RDGE.Model = function (name, mesh) {
35 this.name = name; 35 this.name = name;
36 this.mesh = mesh; 36 this.mesh = mesh;
37 this.camera = null; 37 this.camera = null;
38}; 38};
39 39
40/* 40/*
41 * Maintains a list of meshes to allow instancing of data 41 * Maintains a list of meshes to allow instancing of data
42 */ 42 */
43RDGE.MeshManager = function () { 43RDGE.MeshManager = function () {
44 this.contentUrl = "assets_web/mesh/"; 44 this.contentUrl = "assets_web/mesh/";
45 this.modelMap = {}; 45 this.modelMap = {};
46 this.readyList = []; // meshes that have data ready 46 this.readyList = []; // meshes that have data ready
47 this.meshesLoading = true; // indicates that no meshes have loaded or that they are still loading 47 this.meshesLoading = true; // indicates that no meshes have loaded or that they are still loading
48 this.postMeshLoadCallbackList = []; 48 this.postMeshLoadCallbackList = [];
49 this.tempSphere = null; 49 this.tempSphere = null;
50 this.requestCounter = 0; 50 this.requestCounter = 0;
51}; 51};
52 52
53/* 53/*
54 * Pass the scene meshNode stump, loads temp object while real mesh is downloading 54 * Pass the scene meshNode stump, loads temp object while real mesh is downloading
55 */ 55 */
56RDGE.MeshManager.prototype.loadMesh = function (meshStump, tempMesh) { 56RDGE.MeshManager.prototype.loadMesh = function (meshStump, tempMesh) {
57 // if it exists already, return the mesh requested 57 // if it exists already, return the mesh requested
58 if ( this.modelMap[meshStump.name] !== undefined ) 58 if ( this.modelMap[meshStump.name] !== undefined )
59 return this.modelMap[meshStump.name]; 59 return this.modelMap[meshStump.name];
60 60
61 meshStump.ready = false; 61 meshStump.ready = false;
62 meshStump.addr = this.contentUrl + meshStump.name + "_mesh.json"; 62 meshStump.addr = this.contentUrl + meshStump.name + "_mesh.json";
63 meshStump.ctxID = RDGE.globals.engine.getContext().renderer.id; 63 meshStump.ctxID = RDGE.globals.engine.getContext().renderer.id;
64 64
65 // sets a temp mesh up in place of the final mesh to load 65 // sets a temp mesh up in place of the final mesh to load
66 if (!tempMesh) { 66 if (!tempMesh) {
67 if (this.tempSphere == null) { 67 if (this.tempSphere == null) {
68 this.tempSphere = RDGE.renderUtils.makeSphere(RDGE.globals.engine.getContext().renderer.ctx, 25, 5, 5); 68 this.tempSphere = RDGE.renderUtils.makeSphere(RDGE.globals.engine.getContext().renderer.ctx, 25, 5, 5);
69 } 69 }
70 70
71 tempMesh = this.tempSphere; 71 tempMesh = this.tempSphere;
72 } 72 }
73 73
74 // add the temp mesh to the map of loaded meshes 74 // add the temp mesh to the map of loaded meshes
75 this.modelMap[meshStump.name] = tempMesh; 75 this.modelMap[meshStump.name] = tempMesh;
76 76
77 // update the request counter - we now have one more mesh to load 77 // update the request counter - we now have one more mesh to load
78 this.requestCounter++; 78 this.requestCounter++;
79 79
80 RDGE.requestMesh(meshStump); 80 RDGE.requestMesh(meshStump);
81 81
82 return null; 82 return null;
83}; 83};
84 84
85/* 85/*
86 * Deletes the passed mesh from the manager as well as all renderers 86 * Deletes the passed mesh from the manager as well as all renderers
87 */ 87 */
88RDGE.MeshManager.prototype.deleteMesh = function (name) { 88RDGE.MeshManager.prototype.deleteMesh = function (name) {