1 /** 2 * Copyright (C) 2009-2012 Klaus Reimer <k@ailis.de> 3 * See LICENSE.txt for licensing information. 4 */ 5 6 /** 7 * @license 8 * ThreeDee - JavaScript 3D scene graph engine 9 * http://kayahr.github.com/threedee 10 * 11 * Copyright (C) 2009-2011 Klaus Reimer <k@ailis.de> 12 * 13 * This program is free software: you can redistribute it and/or modify 14 * it under the terms of the GNU Lesser General Public License as published by 15 * the Free Software Foundation, either version 3 of the License, or 16 * (at your option) any later version. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * You should have received a copy of the GNU Lesser General Public License 24 * along with this program. If not, see <http://www.gnu.org/licenses/> 25 * 26 */ 27 28 /** 29 * The threedee namespace. 30 * @type {Object} 31 */ 32 var threedee = {}; 33 34 /** 35 * Derives subClass from superClass. 36 * 37 * @param {Function} subClass 38 * The sub class 39 * @param {Function} superClass 40 * The super class 41 */ 42 threedee.inherit = function(subClass, superClass) 43 { 44 var tmp = superClass.prototype; 45 superClass = new Function(); 46 superClass.prototype = tmp; 47 subClass.prototype = new superClass(); 48 subClass.prototype.constructor = subClass; 49 };