| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 /** | 79 /** |
| 80 * Initializes global variables, positions camera, draws shapes. | 80 * Initializes global variables, positions camera, draws shapes. |
| 81 * @param {Array} clientElements Array of o3d object elements. | 81 * @param {Array} clientElements Array of o3d object elements. |
| 82 */ | 82 */ |
| 83 function main(clientElements) { | 83 function main(clientElements) { |
| 84 var o3dElement = clientElements[0]; | 84 var o3dElement = clientElements[0]; |
| 85 | 85 |
| 86 // Init global variables. | 86 // Init global variables. |
| 87 initGlobals(clientElements); | 87 initGlobals(clientElements); |
| 88 | 88 |
| 89 // Add the shapes to the transform heirarchy. | 89 // Add the shapes to the transform hierarchy. |
| 90 createShapes(); | 90 createShapes(); |
| 91 | 91 |
| 92 // Add the manipulators to the transform hierarchy. | 92 // Add the manipulators to the transform hierarchy. |
| 93 setupManipulators(); | 93 setupManipulators(); |
| 94 | 94 |
| 95 // Set up the view and projection transformations. | 95 // Set up the view and projection transformations. |
| 96 initContext(); | 96 initContext(); |
| 97 | 97 |
| 98 // Start picking; it won't do anything until the scene finishes loading. | 98 // Start picking; it won't do anything until the scene finishes loading. |
| 99 o3djs.event.addEventListener(o3dElement, 'mousedown', onMouseDown); | 99 o3djs.event.addEventListener(o3dElement, 'mousedown', onMouseDown); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 } | 288 } |
| 289 | 289 |
| 290 /** | 290 /** |
| 291 * Removes any callbacks so they don't get called after the page has unloaded. | 291 * Removes any callbacks so they don't get called after the page has unloaded. |
| 292 */ | 292 */ |
| 293 function unload() { | 293 function unload() { |
| 294 if (g_client) { | 294 if (g_client) { |
| 295 g_client.cleanup(); | 295 g_client.cleanup(); |
| 296 } | 296 } |
| 297 } | 297 } |
| OLD | NEW |