diff --git a/o3d/DEPS b/o3d/DEPS index 5e251c1bf..05d5fb29e 100644 --- a/o3d/DEPS +++ b/o3d/DEPS @@ -2,7 +2,7 @@ vars = { "chromium_trunk": "http://src.chromium.org/svn/trunk", "nixysa_rev": "25", - "o3d_code_rev": "89", + "o3d_code_rev": "91", } deps = { diff --git a/o3d/DEPS_gyp b/o3d/DEPS_gyp index 0fbc5339e..5afa3a20b 100644 --- a/o3d/DEPS_gyp +++ b/o3d/DEPS_gyp @@ -3,7 +3,7 @@ vars = { "http://src.chromium.org/svn/trunk", "nixysa_rev": "25", "chromium_rev": "19057", - "o3d_code_rev": "87", + "o3d_code_rev": "91", } deps = { diff --git a/o3d/samples/GoogleIO-2009/assets/colorbar.png b/o3d/samples/GoogleIO-2009/assets/colorbar.png new file mode 100644 index 000000000..629c37883 Binary files /dev/null and b/o3d/samples/GoogleIO-2009/assets/colorbar.png differ diff --git a/o3d/samples/GoogleIO-2009/assets/style.css b/o3d/samples/GoogleIO-2009/assets/style.css new file mode 100644 index 000000000..71fc4417b --- /dev/null +++ b/o3d/samples/GoogleIO-2009/assets/style.css @@ -0,0 +1,8 @@ +html, body { + height: 100%; + margin: 0; + padding: 0; + border: none; + font-family: Arial, sans-serif; +} + diff --git a/o3d/samples/GoogleIO-2009/shaders/checker.shader b/o3d/samples/GoogleIO-2009/shaders/checker.shader new file mode 100644 index 000000000..a6c2ae8c1 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/shaders/checker.shader @@ -0,0 +1,111 @@ +/* + * Copyright 2009, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// The 4x4 world view projection matrix. +float4x4 worldViewProjection : WORLDVIEWPROJECTION; +float4x4 worldInverseTranspose : WORLDINVERSETRANSPOSE; +float4x4 world : WORLD; + +// light position +float3 lightWorldPos; +float3 lightColor; + +// input parameters for our vertex shader +struct VertexShaderInput { + float4 position : POSITION; + float4 normal : NORMAL; + float2 texcoord : TEXCOORD0; +}; + +// input parameters for our pixel shader +struct PixelShaderInput { + float4 position : POSITION; + float2 texcoord : TEXCOORD0; + float3 normal : TEXCOORD1; + float3 worldPosition : TEXCOORD2; +}; + +// function for getting the checker pattern +float4 checker(float2 uv) { + float checkSize = 10; + float fmodResult = fmod(floor(checkSize * uv.x) + floor(checkSize * uv.y), + 2.0); + return (fmodResult < 1) ? + float4(0.4, 0.5, 0.5, 1) : + float4(0.6, 0.8, 0.8, 1); +} + +/** + * Our vertex shader. In the vertex shader, we calculate the lighting. + * Then we'll combine it with our checker pattern input the pixel shader. + */ +PixelShaderInput vertexShaderFunction(VertexShaderInput input) { + PixelShaderInput output; + + // Transform position into clip space. + output.position = mul(input.position, worldViewProjection); + + // Transform normal into world space, where we can do lighting + // calculations even if the world transform contains scaling. + output.normal = mul(input.normal, worldInverseTranspose).xyz; + + // Calculate surface position in world space. + output.worldPosition = mul(input.position, world).xyz; + + output.texcoord = input.texcoord; + + return output; +} + +/** + * Our pixel shader. We take the lighting color we got from the vertex sahder + * and combine it with our checker pattern. We only need to use the x + * coordinate of our input.col because we gave it uniform color + */ +float4 pixelShaderFunction(PixelShaderInput input): COLOR { + float3 surfaceToLight = normalize(lightWorldPos - input.worldPosition); + + float3 worldNormal = normalize(input.normal); + + // Apply diffuse lighting in world space in case the world transform + // contains scaling. + float4 check = checker(input.texcoord); + float4 directionalIntensity = saturate(dot(worldNormal, surfaceToLight)); + float4 outColor = directionalIntensity * check; + return float4(outColor.rgb, 1); +} + +// Here we tell our effect file *which* functions are +// our vertex and pixel shaders. + +// #o3d VertexShaderEntryPoint vertexShaderFunction +// #o3d PixelShaderEntryPoint pixelShaderFunction +// #o3d MatrixLoadOrder RowMajor diff --git a/o3d/samples/GoogleIO-2009/step01.html b/o3d/samples/GoogleIO-2009/step01.html new file mode 100644 index 000000000..d105a59c6 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step01.html @@ -0,0 +1,176 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step02.html b/o3d/samples/GoogleIO-2009/step02.html new file mode 100644 index 000000000..74f3b0f71 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step02.html @@ -0,0 +1,206 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step03.html b/o3d/samples/GoogleIO-2009/step03.html new file mode 100644 index 000000000..8f6aaa93c --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step03.html @@ -0,0 +1,254 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step04.html b/o3d/samples/GoogleIO-2009/step04.html new file mode 100644 index 000000000..93bd8edfa --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step04.html @@ -0,0 +1,264 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step05.html b/o3d/samples/GoogleIO-2009/step05.html new file mode 100644 index 000000000..2c790866a --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step05.html @@ -0,0 +1,292 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step06.html b/o3d/samples/GoogleIO-2009/step06.html new file mode 100644 index 000000000..131ff4349 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step06.html @@ -0,0 +1,301 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step07.html b/o3d/samples/GoogleIO-2009/step07.html new file mode 100644 index 000000000..4c61f93c4 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step07.html @@ -0,0 +1,302 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step08.html b/o3d/samples/GoogleIO-2009/step08.html new file mode 100644 index 000000000..dc3084c11 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step08.html @@ -0,0 +1,330 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step09.html b/o3d/samples/GoogleIO-2009/step09.html new file mode 100644 index 000000000..ce931be3c --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step09.html @@ -0,0 +1,358 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step10.html b/o3d/samples/GoogleIO-2009/step10.html new file mode 100644 index 000000000..965ef7c75 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step10.html @@ -0,0 +1,361 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step11.html b/o3d/samples/GoogleIO-2009/step11.html new file mode 100644 index 000000000..1db5557d1 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step11.html @@ -0,0 +1,365 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step12.html b/o3d/samples/GoogleIO-2009/step12.html new file mode 100644 index 000000000..cb07ce7d8 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step12.html @@ -0,0 +1,394 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step13.html b/o3d/samples/GoogleIO-2009/step13.html new file mode 100644 index 000000000..a99562763 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step13.html @@ -0,0 +1,570 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/GoogleIO-2009/step14.html b/o3d/samples/GoogleIO-2009/step14.html new file mode 100644 index 000000000..031f85818 --- /dev/null +++ b/o3d/samples/GoogleIO-2009/step14.html @@ -0,0 +1,581 @@ + + + + + + + +Google I/O O3D Sample + + + + + + + + + + + + +
+
+
+ Google I/O 2009 O3D Sample +
+
+
+
+
+
+ + diff --git a/o3d/samples/MANIFEST b/o3d/samples/MANIFEST index f7f7d63e4..5cb2ff69d 100644 --- a/o3d/samples/MANIFEST +++ b/o3d/samples/MANIFEST @@ -44,6 +44,25 @@ beachdemo/assets/pe_mist.png beachdemo/assets/sky-cubemap.dds beachdemo/beachdemo.html beachdemo/beachdemo.js +GoogleIO-2009/step01.html +GoogleIO-2009/step02.html +GoogleIO-2009/step03.html +GoogleIO-2009/step04.html +GoogleIO-2009/step05.html +GoogleIO-2009/step06.html +GoogleIO-2009/step07.html +GoogleIO-2009/step08.html +GoogleIO-2009/step09.html +GoogleIO-2009/step10.html +GoogleIO-2009/step11.html +GoogleIO-2009/step12.html +GoogleIO-2009/step13.html +GoogleIO-2009/step14.html +GoogleIO-2009/shaders/checker.shader +GoogleIO-2009/assets/background.o3dtgz +GoogleIO-2009/assets/character.o3dtgz +GoogleIO-2009/assets/colorbar.png +GoogleIO-2009/assets/style.css box2d-3d/box2d-3d.html box2d-3d/demos/LICENSE.txt box2d-3d/demos/README.o3d diff --git a/o3d/samples/build.scons b/o3d/samples/build.scons index c1324ba26..608b2adac 100644 --- a/o3d/samples/build.scons +++ b/o3d/samples/build.scons @@ -254,7 +254,8 @@ z_up_env = env.Clone(UP_AXIS='0,0,1') models = [ {'path': 'beachdemo/convert_assets/beachdemo.zip', 'env': z_up_env}, {'path': 'beachdemo/convert_assets/beach-low-poly.dae', 'env': z_up_env}, - + {'path': 'GoogleIO-2009/convert_assets/background.zip', 'env': y_up_env}, + {'path': 'GoogleIO-2009/convert_assets/character.zip', 'env': y_up_env}, {'path': 'home-configurators/convert_cbassets/House_Roofless.kmz', 'env': z_up_env}, diff --git a/o3d/samples/particles.html b/o3d/samples/particles.html index a82b334ec..244b621da 100644 --- a/o3d/samples/particles.html +++ b/o3d/samples/particles.html @@ -594,6 +594,6 @@ function unload() {
Press 'P' to make a poof.
-Press 'T' to make a trail. +Hold 'T' to make a trail. diff --git a/o3d/tests/selenium/sample_list.txt b/o3d/tests/selenium/sample_list.txt index 786bbc4f7..2774574bf 100644 --- a/o3d/tests/selenium/sample_list.txt +++ b/o3d/tests/selenium/sample_list.txt @@ -107,6 +107,8 @@ medium zsorting screenshot pdiff_threshold(39500) #large box2d-3d/box2d-3d timeout(45000) except(*googlechrome) large simpleviewer/simpleviewer screenshot pdiff_threshold(100) large trends/trends timeout(30000) +medium GoogleIO-2009/step09 screenshot pdiff_threshold(1900) +large GoogleIO-2009/step14 screenshot pdiff_threshold(4900) # -- tests below this line are tests for which there is a python # function to custom run the test. As such, only the 'except' and