dat.gui/elements/shim.js

39 lines
628 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
2014-09-08 22:01:19 +00:00
var Gui = function() {
2014-09-09 20:18:15 +00:00
this.vars = {};
2014-09-08 22:01:19 +00:00
};
Gui.ready = function( fnc ) {
fnc();
};
2014-09-09 20:18:15 +00:00
Gui.prototype.var = function( name, value ) {
2014-09-08 22:01:19 +00:00
2014-09-09 20:18:15 +00:00
this.vars[ name ] = value;
2014-09-08 22:01:19 +00:00
return controllerShim;
};
Gui.prototype.add = function( object, path ) {
2014-09-09 20:18:15 +00:00
2014-09-08 22:01:19 +00:00
return controllerShim;
};
var identity = function() { return this; };
var controllerShim = {
on: identity
};
scope.Gui = Gui;
2014-09-09 20:18:15 +00:00
} )( this );