Skip to content

Commit

Permalink
Plugin API changes, rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed May 21, 2013
1 parent fb82b9b commit 66a9546
Show file tree
Hide file tree
Showing 23 changed files with 455 additions and 1,851 deletions.
31 changes: 6 additions & 25 deletions build/latest/plugins/geometry/box.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,18 @@ SceneJS.Plugins.addPlugin(
new (function () {

this.getSource = function () {

var created;
var updated;

var configs = {};

var publish;
return {

onCreate:function (fn) {
created = fn;
},

onUpdate:function (fn) {
updated = fn;
subscribe:function (fn) {
publish = fn;
},

setConfigs:function (cfg) {
configs = cfg;
created(buildBox(cfg));
},

getConfigs:function () {
return configs;
},

destroy:function () {
configure:function (cfg) {
publish(build(cfg));
}
};
};

function buildBox(cfg) {
function build(cfg) {

var x = cfg.xSize || 1;
var y = cfg.ySize || 1;
Expand Down
Loading

0 comments on commit 66a9546

Please sign in to comment.