summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorsimonrad@chromium.org <simonrad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 19:31:19 +0000
committersimonrad@chromium.org <simonrad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 19:31:19 +0000
commit2ddd04b34025d5ed512b84092dc8b09f2366b828 (patch)
treef41b877fe06e2d58c9cd830bdfb430eef526cfc8 /o3d
parentd5437f7c09fe2b0d4c545cbb1d678e061f431067 (diff)
downloadchromium_src-2ddd04b34025d5ed512b84092dc8b09f2366b828.zip
chromium_src-2ddd04b34025d5ed512b84092dc8b09f2366b828.tar.gz
chromium_src-2ddd04b34025d5ed512b84092dc8b09f2366b828.tar.bz2
Fix for O3Djs build break.
tbr=kbr BUG=none TEST=none Review URL: http://codereview.chromium.org/487013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/samples/o3djs/lineprimitives.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/o3d/samples/o3djs/lineprimitives.js b/o3d/samples/o3djs/lineprimitives.js
index 4d7ae90..884a9c1 100644
--- a/o3d/samples/o3djs/lineprimitives.js
+++ b/o3d/samples/o3djs/lineprimitives.js
@@ -352,7 +352,7 @@ o3djs.lineprimitives.createLineRingVertices = function(
// Connect the vertices by simple lines.
for (var i = 0; i < subdivisions; i++) {
- vertexInfo.addLine(i, (i+1));
+ vertexInfo.addLine(i, i+1);
}
if (opt_matrix) {
@@ -364,13 +364,16 @@ o3djs.lineprimitives.createLineRingVertices = function(
/**
* Creates a ring.
* The ring is a circle in the XZ plane, centered at the origin.
- * The created ring has a position stream only and can therefore only be
- * used with appropriate shaders.
+ * The created ring has position, normal, and 1-D texcoord streams.
+ * The normals point outwards from the center of the ring.
+ * The texture coordinates are based on angle about the center.
*
* @param {!o3d.Pack} pack Pack to create ring elements in.
* @param {!o3d.Material} material Material to use.
* @param {number} radius Radius of the ring.
* @param {number} subdivisions Number of steps around the ring.
+ * @param {number} maxTexCoord 1-D texture coordinates will range from 0 to
+ * this value, based on angle about the center.
* @param {!o3djs.math.Matrix4} opt_matrix A matrix by which to multiply all
* the vertices.
* @return {!o3d.Shape} The created ring.
@@ -380,10 +383,12 @@ o3djs.lineprimitives.createLineRing = function(
material,
radius,
subdivisions,
+ maxTexCoord,
opt_matrix) {
var vertexInfo = o3djs.lineprimitives.createLineRingVertices(
radius,
subdivisions,
+ maxTexCoord,
opt_matrix);
return vertexInfo.createShape(pack, material);