mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Merge branch 'polymer' of github.com:dataarts/dat.gui into polymer
This commit is contained in:
commit
979b54f572
5
TODO.md
5
TODO.md
@ -3,6 +3,11 @@ BUILD
|
|||||||
- [x] single import
|
- [x] single import
|
||||||
- [ ] browsersync
|
- [ ] browsersync
|
||||||
|
|
||||||
|
REFACTOR
|
||||||
|
|
||||||
|
- [ ] controller-* => gui-*
|
||||||
|
- [ ] gui.define* => gui.var*
|
||||||
|
|
||||||
PARITY
|
PARITY
|
||||||
|
|
||||||
- [ ] folders
|
- [ ] folders
|
||||||
|
1
build/gui.shim.js
Normal file
1
build/gui.shim.js
Normal file
@ -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);
|
39
elements/shim.js
Normal file
39
elements/shim.js
Normal file
@ -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 );
|
@ -6,8 +6,8 @@
|
|||||||
<title>dat-gui kitchen sink</title>
|
<title>dat-gui kitchen sink</title>
|
||||||
|
|
||||||
|
|
||||||
<!-- <script src="../build/gui.js"></script> -->
|
<script src="../build/gui.js"></script>
|
||||||
<link rel="import" href="../gui.html">
|
<!-- <link rel="import" href="../gui.html"> -->
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||||
|
|
||||||
|
16
gulpfile.js
16
gulpfile.js
@ -11,10 +11,11 @@ var paths = {
|
|||||||
lint: [ 'gulpfile.js', 'elements/**/*.js' ],
|
lint: [ 'gulpfile.js', 'elements/**/*.js' ],
|
||||||
test: [ 'build/gui.js', 'tests/*.js' ],
|
test: [ 'build/gui.js', 'tests/*.js' ],
|
||||||
clean: [ 'build/*', '**/*.css' ],
|
clean: [ 'build/*', '**/*.css' ],
|
||||||
docs: [ 'README.md', 'docs/*' ]
|
docs: [ 'README.md', 'docs/*' ],
|
||||||
|
shim: [ 'elements/shim.js' ]
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task( 'default', [ 'docs', 'lint', 'build' ] );
|
gulp.task( 'default', [ 'docs', 'lint', 'shim', 'build' ] );
|
||||||
|
|
||||||
gulp.task( 'watch', [ 'default' ], function() {
|
gulp.task( 'watch', [ 'default' ], function() {
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ gulp.task( 'watch', [ 'default' ], function() {
|
|||||||
gulp.watch( paths.docs, [ 'docs' ] );
|
gulp.watch( paths.docs, [ 'docs' ] );
|
||||||
gulp.watch( paths.lint, [ 'lint' ] );
|
gulp.watch( paths.lint, [ 'lint' ] );
|
||||||
gulp.watch( paths.build, [ 'build' ] );
|
gulp.watch( paths.build, [ 'build' ] );
|
||||||
|
gulp.watch( paths.shim, [ 'shim' ] );
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@ -76,13 +78,21 @@ gulp.task( 'jshint', function() {
|
|||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
gulp.task( 'css', function() {
|
gulp.task( 'css', function() {
|
||||||
|
|
||||||
return css( 'elements/**/*.styl', 'elements' );
|
return css( 'elements/**/*.styl', 'elements' );
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
gulp.task( 'shim', function() {
|
||||||
|
|
||||||
|
return gulp.src( paths.shim )
|
||||||
|
.pipe( $.uglify() )
|
||||||
|
.pipe( $.rename( 'gui.shim.js' ) )
|
||||||
|
.pipe( gulp.dest( 'build' ) );
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
gulp.task( 'docs', function() {
|
gulp.task( 'docs', function() {
|
||||||
|
|
||||||
css( 'docs/*.styl', 'docs' );
|
css( 'docs/*.styl', 'docs' );
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
"gulp-replace": "^0.4.0",
|
"gulp-replace": "^0.4.0",
|
||||||
"gulp-rimraf": "^0.1.0",
|
"gulp-rimraf": "^0.1.0",
|
||||||
"gulp-stylus": "^1.3.0",
|
"gulp-stylus": "^1.3.0",
|
||||||
|
"gulp-uglify": "^1.0.1",
|
||||||
"gulp-vulcanize": "^1.0.0",
|
"gulp-vulcanize": "^1.0.0",
|
||||||
"gulp-watch": "^0.6.9",
|
"gulp-watch": "^0.6.9",
|
||||||
"jshint-stylish": "^0.4.0",
|
"jshint-stylish": "^0.4.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user