mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
merge
This commit is contained in:
commit
407abe299c
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "polymer-gui",
|
"name": "dat.gui",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Attempt at revamping dat.gui with Polymer.",
|
"description": "Attempt at revamping dat.gui with Polymer.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -19,11 +19,6 @@ var e,f,g,h=b.type;if("load"===h&&!b.bubbles){var i=c;i instanceof Q.Document&&(
|
|||||||
<!-- src -->
|
<!-- src -->
|
||||||
<script>(function( scope ) {
|
<script>(function( scope ) {
|
||||||
|
|
||||||
var ready = false;
|
|
||||||
var readyHandlers = [];
|
|
||||||
|
|
||||||
var controllers = {};
|
|
||||||
|
|
||||||
var Gui = function( params ) {
|
var Gui = function( params ) {
|
||||||
|
|
||||||
if ( !ready ) {
|
if ( !ready ) {
|
||||||
@ -48,6 +43,8 @@ var e,f,g,h=b.type;if("load"===h&&!b.bubbles){var i=c;i instanceof Q.Document&&(
|
|||||||
// Register custom controllers
|
// Register custom controllers
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
var controllers = {};
|
||||||
|
|
||||||
Gui.register = function( elementName, test ) {
|
Gui.register = function( elementName, test ) {
|
||||||
|
|
||||||
controllers[ elementName ] = test;
|
controllers[ elementName ] = test;
|
||||||
@ -78,6 +75,9 @@ var e,f,g,h=b.type;if("load"===h&&!b.bubbles){var i=c;i instanceof Q.Document&&(
|
|||||||
// Gui ready handler ... * shakes fist at polymer *
|
// Gui ready handler ... * shakes fist at polymer *
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
var ready = false;
|
||||||
|
var readyHandlers = [];
|
||||||
|
|
||||||
document.addEventListener( 'polymer-ready', function() {
|
document.addEventListener( 'polymer-ready', function() {
|
||||||
|
|
||||||
ready = true;
|
ready = true;
|
||||||
@ -654,6 +654,10 @@ Polymer('gui-row', {
|
|||||||
font: 10px 'Lucida Grande', sans-serif;
|
font: 10px 'Lucida Grande', sans-serif;
|
||||||
color: #eee;
|
color: #eee;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 6px 8px;
|
padding: 6px 8px;
|
||||||
@ -879,31 +883,34 @@ Polymer('controller-base', {
|
|||||||
this.object = object;
|
this.object = object;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
|
|
||||||
if ( this._observer ) {
|
|
||||||
this._observer.close();
|
|
||||||
delete this._observer;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _this = this;
|
this.bind('value', new PathObserver(this.object, this.path));
|
||||||
|
|
||||||
this._observer = new PathObserver( this.object, this.path );
|
// if ( this._observer ) {
|
||||||
this._observer.open( function( newValue ) {
|
// this._observer.close();
|
||||||
|
// delete this._observer;
|
||||||
|
// }
|
||||||
|
|
||||||
_this.value = newValue;
|
// var _this = this;
|
||||||
|
|
||||||
} );
|
// this._observer = new PathObserver( this.object, this.path );
|
||||||
|
// this._observer.open( function( newValue ) {
|
||||||
|
|
||||||
this.value = this.object[ this.path ];
|
// _this.value = newValue;
|
||||||
|
|
||||||
|
// } );
|
||||||
|
|
||||||
|
// this.value = this.object[ this.path ];
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
valueChanged: function() {
|
valueChanged: function() {
|
||||||
|
|
||||||
if ( this._observer ) {
|
// if ( this._observer ) {
|
||||||
|
|
||||||
Path.get( this.path ).setValueFrom( this.object, this.value );
|
// Path.get( this.path ).setValueFrom( this.object, this.value );
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.update();
|
this.update();
|
||||||
|
|
||||||
@ -943,7 +950,7 @@ Polymer('controller-base', {
|
|||||||
|
|
||||||
});</script>
|
});</script>
|
||||||
|
|
||||||
<polymer-element name="controller-base" attributes="object path" assetpath="../elements/controller-base/"></polymer-element>
|
<polymer-element name="controller-base" attributes="object path value" assetpath="../elements/controller-base/"></polymer-element>
|
||||||
|
|
||||||
<script>/*
|
<script>/*
|
||||||
|
|
||||||
|
@ -14,9 +14,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="readme"><!-- Replaced with contents of README.md --></div>
|
<!-- Copied from README.md -->
|
||||||
|
<div id="readme"></div>
|
||||||
<script src="../underscore/underscore.js"></script>
|
|
||||||
|
|
||||||
<script src="docs/main.js"></script>
|
<script src="docs/main.js"></script>
|
||||||
<script src="docs/examples.js"></script>
|
<script src="docs/examples.js"></script>
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
(function( scope ) {
|
(function( scope ) {
|
||||||
|
|
||||||
var ready = false;
|
|
||||||
var readyHandlers = [];
|
|
||||||
|
|
||||||
var controllers = {};
|
|
||||||
|
|
||||||
var Gui = function( params ) {
|
var Gui = function( params ) {
|
||||||
|
|
||||||
if ( !ready ) {
|
if ( !ready ) {
|
||||||
@ -29,6 +24,8 @@
|
|||||||
// Register custom controllers
|
// Register custom controllers
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
var controllers = {};
|
||||||
|
|
||||||
Gui.register = function( elementName, test ) {
|
Gui.register = function( elementName, test ) {
|
||||||
|
|
||||||
controllers[ elementName ] = test;
|
controllers[ elementName ] = test;
|
||||||
@ -59,6 +56,9 @@
|
|||||||
// Gui ready handler ... * shakes fist at polymer *
|
// Gui ready handler ... * shakes fist at polymer *
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
var ready = false;
|
||||||
|
var readyHandlers = [];
|
||||||
|
|
||||||
document.addEventListener( 'polymer-ready', function() {
|
document.addEventListener( 'polymer-ready', function() {
|
||||||
|
|
||||||
ready = true;
|
ready = true;
|
||||||
|
@ -26,13 +26,14 @@ Polymer('controller-base', {
|
|||||||
this.object = object;
|
this.object = object;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
|
|
||||||
|
|
||||||
|
this.bind('value', new PathObserver(this.object, this.path));
|
||||||
|
|
||||||
// if ( this._observer ) {
|
// if ( this._observer ) {
|
||||||
// this._observer.close();
|
// this._observer.close();
|
||||||
// delete this._observer;
|
// delete this._observer;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.bind('value', new PathObserver(this.object, this.path));
|
|
||||||
|
|
||||||
// var _this = this;
|
// var _this = this;
|
||||||
|
|
||||||
// this._observer = new PathObserver( this.object, this.path );
|
// this._observer = new PathObserver( this.object, this.path );
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.open-false {
|
&.open-false {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,6 @@ gulp.task( 'default', function() {
|
|||||||
gulp.watch( [ paths.js, paths.main, paths.html ], [ 'vulcanize', 'test' ] );
|
gulp.watch( [ paths.js, paths.main, paths.html ], [ 'vulcanize', 'test' ] );
|
||||||
gulp.watch( [ 'README.md', 'docs/*' ], [ 'docs' ] );
|
gulp.watch( [ 'README.md', 'docs/*' ], [ 'docs' ] );
|
||||||
|
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<!-- Copied from README.md -->
|
||||||
<div id="readme"><h1 id="dat-gui">dat-gui</h1>
|
<div id="readme"><h1 id="dat-gui">dat-gui</h1>
|
||||||
<p>dat-gui creates an interface that you can use to modify variables with very little code. </p>
|
<p>dat-gui creates an interface that you can use to modify variables with very little code. </p>
|
||||||
<h3 id="basic-usage">Basic Usage</h3>
|
<h3 id="basic-usage">Basic Usage</h3>
|
||||||
@ -182,9 +183,7 @@ Gui.register( 'controller-number', function( value ) {
|
|||||||
<pre><code class="lang-html"><script src="gui.js"></script>
|
<pre><code class="lang-html"><script src="gui.js"></script>
|
||||||
<script src="gui-three.js"></script>
|
<script src="gui-three.js"></script>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<!-- Replaced with contents of README.md --></div>
|
</div>
|
||||||
|
|
||||||
<script src="../underscore/underscore.js"></script>
|
|
||||||
|
|
||||||
<script src="docs/main.js"></script>
|
<script src="docs/main.js"></script>
|
||||||
<script src="docs/examples.js"></script>
|
<script src="docs/examples.js"></script>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "polymer-gui",
|
"name": "dat.gui",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "^3.8.7",
|
"gulp": "^3.8.7",
|
||||||
|
Loading…
Reference in New Issue
Block a user