diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 23:31:01 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 23:31:01 +0000 |
commit | df9e494541df50c6b975aa9003d2da54fe7c4fa0 (patch) | |
tree | 6121bcca8994895b23e29cab4cb318539db0462a /o3d/samples/o3djs/debug.js | |
parent | 726dcd538802d518fadb88700d5c5ed2c48f9d29 (diff) | |
download | chromium_src-df9e494541df50c6b975aa9003d2da54fe7c4fa0.zip chromium_src-df9e494541df50c6b975aa9003d2da54fe7c4fa0.tar.gz chromium_src-df9e494541df50c6b975aa9003d2da54fe7c4fa0.tar.bz2 |
A bunch of jscompiler fixes including updating to
the latest jscompiler.
There were a few issues.
For some reason o3djs.math.matrix4 was not working
in ff3.0 when compiled. I spent about 8 hours trying
to reproduce the issue in a small case but had no luck.
I finally just tried changing original code and it work.
In the process of trying to figure that out I got the
latest jscompiler and found there were a bunch of other
problems with our js code which are now fixed.
Also found out I was incorrectly striping @o3dparameter
tags from our code in build_docs.py
Also, I learned that properties of objects are strings
when returned in an "in" statement as in
for (key in object)
key is a string regardless of what each key is in
object.
Review URL: http://codereview.chromium.org/200089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25944 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/o3djs/debug.js')
-rw-r--r-- | o3d/samples/o3djs/debug.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/o3d/samples/o3djs/debug.js b/o3d/samples/o3djs/debug.js index 77dab97..429a75f 100644 --- a/o3d/samples/o3djs/debug.js +++ b/o3d/samples/o3djs/debug.js @@ -650,16 +650,16 @@ o3djs.debug.DebugLineGroup = function(debugHelper, root) { this.currentColor_ = [1, 1, 1, 1]; /** - * The transforms for all the lines in this group indexed by clientId. + * The lines in this group indexed by clientId. * @private - * @type {!Object.<number, !o3d.Transform>} + * @type {!Object.<number, !o3djs.debug.DebugLine>} */ this.lineTransforms_ = { }; /** - * The transforms for all the unused lines in this group indexed by clientId. + * The unused lines in this group indexed by clientId. * @private - * @type {!Object.<number, !o3d.Transform>} + * @type {!Object.<number, !o3djs.debug.DebugLine>} */ this.freeLineTransforms_ = { }; @@ -725,7 +725,8 @@ o3djs.debug.DebugLineGroup.prototype.setColor = function(color) { * @return {!o3djs.debug.DebugLine} The DebugLine. */ o3djs.debug.DebugLineGroup.prototype.getLine_ = function() { - for (var id in this.freeLineTransforms_) { + for (var sid in this.freeLineTransforms_) { + var id = /** @type {number} */ (sid); var line = this.freeLineTransforms_[id]; delete this.freeLineTransforms_[id]; return line; @@ -755,7 +756,8 @@ o3djs.debug.DebugLineGroup.prototype.addLine = function(opt_start, * Clears all the lines in this group. */ o3djs.debug.DebugLineGroup.prototype.clear = function() { - for (var id in this.lineTransforms_) { + for (var sid in this.lineTransforms_) { + var id = /** @type {number} */ (sid); var line = this.lineTransforms_[id]; line.setVisible(false); this.freeLineTransforms_[id] = line; @@ -768,7 +770,8 @@ o3djs.debug.DebugLineGroup.prototype.clear = function() { */ o3djs.debug.DebugLineGroup.prototype.destroy = function() { this.clear(); - for (var id in this.freeLineTransforms_) { + for (var sid in this.freeLineTransforms_) { + var id = /** @type {number} */ (sid); this.freeLineTransforms_[id].destroy(); } this.freeLineTransforms_ = { }; |