From d360cd9e67f944354ede851c3bd0980d9ea628d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Wed, 23 Sep 2015 10:42:25 +0200 Subject: [PATCH] example with latest GL.Uniform syntax --- Examples/Simple/Colorify.js | 10 +++++++--- Examples/Simple/index.html | 2 +- Examples/Simple/index.js | 15 +++++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Examples/Simple/Colorify.js b/Examples/Simple/Colorify.js index 34a0418..368b90c 100644 --- a/Examples/Simple/Colorify.js +++ b/Examples/Simple/Colorify.js @@ -27,14 +27,18 @@ void main () { class Colorify extends React.Component { render () { - const { width, height, children: image, colorScale, legend } = this.props; + const { width, height, children: image, colorScale, legend, disableLinearInterpolation } = this.props; return ; + > + + {colorScale} + + ; } } diff --git a/Examples/Simple/index.html b/Examples/Simple/index.html index 69f0a95..bb9a71c 100644 --- a/Examples/Simple/index.html +++ b/Examples/Simple/index.html @@ -11,7 +11,7 @@ #container > * { margin: 0px auto; } - input { + input[type=range], input[type=text] { width: 100%; margin: 5px 0; } diff --git a/Examples/Simple/index.js b/Examples/Simple/index.js index 8dd8d45..221a502 100644 --- a/Examples/Simple/index.js +++ b/Examples/Simple/index.js @@ -20,7 +20,8 @@ class Simple extends React.Component { progress: 0.5, factor: 1, text: "leading the pack", - colorScale: "Spectral" + colorScale: "Spectral", + disableLinearInterpolation: false }; } @@ -32,7 +33,8 @@ class Simple extends React.Component { text, progress, factor, - colorScale + colorScale, + disableLinearInterpolation } = this.state; return
@@ -76,6 +78,7 @@ class Simple extends React.Component { onValueChange={hue => this.setState({ hue })} /> this.setState({ text: e.target.value })} value={text} /> @@ -128,12 +131,16 @@ class Simple extends React.Component {

9. Texture from array

- + http://i.imgur.com/iPKTONG.jpg +
@@ -171,7 +178,7 @@ const styles = { fontSize: "20px" }, select: { - marginTop: "4px", + margin: "4px 0", width: "100%" } };