Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1036)

Side by Side Diff: o3d/samples/manipulators/manipsample.js

Issue 1561020: Hierarchy. Hierarchy. Hierarchy!!! (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/callback.h ('k') | o3d/samples/primitives.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « media/base/callback.h ('k') | o3d/samples/primitives.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698