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/texture.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/texture.js')
-rw-r--r-- | o3d/samples/o3djs/texture.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/o3d/samples/o3djs/texture.js b/o3d/samples/o3djs/texture.js index e741ed1..33678b2 100644 --- a/o3d/samples/o3djs/texture.js +++ b/o3d/samples/o3djs/texture.js @@ -199,7 +199,9 @@ o3djs.texture.createTextureFromBitmaps = function( }
texture = pack.createTextureCUBE(dstWidth, format, targetMips, false);
for (var ii = 0; ii < 6; ++ii) {
- texture.setFromBitmap(ii, bitmaps[ii]);
+ texture.setFromBitmap(
+ /** @type {o3d.TextureCUBE.CubeFace} */ (ii),
+ bitmaps[ii]);
}
} else if (bitmaps.length == 1) {
texture = pack.createTexture2D(
@@ -207,7 +209,7 @@ o3djs.texture.createTextureFromBitmaps = function( texture.setFromBitmap(bitmaps[0]);
}
- return texture;
+ return /** @type{!o3d.Texture} */ (texture);
};
/**
|