forked from unconed/threestrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.js
48 lines (33 loc) · 1011 Bytes
/
plugin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
THREE.Bootstrap.Plugins = {};
THREE.Bootstrap.Aliases = {};
THREE.Bootstrap.Plugin = function (options) {
this.options = _.defaults(options || {}, this.defaults);
}
THREE.Bootstrap.Plugin.prototype = {
listen: [],
defaults: {},
install: function (three) {
},
uninstall: function (three) {
},
////////
};
THREE.Binder.apply(THREE.Bootstrap.Plugin.prototype);
THREE.Api .apply(THREE.Bootstrap.Plugin.prototype);
THREE.Bootstrap.registerPlugin = function (name, spec) {
var ctor = function (options) {
THREE.Bootstrap.Plugin.call(this, options);
this.__name = name;
};
ctor.prototype = _.extend(new THREE.Bootstrap.Plugin(), spec);
THREE.Bootstrap.Plugins[name] = ctor;
}
THREE.Bootstrap.unregisterPlugin = function (name) {
delete THREE.Bootstrap.Plugins[name];
}
THREE.Bootstrap.registerAlias = function (name, plugins) {
THREE.Bootstrap.Aliases[name] = plugins;
}
THREE.Bootstrap.unregisterAlias = function (name) {
delete THREE.Bootstrap.Aliases[name];
}