Skip to content

Commit

Permalink
fix two mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
biasmv committed Jan 26, 2015
1 parent 180ae24 commit 1f79aef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/indexed-vertex-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ derive(IndexedVertexArray, VertexArrayBase, {

addTriangle : function(idx1, idx2, idx3) {
var index = 3 * this._numTriangles;
if (index >= this._indexData.length) {
if (index + 2 >= this._indexData.length) {
return;
}
this._indexData[index++] = idx1;
Expand Down
2 changes: 1 addition & 1 deletion src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ var _cartoonForSingleTrace = (function() {
var vertStart = vertArray.numVerts();
vertArray.addVertex(pos, [-tangent[0], -tangent[1], -tangent[2]],
color, objIds[0]);
_cartoonAddTube(vertArray, pos, normal, trace.residueAt(0), tangent,
_cartoonAddTube(vertArray, pos, normal, trace.residueAt(0).ss(), tangent,
color, radius, true, opts, 0, objIds[0]);
capTubeStart(vertArray, vertStart, opts.arcDetail * 4);
var vertEnd = vertArray.numVerts();
Expand Down

0 comments on commit 1f79aef

Please sign in to comment.