dat.gui/elements/shim.js

46 lines
754 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 ) {
2014-09-09 20:19:48 +00:00
<<<<<<< HEAD
2014-09-08 22:01:19 +00:00
'use strict';
2014-09-09 20:18:15 +00:00
2014-09-09 20:19:48 +00:00
||||||| merged common ancestors
'use strict';
=======
>>>>>>> 8d86460ebde6d3dda4dec6e7783f0223fca59d00
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 );