diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-24 21:41:31 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-24 21:41:31 +0000 |
commit | 28b4f9bc980da2e69c3edcee374948bae0c5f8ac (patch) | |
tree | aa761d14dc32d90bc3ced831ccef11bfef0cf22e /o3d/samples/juggler.html | |
parent | 6f324234680499d621c1277dec1abb08fde3cc0a (diff) | |
download | chromium_src-28b4f9bc980da2e69c3edcee374948bae0c5f8ac.zip chromium_src-28b4f9bc980da2e69c3edcee374948bae0c5f8ac.tar.gz chromium_src-28b4f9bc980da2e69c3edcee374948bae0c5f8ac.tar.bz2 |
This change fixes the issue that if you use
o3djs.util.setMainEngine(...V8) in any sample
and you use scripts that you don't want run in V8,
for example Adsense, Google Analyitics, Wave,
Google WebElements then the o3djs would attempt
to pull in that javascript and execute it in V8.
Specifically this refers to inline <script> tags
instead HTML. Not <script src="url"> tags.
The solution is we add an id to the tags we want
o3djs to pull in. Any script with an id that starts
with "o3d" will get pulled in.
This CL changes our samples to have that id on their
script tags.
Review URL: http://codereview.chromium.org/159339
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/juggler.html')
-rw-r--r-- | o3d/samples/juggler.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/o3d/samples/juggler.html b/o3d/samples/juggler.html index 066b84b..233e958 100644 --- a/o3d/samples/juggler.html +++ b/o3d/samples/juggler.html @@ -43,7 +43,7 @@ O3D Juggler <script type="text/javascript" src="o3djs/base.js"></script> -<script type="text/javascript"> +<script type="text/javascript" id="o3d"> o3djs.require('o3djs.util'); o3djs.require('o3djs.math'); o3djs.require('o3djs.rendergraph'); @@ -348,7 +348,7 @@ float4 drawAirborneBalls(in float pi, in float hand_swing_radius, in float2 Z, in float threshold) { - float value = + float value = // balls going right to left (drawBallsInArc(pi, offset, right_hand, left_hand, height_factor, baseline, ball_radius_2, hand_swing_radius, Z, threshold) + @@ -397,7 +397,7 @@ float4 pixelShaderMain(PixelShaderInput input) : COLOR { // smaller than they would otherwise be. That's the opposite of what we do // for the balls, just because it happens to be cheaper here to do smaller and // cheaper in drawBallsInArc to do larger. - result += + result += clamp((hand_radius_2 - length_2(Z - r_h)) / threshold, 0, 1) * (Z.y < r_h.y) * right_hand_color + clamp((hand_radius_2 - length_2(Z - l_h)) / threshold, 0, 1) * @@ -416,7 +416,7 @@ float4 pixelShaderMain(PixelShaderInput input) : COLOR { // subtraction in the "1 - clamp..." below], but inverting it in // drawBallsInArc would be more expensive, and they have to match so that the // balls are all the same size. - result += (1 - result.a) * + result += (1 - result.a) * (1 - clamp((length_2(Z - hand) - ball_radius_2) / threshold, 0, 1)); // Draw airborne balls. |