diff --git a/Examples/AdvancedEffects/src/Intro.js b/Examples/AdvancedEffects/src/Intro.js index d24fe15..e43480c 100644 --- a/Examples/AdvancedEffects/src/Intro.js +++ b/Examples/AdvancedEffects/src/Intro.js @@ -73,54 +73,6 @@ class Intro extends React.Component { ; } - draw () { - /* - const {time, fps} = this.props; - const ctx = this.ctx; - const { width, height } = ctx.canvas; - ctx.clearRect(0, 0, width, height); - - let x, y; - - x = width / 2; - y = height / 2 - 20; - ctx.textBaseline = "middle"; - ctx.textAlign = "center"; - - ctx.font = "normal 80px Verdana"; - ctx.fillStyle = "#00BDF3"; - ctx.fillText("GL REACT", x, y); - - x = 20; - y = height - 40; - - ctx.font = "normal 28px Verdana"; - ctx.textBaseline = "middle"; - ctx.textAlign = "left"; - - if (time%1 < 0.6) { - ctx.fillStyle = "#00FF66"; - ctx.beginPath(); - ctx.arc(x, y, 12, 0, 2*Math.PI); - ctx.fill(); - } - - x += 26; - - ctx.fillStyle = "#00FF66"; - ctx.fillText(time.toFixed(2)+"s", x, y); - - x += width/5; - - ctx.fillStyle = "#fff"; - ctx.fillText(fps.toFixed(0)+" fps", x, y); - - x += width/5; - - ctx.fillStyle = "#999"; - ctx.fillText("text drawn with ", x, y); - */ - } } module.exports = Intro; diff --git a/README.md b/README.md index fd5f980..d9f07dd 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,13 @@ WebGL bindings for react to implement complex graphics and image effects, in VDO See also: [`gl-react-native`](https://github.com/ProjectSeptemberInc/gl-react-native). +## Examples + +Open [Examples page](http://projectseptemberinc.github.io/gl-react/) and [read the code](https://github.com/ProjectSeptemberInc/gl-react/tree/master/Examples). + +- [SpringCursor](https://github.com/ProjectSeptemberInc/gl-react/tree/master/Examples/SpringCursor) shows usage with [`react-motion`](https://github.com/chenglou/react-motion). +- [AdvancedEffects' Intro](https://github.com/ProjectSeptemberInc/gl-react/blob/master/Examples/AdvancedEffects/src/Intro.js) shows usage with [`react-canvas`](https://github.com/Flipboard/react-canvas). + ### HelloGL Gist ```js @@ -35,6 +42,7 @@ class HelloGL extends React.Component { ![](https://cloud.githubusercontent.com/assets/211411/9386550/432492c6-475c-11e5-9328-f3d5187298c1.jpg) + ## Installation ``` @@ -59,7 +67,3 @@ Instead of adopting React Native `{uri: "http://..."}` format, you can simply se Only one child is supported per `GL.Target` and it MUST be either: an ``, a `