diff --git a/build/gui.shim.js b/build/gui.shim.js new file mode 100644 index 0000000..95a09d2 --- /dev/null +++ b/build/gui.shim.js @@ -0,0 +1 @@ +!function(n){"use strict";var t=function(){this.defined={}};t.ready=function(n){n()},t.prototype.define=function(n,t){return this.defined[n]=t,e},t.prototype.add=function(){return e};var i=function(){return this},e={on:i};n.Gui=t}(this); \ No newline at end of file diff --git a/elements/shim.js b/elements/shim.js new file mode 100644 index 0000000..d03f2bd --- /dev/null +++ b/elements/shim.js @@ -0,0 +1,39 @@ +// 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'; + + var Gui = function() { + + this.defined = {}; + + }; + + Gui.ready = function( fnc ) { + + fnc(); + + }; + + Gui.prototype.define = function( name, value ) { + + this.defined[ name ] = value; + return controllerShim; + + }; + + Gui.prototype.add = function( object, path ) { + + return controllerShim; + + }; + + var identity = function() { return this; }; + + var controllerShim = { + on: identity + }; + + scope.Gui = Gui; + +} )( this ); \ No newline at end of file