Skip to content

Commit

Permalink
[Update] sort simulator readme + initial values
Browse files Browse the repository at this point in the history
  • Loading branch information
HoangTran0410 committed May 9, 2022
1 parent 85268df commit 34a838c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Binary file added 2022/sort-simulator-2/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions 2022/sort-simulator-2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Sort Simulator 2

[Demo](https://hoangtran0410.github.io/p5js-playground/2022/sort-simulator-2/)

## Screenshots

![screenshot](./1.png)
4 changes: 2 additions & 2 deletions 2022/sort-simulator-2/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ function setup() {
createCanvas(min(windowWidth, 800), 500);
colorMode(HSB, 100);

for (let i = 0; i < 50; i++) arr.push(~~random(100));
for (let i = 0; i < ~~(width / 10); i++) arr.push(~~random(100));

delaySlider = createSlider(0, 250, 10, 5);
delaySlider = createSlider(0, 100, 10, 2);

createButton("Shuffle").mouseClicked(() => {
shuffleArray(arr);
Expand Down

0 comments on commit 34a838c

Please sign in to comment.