OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright 2009, Google Inc. | 2 Copyright 2009, Google Inc. |
3 All rights reserved. | 3 All rights reserved. |
4 | 4 |
5 Redistribution and use in source and binary forms, with or without | 5 Redistribution and use in source and binary forms, with or without |
6 modification, are permitted provided that the following conditions are | 6 modification, are permitted provided that the following conditions are |
7 met: | 7 met: |
8 | 8 |
9 * Redistributions of source code must retain the above copyright | 9 * Redistributions of source code must retain the above copyright |
10 notice, this list of conditions and the following disclaimer. | 10 notice, this list of conditions and the following disclaimer. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 * Initializes global variables, positions camera, draws shapes. | 77 * Initializes global variables, positions camera, draws shapes. |
78 * @param {Array} clientElements Array of o3d object elements. | 78 * @param {Array} clientElements Array of o3d object elements. |
79 */ | 79 */ |
80 function main(clientElements) { | 80 function main(clientElements) { |
81 // Init global variables. | 81 // Init global variables. |
82 initGlobals(clientElements); | 82 initGlobals(clientElements); |
83 | 83 |
84 // Set up the view and projection transformations. | 84 // Set up the view and projection transformations. |
85 initContext(); | 85 initContext(); |
86 | 86 |
87 // Add the shapes to the transform heirarchy. | 87 // Add the shapes to the transform hierarchy. |
88 createShapes(); | 88 createShapes(); |
89 | 89 |
90 window.g_finished = true; // for selenium testing. | 90 window.g_finished = true; // for selenium testing. |
91 } | 91 } |
92 | 92 |
93 /** | 93 /** |
94 * Initializes global variables and libraries. | 94 * Initializes global variables and libraries. |
95 */ | 95 */ |
96 function initGlobals(clientElements) { | 96 function initGlobals(clientElements) { |
97 g_o3dElement = clientElements[0]; | 97 g_o3dElement = clientElements[0]; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 <body onload="initClient()"> | 241 <body onload="initClient()"> |
242 <h1>Primitives</h1> | 242 <h1>Primitives</h1> |
243 This example shows how to use the primitives utility library to make various | 243 This example shows how to use the primitives utility library to make various |
244 shapes. | 244 shapes. |
245 <br/> | 245 <br/> |
246 <!-- Start of O3D plugin --> | 246 <!-- Start of O3D plugin --> |
247 <div id="o3d" style="width: 600px; height: 600px;"></div> | 247 <div id="o3d" style="width: 600px; height: 600px;"></div> |
248 <!-- End of O3D plugin --> | 248 <!-- End of O3D plugin --> |
249 </body> | 249 </body> |
250 </html> | 250 </html> |
OLD | NEW |