From 648ee61ae84216d0236e0dbc211addc13b2cfa3a Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:52:06 -0700 Subject: Expand tabs --- .../RDGE/src/core/script/renderUtils.js | 100 ++++++++++----------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'js/helper-classes/RDGE/src/core/script/renderUtils.js') diff --git a/js/helper-classes/RDGE/src/core/script/renderUtils.js b/js/helper-classes/RDGE/src/core/script/renderUtils.js index 2d2a5930..ed3b2cfa 100755 --- a/js/helper-classes/RDGE/src/core/script/renderUtils.js +++ b/js/helper-classes/RDGE/src/core/script/renderUtils.js @@ -32,43 +32,43 @@ var RDGE = RDGE || {}; RDGE.renderUtils = RDGE.renderUtils || {}; /* -* Creates an indexed box primitive +* Creates an indexed box primitive * @return a rdge primitive */ RDGE.renderUtils.createBox = function () { var renderer = RDGE.globals.engine.getContext().renderer; var coords = - [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, // front - 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, // right - 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, // top - -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, // left - -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, // bottom - 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1]; // back + [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, // front + 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, // right + 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, // top + -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, // left + -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, // bottom + 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1]; // back var normals = - [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front - 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, // right - 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, // top - -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left + [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front + 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, // right + 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, // top + -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, // bottom - 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1]; // back + 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1]; // back var uvs = [1, 1, 0, 1, 0, 0, 1, 0, // front - 0, 1, 0, 0, 1, 0, 1, 1, // right - 1, 0, 1, 1, 0, 1, 0, 0, // top - 1, 1, 0, 1, 0, 0, 1, 0, // left - 0, 0, 1, 0, 1, 1, 0, 1, // bottom - 0, 0, 1, 0, 1, 1, 0, 1]; // back + 0, 1, 0, 0, 1, 0, 1, 1, // right + 1, 0, 1, 1, 0, 1, 0, 0, // top + 1, 1, 0, 1, 0, 0, 1, 0, // left + 0, 0, 1, 0, 1, 1, 0, 1, // bottom + 0, 0, 1, 0, 1, 1, 0, 1]; // back var indices = - [0, 1, 2, 0, 2, 3, // front - 4, 5, 6, 4, 6, 7, // right - 8, 9, 10, 8, 10, 11, // top - 12, 13, 14, 12, 14, 15, // left - 16, 17, 18, 16, 18, 19, // bottom - 20, 21, 22, 20, 22, 23]; // back + [0, 1, 2, 0, 2, 3, // front + 4, 5, 6, 4, 6, 7, // right + 8, 9, 10, 8, 10, 11, // top + 12, 13, 14, 12, 14, 15, // left + 16, 17, 18, 16, 18, 19, // bottom + 20, 21, 22, 20, 22, 23]; // back var prim = new RDGE.rdgePrimitiveDefinition(); @@ -87,16 +87,16 @@ RDGE.renderUtils.createBox = function () { prim.bufferStreams = [ - coords, - normals, - uvs + coords, + normals, + uvs ]; prim.streamUsage = [ - RDGE.rdgeConstants.BUFFER_STATIC, - RDGE.rdgeConstants.BUFFER_STATIC, - RDGE.rdgeConstants.BUFFER_STATIC + RDGE.rdgeConstants.BUFFER_STATIC, + RDGE.rdgeConstants.BUFFER_STATIC, + RDGE.rdgeConstants.BUFFER_STATIC ]; prim.indexUsage = RDGE.rdgeConstants.BUFFER_STREAM; @@ -191,8 +191,8 @@ RDGE.renderUtils.makeSphere = function (ctx, radius, lats, longs) { }; /* -* Creates a plane as a grid of triangles/quads, orients the plane according the the plane normal -* note: the center of the plane is always assumed to be the origin. +* Creates a plane as a grid of triangles/quads, orients the plane according the the plane normal +* note: the center of the plane is always assumed to be the origin. */ RDGE.renderUtils.createPlane = function (numCols, numRows, width, height, uTileCount, vTileCount, planeNormal) { var renderer = RDGE.globals.engine.getContext().renderer; @@ -263,16 +263,16 @@ RDGE.renderUtils.createPlane = function (numCols, numRows, width, height, uTileC prim.bufferStreams = [ - coords, - normals, - uvs + coords, + normals, + uvs ]; prim.streamUsage = [ - RDGE.rdgeConstants.BUFFER_STATIC, - RDGE.rdgeConstants.BUFFER_STATIC, - RDGE.rdgeConstants.BUFFER_STATIC + RDGE.rdgeConstants.BUFFER_STATIC, + RDGE.rdgeConstants.BUFFER_STATIC, + RDGE.rdgeConstants.BUFFER_STATIC ]; prim.indexUsage = RDGE.rdgeConstants.BUFFER_STREAM; @@ -324,12 +324,12 @@ RDGE.renderUtils.createCubeVolume = function (numCols_x, numLayers_y, numRows_z, prim.bufferStreams = [ - coords + coords ]; prim.streamUsage = [ - RDGE.rdgeConstants.BUFFER_DYNAMIC + RDGE.rdgeConstants.BUFFER_DYNAMIC ]; prim.indexUsage = RDGE.rdgeConstants.BUFFER_STREAM; @@ -349,14 +349,14 @@ RDGE.renderUtils.createScreenAlignedQuad = function () { // Screen aligned quad var coords = [ - -1.0, 1.0, 0.0, - 1.0, 1.0, 0.0, - -1.0, -1.0, 0.0, + -1.0, 1.0, 0.0, + 1.0, 1.0, 0.0, + -1.0, -1.0, 0.0, - -1.0, -1.0, 0.0, - 1.0, 1.0, 0.0, - 1.0, -1.0, 0.0 - ]; + -1.0, -1.0, 0.0, + 1.0, 1.0, 0.0, + 1.0, -1.0, 0.0 + ]; var uvs = [0.0, 0.0, 0.0, 1.0, @@ -378,14 +378,14 @@ RDGE.renderUtils.createScreenAlignedQuad = function () { prim.bufferStreams = [ - coords, - uvs + coords, + uvs ]; prim.streamUsage = [ - RDGE.rdgeConstants.BUFFER_STATIC, - RDGE.rdgeConstants.BUFFER_STATIC + RDGE.rdgeConstants.BUFFER_STATIC, + RDGE.rdgeConstants.BUFFER_STATIC ]; prim.type = RDGE.rdgeConstants.TRIANGLES; -- cgit v1.2.3