2010-12-19 23:41:46 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ease.js namespace
|
|
|
|
*
|
|
|
|
* All modules will be available via this namespace. In CommonJS format, they
|
|
|
|
* were accessed via the require() function. For example:
|
|
|
|
*
|
|
|
|
* var util = require( 'easejs' ).Class;
|
|
|
|
*
|
|
|
|
* In this file, the above would be written as:
|
|
|
|
*
|
|
|
|
* var util = easejs.Class;
|
|
|
|
*
|
2011-12-09 23:07:41 -05:00
|
|
|
* Note: Quoted for Closure Compiler export
|
|
|
|
*
|
2010-12-19 23:41:46 -05:00
|
|
|
* @type {Object}
|
|
|
|
*/
|
2011-12-09 23:07:41 -05:00
|
|
|
window['easejs'] = {};
|
2010-12-19 23:41:46 -05:00
|
|
|
|
|
|
|
( function( ns_exports )
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* CommonJS module exports
|
|
|
|
*
|
|
|
|
* Since this file contains all of the modules, this will be populated with
|
|
|
|
* every module right off the bat.
|
|
|
|
*
|
|
|
|
* @type {Object.<string,Object>}
|
|
|
|
*/
|
2011-03-03 14:14:10 -05:00
|
|
|
var module = {};
|
2010-12-19 23:41:46 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the requested module
|
|
|
|
*
|
|
|
|
* The require() function is likely unavailable client-side (within a web
|
|
|
|
* browser). Therefore, we mock one. If it is available, this overwrites it.
|
|
|
|
* Our modules are all preloaded in the exports object.
|
|
|
|
*
|
|
|
|
* @param {string} module_id id of the module to load
|
|
|
|
*
|
|
|
|
* @return {Object} exports of requested module
|
|
|
|
*/
|
|
|
|
var require = function( module_id )
|
|
|
|
{
|
|
|
|
// remove the './' directory prefix (every module is currently included
|
2011-10-23 00:13:53 -04:00
|
|
|
// via a relative path), stupidly remove ../'s and remove .js extensions
|
|
|
|
var id_clean = module_id.replace( /^\.?\/|[^/]*?\/\.\.\/|\.js$/, '' );
|
2010-12-19 23:41:46 -05:00
|
|
|
|
|
|
|
// attempt to retrieve the module
|
2011-03-03 14:14:10 -05:00
|
|
|
var mod = module[ id_clean ];
|
|
|
|
if ( mod === undefined )
|
2010-12-19 23:41:46 -05:00
|
|
|
{
|
|
|
|
throw "[ease.js] Undefined module: " + module_id;
|
|
|
|
}
|
|
|
|
|
2011-03-03 14:14:10 -05:00
|
|
|
return mod.exports;
|
2010-12-19 23:41:46 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
/**{CONTENT}**/
|
|
|
|
|
|
|
|
// the following should match the exports of /index.js
|
2011-12-09 23:07:41 -05:00
|
|
|
ns_exports['Class'] = module['class'].exports;
|
|
|
|
ns_exports['AbstractClass'] = module['class_abstract'].exports;
|
|
|
|
ns_exports['FinalClass'] = module['class_final'].exports;
|
|
|
|
ns_exports['Interface'] = module['interface'].exports;
|
|
|
|
} )( window['easejs'] );
|
2010-12-19 23:41:46 -05:00
|
|
|
|