mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
built as single js proof of concept
This commit is contained in:
parent
90e0776842
commit
c36904a071
@ -7,7 +7,10 @@ dat-gui creates an interface that you can use to modify variables with very litt
|
|||||||
Download the [minified library]( todo ) and include it in your html.
|
Download the [minified library]( todo ) and include it in your html.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="gui.js"></script>
|
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/platform.js"></script>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/dat-gui/r3/gui.js"></script>
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Create controllers by adding objects and their properties. dat-gui chooses a controller based on the variable's initial value.
|
Create controllers by adding objects and their properties. dat-gui chooses a controller based on the variable's initial value.
|
||||||
|
1509
build/gui.html
1509
build/gui.html
File diff suppressed because one or more lines are too long
@ -8,6 +8,7 @@ border-radius = height;
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding-left: padding
|
padding-left: padding
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#switch-track {
|
#switch-track {
|
||||||
@ -33,6 +34,9 @@ border-radius = height;
|
|||||||
#switch-knob {
|
#switch-knob {
|
||||||
transform: translate3d( width - height, 0, 0 );
|
transform: translate3d( width - height, 0, 0 );
|
||||||
}
|
}
|
||||||
|
&:hover #switch-knob {
|
||||||
|
transform: translate3d( width - height, 0, 0 ) scale( 1.5 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#text {
|
#text {
|
||||||
|
@ -5,8 +5,15 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>dat-gui kitchen sink</title>
|
<title>dat-gui kitchen sink</title>
|
||||||
|
|
||||||
<script src="../../platform/platform.js"></script>
|
|
||||||
<link rel="import" href="../build/gui.html">
|
<!-- // <script src="../../platform/platform.js"></script> -->
|
||||||
|
|
||||||
|
<!-- <link rel="import" href="../build/gui.html"> -->
|
||||||
|
<script src="../build/gui.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body {
|
body {
|
||||||
|
2
gui.html
2
gui.html
@ -1,4 +1,4 @@
|
|||||||
<!-- <script src="../platform/platform.js"></script> -->
|
<script src="../platform/platform.js"></script>
|
||||||
|
|
||||||
<!-- src -->
|
<!-- src -->
|
||||||
<script src="elements/Gui.js"></script>
|
<script src="elements/Gui.js"></script>
|
||||||
|
18
gulpfile.js
18
gulpfile.js
@ -55,8 +55,8 @@ gulp.task( 'vulcanize', function() {
|
|||||||
gulp.src( paths.main )
|
gulp.src( paths.main )
|
||||||
.pipe( vulcan( {
|
.pipe( vulcan( {
|
||||||
dest: 'build',
|
dest: 'build',
|
||||||
inline: true
|
inline: true,
|
||||||
// strip: true
|
strip: true
|
||||||
} ) );
|
} ) );
|
||||||
|
|
||||||
} );
|
} );
|
||||||
@ -83,6 +83,20 @@ gulp.task( 'build', [
|
|||||||
'docs'
|
'docs'
|
||||||
] );
|
] );
|
||||||
|
|
||||||
|
|
||||||
|
gulp.task( 'hypervulcanize', function() {
|
||||||
|
|
||||||
|
// - styles from layout.html
|
||||||
|
// styles
|
||||||
|
|
||||||
|
|
||||||
|
// platform.js
|
||||||
|
// polymer.html
|
||||||
|
// - polymer.js
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
gulp.task( 'default', function() {
|
gulp.task( 'default', function() {
|
||||||
|
|
||||||
gulp.watch( [ paths.css ], [ 'css', 'vulcanize' ] );
|
gulp.watch( [ paths.css ], [ 'css', 'vulcanize' ] );
|
||||||
|
@ -19,7 +19,9 @@
|
|||||||
<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>
|
||||||
<p>Download the <a href="todo">minified library</a> and include it in your html.</p>
|
<p>Download the <a href="todo">minified library</a> and include it in your html.</p>
|
||||||
<pre><code class="lang-html"><script src="gui.js"></script>
|
<pre><code class="lang-html">
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/platform.js"></script>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/dat-gui/r3/gui.js"></script>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Create controllers by adding objects and their properties. dat-gui chooses a controller based on the variable's initial value.</p>
|
<p>Create controllers by adding objects and their properties. dat-gui chooses a controller based on the variable's initial value.</p>
|
||||||
<pre><code class="lang-javascript">var gui = new Gui();
|
<pre><code class="lang-javascript">var gui = new Gui();
|
||||||
|
Loading…
Reference in New Issue
Block a user