mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-08 18:08:46 +00:00
15 lines
459 B
GLSL
15 lines
459 B
GLSL
|
(function (root) {
|
||
|
if (typeof define !== "function" &&
|
||
|
typeof root.Tone === "function") {
|
||
|
//define 'define' to invoke the callbacks with Tone
|
||
|
var define = function(){
|
||
|
//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);
|
||
|
}
|
||
|
};
|
||
|
}
|