topical media & game development
mobile-query-three-tmp-three.plugins-three.plugins.js / js
THREE.Plugins = {
mixin : function(object){
var dest = object.prototype || object;
object.register = function(name, funct) {
if( dest[name] ){
throw new Error('Conflict! Already method called: ' + name);
}
dest[name] = funct;
};
object.unregister = function(name){
if( dest.hasOwnProperty(name) === false ){
throw new Error('Plugin not found: ' + name);
}
delete dest[name];
};
object.registered = function(name){
return dest.hasOwnProperty(name) === true;
}
}
};
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.