dat.gui/elements/shim.js

41 lines
555 B
JavaScript
Raw Normal View History

2014-09-08 22:01:19 +00:00
// Use gui.shim.js in production when you want to use dat.gui to recall values without any of the interface.
( function( scope ) {
'use strict';
2014-09-09 20:18:15 +00:00
var Gui = function() {
2014-09-08 22:01:19 +00:00
this.vars = {};
2014-09-08 22:01:19 +00:00
};
2014-09-08 22:01:19 +00:00
Gui.ready = function( fnc ) {
2014-09-08 22:01:19 +00:00
fnc();
2014-09-08 22:01:19 +00:00
};
2014-09-08 22:01:19 +00:00
Gui.prototype.var = function( name, value ) {
2014-09-08 22:01:19 +00:00
this.vars[ name ] = value;
return controllerShim;
2014-09-08 22:01:19 +00:00
};
2014-09-08 22:01:19 +00:00
Gui.prototype.add = function( object, path ) {
2014-09-09 20:18:15 +00:00
return controllerShim;
2014-09-08 22:01:19 +00:00
};
2014-09-08 22:01:19 +00:00
var identity = function() {
return this;
};
2014-09-08 22:01:19 +00:00
var controllerShim = {
on: identity
};
2014-09-08 22:01:19 +00:00
scope.Gui = Gui;
2014-09-08 22:01:19 +00:00
})( this );