Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faizanu94/spirals
Spirals simulation in HTML5 canvas with pure JavaScript
https://github.com/faizanu94/spirals
canvas javascript
Last synced: 5 days ago
JSON representation
Spirals simulation in HTML5 canvas with pure JavaScript
- Host: GitHub
- URL: https://github.com/faizanu94/spirals
- Owner: faizanu94
- Created: 2018-12-07T14:25:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-15T10:19:41.000Z (6 months ago)
- Last Synced: 2024-06-16T01:31:30.192Z (6 months ago)
- Topics: canvas, javascript
- Language: JavaScript
- Homepage: https://faizanu94.github.io/spirals/
- Size: 22.5 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spirals
Spirals simulation using pure JavaScript and HTML5 Canvas
## [Live Demo](https://faizanu94.github.io/spirals/)
## Usage
1. Clone the repo:
```
git clone https://github.com/faizanu94/spirals.git
```
2. Open `index.html` in your browser## How It Works
The simulation creates and evolves spiral patterns based on user interactions using a simple convolution algorithm. Here's a brief overview of the algorithm:
* Initialization: Sets up the canvas and buffer arrays
* Interaction: Listens for mouse and touch events to modify the initial buffer
* Drawing: Continuously updates the canvas by averaging the values of neighboring pixels to create the spiral effect