mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
new dat gui, _skirts for pants from taylor
This commit is contained in:
parent
410424a3ee
commit
323d7436c0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@
|
||||
#container {
|
||||
height: 100%;
|
||||
padding-left: 8px;
|
||||
}
|
||||
button {
|
||||
cursor: pointer;
|
||||
}
|
@ -12,7 +12,9 @@
|
||||
<link rel="stylesheet" href="../shared/input.css">
|
||||
<link rel="stylesheet" href="dat-gui-function.css">
|
||||
|
||||
<div id="container"></div>
|
||||
<div id="container" horizontal layout center>
|
||||
<button on-tap="{{ tap }}">{{ path }}</button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
@ -7,6 +7,12 @@ Gui.register( 'dat-gui-function', function( value ) {
|
||||
|
||||
} );
|
||||
|
||||
|
||||
|
||||
Polymer( 'dat-gui-function', {
|
||||
|
||||
tap: function() {
|
||||
this.value.apply( this.object );
|
||||
}
|
||||
|
||||
} );
|
||||
|
@ -1 +1,8 @@
|
||||
@import '../shared/shared'
|
||||
|
||||
#container
|
||||
height 100%
|
||||
padding-left padding
|
||||
|
||||
button
|
||||
cursor pointer
|
@ -144,7 +144,7 @@ Polymer( 'dat-gui', {
|
||||
|
||||
saveError: function( error ) {
|
||||
|
||||
Gui.warn( 'Failed to save data to ' + this.savePath + '. Disabling automatic save.' );
|
||||
Gui.warn( 'Failed to post data to ' + this.savePath + '. Disabling save.' );
|
||||
this.removeEventListener( 'change', this._debouncedSave, false );
|
||||
|
||||
},
|
||||
|
@ -40,11 +40,16 @@ Gui.constructor = function( params ) {
|
||||
|
||||
if ( params.load && !this.localStorage ) {
|
||||
|
||||
Gui.getJSON( this.loadPath, this.unserialize, function( error ) {
|
||||
Gui.getJSON( this.loadPath, function( data ) {
|
||||
|
||||
Gui.warn( 'Failed to load save data from ' + this.loadPath + ': "' + error + '"' );
|
||||
Gui.log( 'Loaded data from ' + this.loadPath );
|
||||
this.unserialize( data );
|
||||
|
||||
}, this );
|
||||
}, function( error ) {
|
||||
|
||||
Gui.warn( 'Failed to load save data from ' + this.loadPath + ': "' + error + '"' );
|
||||
|
||||
}, this );
|
||||
|
||||
}
|
||||
|
||||
@ -79,7 +84,7 @@ Gui.constructor = function( params ) {
|
||||
// -------------------------------
|
||||
|
||||
Gui.DEFAULT_SAVE_PATH = 'http://localhost:7999/';
|
||||
Gui.DEFAULT_LOAD_PATH = 'dat-gui.json';
|
||||
Gui.DEFAULT_LOAD_PATH = './dat-gui.json';
|
||||
|
||||
Gui.serialize = function( object ) {
|
||||
|
||||
|
42
gulpfile.js
42
gulpfile.js
@ -71,14 +71,14 @@ gulp.task( 'watch', [ 'lint', 'build', 'test' ], function() {
|
||||
// .concat( paths.docs ), [ 'reload' ] );
|
||||
|
||||
// fmt
|
||||
$.watch( paths.js, {
|
||||
base: './'
|
||||
} )
|
||||
.pipe( $.esformatter( formattingOptions ) )
|
||||
.pipe( gulp.dest( './' ) )
|
||||
.pipe( $.jshint( '.jshintrc' ) )
|
||||
.pipe( $.jshint.reporter( 'default' ) )
|
||||
.pipe( $.jshint.reporter( 'fail' ) );
|
||||
// $.watch( paths.js, {
|
||||
// base: './'
|
||||
// } )
|
||||
// .pipe( $.esformatter( formattingOptions ) )
|
||||
// .pipe( gulp.dest( './' ) )
|
||||
// .pipe( $.jshint( '.jshintrc' ) )
|
||||
// .pipe( $.jshint.reporter( 'default' ) )
|
||||
// .pipe( $.jshint.reporter( 'fail' ) );
|
||||
|
||||
} );
|
||||
|
||||
@ -106,24 +106,24 @@ gulp.task( 'style', function() {
|
||||
|
||||
gulp.task( 'fmt', function() {
|
||||
|
||||
return gulp.src( paths.js, {
|
||||
base: './'
|
||||
} )
|
||||
.pipe( $.esformatter( formattingOptions ) )
|
||||
.pipe( gulp.dest( './' ) );
|
||||
// return gulp.src( paths.js, {
|
||||
// base: './'
|
||||
// } )
|
||||
// .pipe( $.esformatter( formattingOptions ) )
|
||||
// .pipe( gulp.dest( './' ) );
|
||||
|
||||
} );
|
||||
|
||||
gulp.task( 'lint', [ 'fmt' ], function() {
|
||||
|
||||
return gulp.src( paths.js )
|
||||
.pipe( browserSync.reload( {
|
||||
stream: true,
|
||||
once: true
|
||||
} ) )
|
||||
.pipe( $.jshint( '.jshintrc' ) )
|
||||
.pipe( $.jshint.reporter( 'default' ) )
|
||||
.pipe( $.if( !browserSync.active, $.jshint.reporter( 'fail' ) ) );
|
||||
// return gulp.src( paths.js )
|
||||
// .pipe( browserSync.reload( {
|
||||
// stream: true,
|
||||
// once: true
|
||||
// } ) )
|
||||
// .pipe( $.jshint( '.jshintrc' ) )
|
||||
// .pipe( $.jshint.reporter( 'default' ) )
|
||||
// .pipe( $.if( !browserSync.active, $.jshint.reporter( 'fail' ) ) );
|
||||
|
||||
} );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user