2014-09-24 16:07:50 +00:00
|
|
|
(function (root) {
|
2014-10-02 22:55:24 +00:00
|
|
|
//AMD shim for the presets build
|
2014-09-24 16:07:50 +00:00
|
|
|
if (typeof define !== "function" &&
|
|
|
|
typeof root.Tone === "function") {
|
|
|
|
//define 'define' to invoke the callbacks with Tone
|
2014-10-02 22:55:24 +00:00
|
|
|
root.ToneDefinedDefine = true;
|
|
|
|
root.define = function(){
|
2014-09-24 16:07:50 +00:00
|
|
|
//the last argument is the callback
|
|
|
|
var lastArg = arguments[arguments.length - 1];
|
|
|
|
//the first argument is the dependencies or name
|
|
|
|
if (typeof lastArg === "function"){
|
|
|
|
//if it's not the root, pass in the root
|
|
|
|
//as the parameter
|
|
|
|
lastArg(root.Tone);
|
|
|
|
}
|
|
|
|
};
|
2014-10-02 22:55:24 +00:00
|
|
|
}
|
|
|
|
} (this));
|
|
|
|
|