Skip to content

Unlock custom brushes, natural fill effects and intuitive hatching in p5.js

Update README.md

Alejandroa4634d1502d0
diff --git a/README.md b/README.md
index 190bd3b..4773bbe 100644
--- a/README.md
+++ b/README.md
@@ -157,10 +157,23 @@ Vector Fields allow for dynamic control over brush stroke behavior, enabling the
Functions for managing brush behaviors and properties.
+- `brush.box()`
+ - **Description**: Retrieves an array containing the unique names of all available brushes. This function is useful for accessing the variety of brushes included in the library, which range from different pencil types to markers and specialized brushes like the hatch brush. Of course, the function will also return the custom brushes you've created.
+ - **Parameters**: None.
+ - **Returns**: `Array<string>` - An array listing the names of all brushes.
+ - **Default Brushes**: The library includes a default set of 11 brushes: `2B`, `HB`, `2H`, `cpencil`, `pen`, `rotring`, `spray`, `marker`, `marker2`, `charcoal`, and `hatch_brush` (for clean hatching).
+ - **Usage**:
+ ```javascript
+ // Retrieve a list of all available brush names
+ let brushes = brush.box();
+ console.log(brushes); // Logs the array of brush names
+ ```
+ `brush.box()` allows you to explore and select from the various brushes, facilitating the choice of the appropriate brush for different artistic needs.
+
+
- `disableBrush()`
- Disables the stroke for subsequent drawing operations.
-- `listOfBrushes()`
- - Retrieves a list of all available brush names.
+
### Geometry