diff options
author | gspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 21:28:56 +0000 |
---|---|---|
committer | gspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-29 21:28:56 +0000 |
commit | a465eb3b8d7e283a40085c23c0673735383abb7c (patch) | |
tree | 894f8c1a12a33b5c400e8d91922e533fdcd7e346 /o3d/samples | |
parent | e4284a1a248f08b619b66f0823fefd0838262bd8 (diff) | |
download | chromium_src-a465eb3b8d7e283a40085c23c0673735383abb7c.zip chromium_src-a465eb3b8d7e283a40085c23c0673735383abb7c.tar.gz chromium_src-a465eb3b8d7e283a40085c23c0673735383abb7c.tar.bz2 |
Final merge from O3D Perforce tree.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17243 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples')
-rw-r--r-- | o3d/samples/o3djs/debug.js | 13 | ||||
-rw-r--r-- | o3d/samples/o3djs/primitives.js | 12 | ||||
-rw-r--r-- | o3d/samples/o3djs/simple.js | 6 | ||||
-rw-r--r-- | o3d/samples/o3djs/util.js | 3 |
4 files changed, 23 insertions, 11 deletions
diff --git a/o3d/samples/o3djs/debug.js b/o3d/samples/o3djs/debug.js index cc34b7a..8b1dc8d 100644 --- a/o3d/samples/o3djs/debug.js +++ b/o3d/samples/o3djs/debug.js @@ -387,7 +387,7 @@ o3djs.debug.createLineSphereVertices = function(radius, subdivisionsHeight, opt_matrix) { if (subdivisionsAxis <= 0 || subdivisionsHeight <= 0) { - throw RangeError('subdivisionAxis and subdivisionHeight must be > 0'); + throw Error('subdivisionAxis and subdivisionHeight must be > 0'); } // We are going to generate our sphere by iterating through its @@ -474,8 +474,19 @@ o3djs.debug.createLineSphere = function(pack, * this line belongs too. */ o3djs.debug.DebugLine = function(debugLineGroup) { + /** + * The DebugLineGroup this DebugLine is managed by. + * @private + * @type {!o3djs.debug.DebugLineGroup} + */ this.debugLineGroup_ = debugLineGroup; var pack = debugLineGroup.getPack(); + + /** + * The transform for this DebugLine. + * @private + * @type {!o3d.Transform} + */ this.transform_ = pack.createObject('Transform'); this.transform_.name = O3D_DEBUG_LINE_SHAPE_NAME; this.transform_.addShape(debugLineGroup.getLineShape()); diff --git a/o3d/samples/o3djs/primitives.js b/o3d/samples/o3djs/primitives.js index d3df686..52621d5 100644 --- a/o3d/samples/o3djs/primitives.js +++ b/o3d/samples/o3djs/primitives.js @@ -703,7 +703,7 @@ o3djs.primitives.createSphereVertices = function(radius, subdivisionsHeight, opt_matrix) { if (subdivisionsAxis <= 0 || subdivisionsHeight <= 0) { - throw RangeError('subdivisionAxis and subdivisionHeight must be > 0'); + throw Error('subdivisionAxis and subdivisionHeight must be > 0'); } // We are going to generate our sphere by iterating through its @@ -1016,7 +1016,7 @@ o3djs.primitives.createDiscVertices = function(radius, opt_stackPower, opt_matrix) { if (divisions < 3) { - throw RangeError('divisions must be at least 3'); + throw Error('divisions must be at least 3'); } var stacks = opt_stacks ? opt_stacks : 1; @@ -1148,11 +1148,11 @@ o3djs.primitives.createCylinderVertices = function(radius, verticalSubdivisions, opt_matrix) { if (radialSubdivisions < 1) { - throw RangeError('radialSubdivisions must be 1 or greater'); + throw Error('radialSubdivisions must be 1 or greater'); } if (verticalSubdivisions < 1) { - throw RangeError('verticalSubdivisions must be 1 or greater'); + throw Error('verticalSubdivisions must be 1 or greater'); } var vertexInfo = o3djs.primitives.createVertexInfo(); @@ -1417,7 +1417,7 @@ o3djs.primitives.createPrismVertices = function(points, depth, opt_matrix) { if (points.length < 3) { - throw RangeError('there must be 3 or more points'); + throw Error('there must be 3 or more points'); } var backZ = -0.5 * depth; @@ -1573,7 +1573,7 @@ o3djs.primitives.createPlaneVertices = function(width, subdivisionsDepth, opt_matrix) { if (subdivisionsWidth <= 0 || subdivisionsDepth <= 0) { - throw RangeError('subdivisionWidth and subdivisionDepth must be > 0'); + throw Error('subdivisionWidth and subdivisionDepth must be > 0'); } var vertexInfo = o3djs.primitives.createVertexInfo(); diff --git a/o3d/samples/o3djs/simple.js b/o3d/samples/o3djs/simple.js index a02e84d..8bb729b 100644 --- a/o3d/samples/o3djs/simple.js +++ b/o3d/samples/o3djs/simple.js @@ -421,10 +421,12 @@ o3djs.simple.SimpleInfo.prototype.createSphere = function(radius, * Loads a scene from a URL. * TODO: Implement * @param {string} url Url of scene to load. - * @return {!o3djs.simple.Scene} A Javascript object to manage th scene. + * @return {!o3djs.simple.Scene} A Javascript object to manage the scene. */ o3djs.simple.SimpleInfo.prototype.loadScene = function(url) { - throw('not implemented'); + if (true) { + throw('not implemented'); + } return null; }; diff --git a/o3d/samples/o3djs/util.js b/o3d/samples/o3djs/util.js index de283ba..b898a24 100644 --- a/o3d/samples/o3djs/util.js +++ b/o3d/samples/o3djs/util.js @@ -310,7 +310,7 @@ o3djs.util.requiredVersionAvailable = function(requiredVersion) { var haveParts = version.split('.'); var requiredParts = requiredVersion.split('.'); if (requiredParts.length > 4) { - throw RangeError('requiredVersion has more than 4 parts!'); + throw Error('requiredVersion has more than 4 parts!'); } for (var pp = 0; pp < requiredParts.length; ++pp) { var have = parseInt(haveParts[pp], 10); @@ -511,7 +511,6 @@ o3djs.util.getElementContentById = function(id) { throw 'getElementContentById does not no how to get content from a ' + node.tagName + ' element'; } - return node.value; }; /** |