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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | samples/o3djs/particles.js » ('j') | samples/o3djs/particles.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3djs/base.js
===================================================================
--- samples/o3djs/base.js (revision 18491)
+++ samples/o3djs/base.js (working copy)
@@ -641,6 +641,17 @@
};
/**
+ * Makes one class inherit from another.
+ * @param {!Object} subClass Class that wants to inherit.
+ * @param {!Object} superClass Class to inherit from.
+ */
+o3djs.base.inherit = function(subClass, superClass) {
+ var tmpClass = function() { };
+ tmpClass.prototype = superClass.prototype;
+ subClass.prototype = new tmpClass();
+};
+
+/**
* Parses an error stack from an exception
* @param {!Exception} excp The exception to get a stack trace from.
* @return {!Array.<string>} An array of strings of the stack trace.
« 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