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

Side by Side Diff: samples/o3djs/base.js

Issue 125189: Added particle trails for things like exhaust on a car. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 6 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 | « no previous file | samples/o3djs/particles.js » ('j') | samples/o3djs/particles.js » ('J')
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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 * A stub for later optionally converting obfuscated names 634 * A stub for later optionally converting obfuscated names
635 * @private 635 * @private
636 * @param {string} name Name to un-obfuscate. 636 * @param {string} name Name to un-obfuscate.
637 * @return {string} un-obfuscated name. 637 * @return {string} un-obfuscated name.
638 */ 638 */
639 o3djs.base.maybeDeobfuscateFunctionName_ = function(name) { 639 o3djs.base.maybeDeobfuscateFunctionName_ = function(name) {
640 return name; 640 return name;
641 }; 641 };
642 642
643 /** 643 /**
644 * Makes one class inherit from another.
645 * @param {!Object} subClass Class that wants to inherit.
646 * @param {!Object} superClass Class to inherit from.
647 */
648 o3djs.base.inherit = function(subClass, superClass) {
649 var tmpClass = function() { };
650 tmpClass.prototype = superClass.prototype;
651 subClass.prototype = new tmpClass();
652 };
653
654 /**
644 * Parses an error stack from an exception 655 * Parses an error stack from an exception
645 * @param {!Exception} excp The exception to get a stack trace from. 656 * @param {!Exception} excp The exception to get a stack trace from.
646 * @return {!Array.<string>} An array of strings of the stack trace. 657 * @return {!Array.<string>} An array of strings of the stack trace.
647 */ 658 */
648 o3djs.base.parseErrorStack = function(excp) { 659 o3djs.base.parseErrorStack = function(excp) {
649 var stack = []; 660 var stack = [];
650 var name; 661 var name;
651 var line; 662 var line;
652 663
653 if (!excp || !excp.stack) { 664 if (!excp || !excp.stack) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 return msie; 781 return msie;
771 }; 782 };
772 /** 783 /**
773 * Returns true if the user's browser is Chrome 1.0, that requires a workaround 784 * Returns true if the user's browser is Chrome 1.0, that requires a workaround
774 * to create the plugin. 785 * to create the plugin.
775 * @return {boolean} true if the user's browser is Chrome 1.0. 786 * @return {boolean} true if the user's browser is Chrome 1.0.
776 */ 787 */
777 o3djs.base.IsChrome10 = function() { 788 o3djs.base.IsChrome10 = function() {
778 return navigator.userAgent.indexOf('Chrome/1.0') >= 0; 789 return navigator.userAgent.indexOf('Chrome/1.0') >= 0;
779 }; 790 };
OLDNEW
« no previous file with comments | « no previous file | samples/o3djs/particles.js » ('j') | samples/o3djs/particles.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698