aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/helper-classes
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/helper-classes')
-rw-r--r--js/helper-classes/3D/GLMatrix/gl-matrix.js1842
-rw-r--r--js/helper-classes/3D/GLMatrix/notice.txt4
-rw-r--r--js/helper-classes/3D/LinePlaneIntersectRec.js60
-rw-r--r--js/helper-classes/3D/ParseUtils.js84
-rw-r--r--js/helper-classes/3D/Rectangle.js209
-rw-r--r--js/helper-classes/3D/StageLine.js461
-rw-r--r--js/helper-classes/3D/draw-utils.js1208
-rw-r--r--js/helper-classes/3D/element-planes.js134
-rw-r--r--js/helper-classes/3D/glUtils.js319
-rw-r--r--js/helper-classes/3D/hit-record.js291
-rw-r--r--js/helper-classes/3D/math-utils.js1104
-rw-r--r--js/helper-classes/3D/snap-2d-record.js130
-rw-r--r--js/helper-classes/3D/snap-manager.js2247
-rw-r--r--js/helper-classes/3D/vec-utils.js199
-rw-r--r--js/helper-classes/3D/view-utils.js1342
-rw-r--r--js/helper-classes/Properties3D.js82
-rw-r--r--js/helper-classes/RDGE/GLAnchorPoint.js150
-rw-r--r--js/helper-classes/RDGE/GLBrushStroke.js242
-rw-r--r--js/helper-classes/RDGE/GLCircle.js754
-rw-r--r--js/helper-classes/RDGE/GLGeomObj.js224
-rw-r--r--js/helper-classes/RDGE/GLLight.js30
-rw-r--r--js/helper-classes/RDGE/GLLine.js446
-rw-r--r--js/helper-classes/RDGE/GLMaterial.js268
-rw-r--r--js/helper-classes/RDGE/GLPath.js232
-rw-r--r--js/helper-classes/RDGE/GLRectangle.js1251
-rw-r--r--js/helper-classes/RDGE/GLSubpath.js1671
-rw-r--r--js/helper-classes/RDGE/GLWorld.js834
-rw-r--r--js/helper-classes/RDGE/Materials/BrickMaterial.js231
-rw-r--r--js/helper-classes/RDGE/Materials/BumpMetalMaterial.js270
-rw-r--r--js/helper-classes/RDGE/Materials/FlatMaterial.js149
-rw-r--r--js/helper-classes/RDGE/Materials/IridescentScalesMaterial.js212
-rw-r--r--js/helper-classes/RDGE/Materials/JuliaMaterial.js147
-rw-r--r--js/helper-classes/RDGE/Materials/KeleidoscopeMaterial.js146
-rw-r--r--js/helper-classes/RDGE/Materials/LinearGradientMaterial.js339
-rw-r--r--js/helper-classes/RDGE/Materials/MandelMaterial.js147
-rw-r--r--js/helper-classes/RDGE/Materials/PlasmaMaterial.js132
-rw-r--r--js/helper-classes/RDGE/Materials/PulseMaterial.js226
-rw-r--r--js/helper-classes/RDGE/Materials/QuiltMaterial.js168
-rw-r--r--js/helper-classes/RDGE/Materials/RadialBlurMaterial.js241
-rw-r--r--js/helper-classes/RDGE/Materials/RadialGradientMaterial.js240
-rw-r--r--js/helper-classes/RDGE/Materials/StitchMaterial.js119
-rw-r--r--js/helper-classes/RDGE/Materials/TunnelMaterial.js130
-rw-r--r--js/helper-classes/RDGE/Materials/TwistMaterial.js146
-rw-r--r--js/helper-classes/RDGE/Materials/UberMaterial.js658
-rw-r--r--js/helper-classes/RDGE/MaterialsLibrary.js197
-rw-r--r--js/helper-classes/RDGE/precompiled.js17
-rw-r--r--js/helper-classes/RDGE/rdge-compiled.js467
-rw-r--r--js/helper-classes/RDGE/src/core/script/MeshManager.js242
-rw-r--r--js/helper-classes/RDGE/src/core/script/RenderInitProcs.js263
-rw-r--r--js/helper-classes/RDGE/src/core/script/RenderProcs.js536
-rw-r--r--js/helper-classes/RDGE/src/core/script/ScreenQuad.js31
-rw-r--r--js/helper-classes/RDGE/src/core/script/ShaderManager.js96
-rw-r--r--js/helper-classes/RDGE/src/core/script/TextureManager.js6
-rw-r--r--js/helper-classes/RDGE/src/core/script/animation.js322
-rw-r--r--js/helper-classes/RDGE/src/core/script/box.js143
-rw-r--r--js/helper-classes/RDGE/src/core/script/camera.js251
-rw-r--r--js/helper-classes/RDGE/src/core/script/engine.js482
-rw-r--r--js/helper-classes/RDGE/src/core/script/fx/blur.js196
-rw-r--r--js/helper-classes/RDGE/src/core/script/fx/ssao.js116
-rw-r--r--js/helper-classes/RDGE/src/core/script/init_state.js342
-rw-r--r--js/helper-classes/RDGE/src/core/script/input.js117
-rw-r--r--js/helper-classes/RDGE/src/core/script/jpass.js710
-rw-r--r--js/helper-classes/RDGE/src/core/script/jshader.js750
-rw-r--r--js/helper-classes/RDGE/src/core/script/lightmanager.js97
-rw-r--r--js/helper-classes/RDGE/src/core/script/math/mat4.js754
-rw-r--r--js/helper-classes/RDGE/src/core/script/math/quat.js225
-rw-r--r--js/helper-classes/RDGE/src/core/script/math/vec2.js191
-rw-r--r--js/helper-classes/RDGE/src/core/script/math/vec3.js351
-rw-r--r--js/helper-classes/RDGE/src/core/script/math/vec4.js258
-rw-r--r--js/helper-classes/RDGE/src/core/script/objectManager.js72
-rw-r--r--js/helper-classes/RDGE/src/core/script/particle.js842
-rw-r--r--js/helper-classes/RDGE/src/core/script/precompiled.js69
-rw-r--r--js/helper-classes/RDGE/src/core/script/renderUtils.js386
-rw-r--r--js/helper-classes/RDGE/src/core/script/rendercontext.js268
-rw-r--r--js/helper-classes/RDGE/src/core/script/renderer.js1696
-rw-r--r--js/helper-classes/RDGE/src/core/script/run_state.js456
-rw-r--r--js/helper-classes/RDGE/src/core/script/runtime.js237
-rw-r--r--js/helper-classes/RDGE/src/core/script/scenegraph.js1123
-rw-r--r--js/helper-classes/RDGE/src/core/script/scenegraphNodes.js649
-rw-r--r--js/helper-classes/RDGE/src/core/script/shadowLight.js54
-rw-r--r--js/helper-classes/RDGE/src/core/script/sockets.js166
-rw-r--r--js/helper-classes/RDGE/src/core/script/ubershader.js159
-rw-r--r--js/helper-classes/RDGE/src/core/script/util/dbgpanel.js237
-rw-r--r--js/helper-classes/RDGE/src/core/script/util/fpsTracker.js51
-rw-r--r--js/helper-classes/RDGE/src/core/script/util/statTracker.js338
-rw-r--r--js/helper-classes/RDGE/src/core/script/utilities.js245
-rw-r--r--js/helper-classes/Utils.js33
87 files changed, 33760 insertions, 0 deletions
diff --git a/js/helper-classes/3D/GLMatrix/gl-matrix.js b/js/helper-classes/3D/GLMatrix/gl-matrix.js
new file mode 100644
index 00000000..811ed5cd
--- /dev/null
+++ b/js/helper-classes/3D/GLMatrix/gl-matrix.js
@@ -0,0 +1,1842 @@
1/*
2 * gl-matrix.js - High performance matrix and vector operations for WebGL
3 * Version 1.0.0
4 */
5
6/*
7 * Copyright (c) 2011 Brandon Jones
8 *
9 * This software is provided 'as-is', without any express or implied
10 * warranty. In no event will the authors be held liable for any damages
11 * arising from the use of this software.
12 *
13 * Permission is granted to anyone to use this software for any purpose,
14 * including commercial applications, and to alter it and redistribute it
15 * freely, subject to the following restrictions:
16 *
17 * 1. The origin of this software must not be misrepresented; you must not
18 * claim that you wrote the original software. If you use this software
19 * in a product, an acknowledgment in the product documentation would be
20 * appreciated but is not required.
21 *
22 * 2. Altered source versions must be plainly marked as such, and must not
23 * be misrepresented as being the original software.
24 *
25 * 3. This notice may not be removed or altered from any source
26 * distribution.
27 */
28
29"use strict";
30
31// Type declarations
32var MatrixArray = (typeof Float32Array !== 'undefined') ? Float32Array : Array, // Fallback for systems that don't support TypedArrays
33 glMatrixArrayType = MatrixArray, // For Backwards compatibility
34 vec3 = {},
35 mat3 = {},
36 glmat4 = {},
37 quat4 = {};
38
39
40/*
41 * vec3 - 3 Dimensional Vector
42 */
43
44/*
45 * vec3.create
46 * Creates a new instance of a vec3 using the default array type
47 * Any javascript array containing at least 3 numeric elements can serve as a vec3
48 *
49 * Params:
50 * vec - Optional, vec3 containing values to initialize with
51 *
52 * Returns:
53 * New vec3
54 */
55vec3.create = function (vec) {
56 var dest = new MatrixArray(3);
57
58 if (vec) {
59 dest[0] = vec[0];
60 dest[1] = vec[1];
61 dest[2] = vec[2];
62 }
63
64 return dest;
65};
66
67/*
68 * vec3.set
69 * Copies the values of one vec3 to another
70 *
71 * Params:
72 * vec - vec3 containing values to copy
73 * dest - vec