added updated examples w/ images
This commit is contained in:
parent
7893eca2e2
commit
e4ff207bd8
48
README.md
48
README.md
|
@ -98,55 +98,17 @@ Returns a random int between 0 and n. Specifying a value is optional. If no inpu
|
|||
|
||||
## Examples
|
||||
|
||||
*More examples in the examples folder*
|
||||
See examples folder.
|
||||
|
||||
### Backwards box
|
||||
![simple logo example](examples/simple-logo/simple-logo.jpg)
|
||||
|
||||
```
|
||||
penColor('orange');
|
||||
penSize(3);
|
||||
|
||||
left(90);
|
||||
back(100);
|
||||
left(90);
|
||||
back(100);
|
||||
left(90);
|
||||
back(100);
|
||||
left(90);
|
||||
back(100);
|
||||
```
|
||||
|
||||
### Random Walk (with javascript for-loop)
|
||||
|
||||
```
|
||||
for (let i = 0; i < 100; i++){
|
||||
right(randint());
|
||||
forward(randint());
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Forward, with color transparency
|
||||
|
||||
In this example, the last parameter inside penColor's color is the alpha transparency amount. Like the individual red, green, blue colors specified before it, this can be a number from 0 to 255. The lower the number, the more transparent.
|
||||
|
||||
```
|
||||
penSize(20);
|
||||
|
||||
penColor(color(100,0,100,50));
|
||||
forward(100);
|
||||
|
||||
penColor(color(100,0,100,150));
|
||||
forward(100);
|
||||
|
||||
penColor(color(100,0,100,250));
|
||||
forward(100);
|
||||
```
|
||||
![color walker](examples/color-walker/color-walker.jpg)
|
||||
|
||||
![retro random walker](examples/retro-random-walker/retro-random-walker.jpg)
|
||||
|
||||
### Updates
|
||||
|
||||
##### 2021-02-07
|
||||
##### 2021-02-14
|
||||
|
||||
- Added onscreen console print of commands (on by default) and noConsole() to turn off
|
||||
- Added more example files
|
||||
|
|
Loading…
Reference in New Issue