Unlock custom brushes, natural fill effects and intuitive hatching in p5.js
New folder structure
Alejandro6402cac6d142
diff --git a/.gitignore b/.gitignoredeleted file mode 100644index c96066d..0000000--- a/.gitignore+++ /dev/null@@ -1 +0,0 @@-/.DS_Store\ No newline at end of filediff --git a/p5.min.js b/dependencies/p5.min.jssimilarity index 100%rename from p5.min.jsrename to dependencies/p5.min.jsdiff --git a/spectral.min.js b/dependencies/spectral.min.jssimilarity index 100%rename from spectral.min.jsrename to dependencies/spectral.min.jsdiff --git a/example.html b/example.htmlnew file mode 100644index 0000000..68675de--- /dev/null+++ b/example.html@@ -0,0 +1,13 @@+<!DOCTYPE html>+<html>+ <head>+ <title>p5.brush.js Example</title>+ <script src="./dependencies/p5.min.js"></script>+ <script src="./dependencies/spectral.min.js"></script>+ <script src="./p5.brush.js"></script>+ <link rel="stylesheet" href="./style.css">+ </head>+ <body>+ <script src="./sketch.js"></script>+ </body>+</html>\ No newline at end of filediff --git a/index.html b/index.htmldeleted file mode 100644index 3f39750..0000000--- a/index.html+++ /dev/null@@ -1,13 +0,0 @@-<!DOCTYPE html>-<html>- <head>- <title>Brushbox - Examples</title>- <script src="./p5.min.js"></script>- <script src="./spectral.min.js"></script>- <script src="./p5.brush.js"></script>- <link rel="stylesheet" href="./style.css">- </head>- <body>- <script src="./examples.js"></script>- </body>-</html>\ No newline at end of filediff --git a/examples.js b/sketch.jssimilarity index 99%rename from examples.jsrename to sketch.jsindex fe17821..c33e7a8 100644--- a/examples.js+++ b/sketch.js@@ -56,7 +56,7 @@ brush.add("watercolor", {curve: function (x) {return 1-x}, // If "custom", define the curve function with a curve equation from x = 0 to x = 1, returning values from 0 to 1min_max: [0.5,1.2] // For both cases, define min and max pressure (reverse for inverted presure)},- // if you select the a custom type brush, define the tip geometry here. Use 0,0 as center of tip. If not, you can remove these lines.+ // if you select the a custom type brush, define the tip geometry here. Use 0,0 as center of tip. If not, you can remove these lines.tip: function () {B.mask.rotate(45),B.mask.rect(-1.5,-1.5,3,3),B.mask.rect(1.5,1.5,1,1); // in this example, the tip would be two squares, rotated 45 degrees},