From 318f3260b12ed44e2f09ff5ab573e887df6318ff Mon Sep 17 00:00:00 2001 From: mithru - desktop Date: Thu, 9 Aug 2018 17:54:17 -0400 Subject: [PATCH] added proposed way of adding examples --- examples/ExampleStyled/basicCanvas.js | 8 ++++++++ examples/ExampleStyled/basicShapes.js | 16 ++++++++++++++++ examples/ExampleStyled/index.html | 7 ++++++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 examples/ExampleStyled/basicCanvas.js create mode 100644 examples/ExampleStyled/basicShapes.js diff --git a/examples/ExampleStyled/basicCanvas.js b/examples/ExampleStyled/basicCanvas.js new file mode 100644 index 0000000..fd4dbf6 --- /dev/null +++ b/examples/ExampleStyled/basicCanvas.js @@ -0,0 +1,8 @@ +function setup() { + // try changing the values here + createCanvas(300,200); + background(0); +} + +function draw() { +} diff --git a/examples/ExampleStyled/basicShapes.js b/examples/ExampleStyled/basicShapes.js new file mode 100644 index 0000000..456f9fa --- /dev/null +++ b/examples/ExampleStyled/basicShapes.js @@ -0,0 +1,16 @@ +function setup() { + createCanvas(300,200); + background(255); +} + +function draw() { + // try changing the values of each shape and their fill() values + fill(0); + ellipse(50,50,20,30); + fill(255,0,0); + rect(150,50,100,50); + fill(0,255,0); + triangle(50,150,100,150,100,100); + fill(0,0,255); + quad(200,150,250,150,250,180,200,190); +} diff --git a/examples/ExampleStyled/index.html b/examples/ExampleStyled/index.html index 257e524..e3fee5e 100644 --- a/examples/ExampleStyled/index.html +++ b/examples/ExampleStyled/index.html @@ -20,7 +20,12 @@
+ + - \ No newline at end of file +