Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2351)

Unified Diff: samples/o3d-webgl/curve.js

Issue 3020030: Fixes errors when loading animated meshes in simpleviewer.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | samples/o3d-webgl/function.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl/curve.js
===================================================================
--- samples/o3d-webgl/curve.js (revision 53860)
+++ samples/o3d-webgl/curve.js (working copy)
@@ -429,7 +429,7 @@
"attempt to set sample rate to " + rate +
" which is lower than the minimum of " + o3d.Curve.kMinimumSampleRate);
} else if (rate != this.sample_rate_) {
- this.sample_rate_ = new_sample_rate;
+ this.sample_rate_ = rate;
this.invalidateCache_();
}
});
@@ -526,7 +526,7 @@
return;
}
for (var i = 0; i < values.length; i += kNumLinearKeyValues) {
- var newKey = this.createKey("LinearKey");
+ var newKey = this.createKey("LinearCurveKey");
newKey.input = values[i];
newKey.output = values[i+1];
}
@@ -555,7 +555,7 @@
return;
}
for (var i = 0; i < values.length; i += kNumStepKeyValues) {
- var newKey = this.createKey("StepKey");
+ var newKey = this.createKey("StepCurveKey");
newKey.input = values[i];
newKey.output = values[i+1];
}
@@ -585,7 +585,7 @@
return;
}
for (var ii = 0; ii < values.length; ii += kNumBezierKeyValues) {
- var newKey = this.createKey("BezierKey");
+ var newKey = this.createKey("BezierCurveKey");
newKey.input = values[i];
newKey.output = values[i+1];
newKey.inTangent[0] = values[i+2];
@@ -725,7 +725,7 @@
// Find the current the keys that cover our input.
while (start <= end) {
- var mid = (start + end) / 2;
+ var mid = Math.floor((start + end)/2);
if (input > keys[mid].input) {
start = mid + 1;
} else {
« no previous file with comments | « no previous file | samples/o3d-webgl/function.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698