A Flood-Fill Algorithm written in JavaScript

Overview

flood

https://magnogen.net/flood

A Flood-Fill Algorithm for Creative Coders

This is the source code for a section of my website. You're welcome to snoop around to see how it works, maybe even make a pull request! (I've been wanting to speed it up and improve performance!)

How it works

Simply click anywhere in the page to start the flooding process. It works by spreading colour to its transparent neighbours, and tweaking the colour of those neighbours slightly from the original. This results in a sort of circular shape with pretty patterns and... why don't you just go there and see for yourself!

Plans for the future

I'd like to add a few features for things like

  • Resetting the canvas,

    (Maybe a keybind? Or a button in a menu?)

  • A menu for tweaking how it runs,

    (I found a few interesting ways to change how it updates and colours things, a few sliders should do the trick nicely.)

  • Rendering the resulting image at custom resolutions.

    (Wallpapers, icons, things like that. Not sure what kind of input would work, might just do a dropdown with the common sizes - like 1080p, 2k and 4k - or a couple of input boxes for more niche sizes - like... uhhh... 3002 by 273?)

You might also like...

Fast and robust triangle-triangle intersection test with high precision for cross and coplanar triangles based on the algorithm by Devillers & Guigue.

fast-triangle-triangle-intersection Fast and robust triangle-triangle intersection test with high precision for cross and coplanar triangles based on

Nov 15, 2022

⭐️ my baekjoon algorithm

Baekjoon Algorithm Python3 import sys # 공백으로 구분된 2개 숫자 입력 받기 N, M = map(int, sys.stdin.readline().split()) # 여러 줄 입력 받기 n = int(sys.stdin.readline

Jul 22, 2022

k-means algorithm module for n-dimensional data

K-Means Algorithm This module allows you to compute the k-Means algorithm with n-dimensional data. You simply put in your data as a list and the k you

Jan 31, 2022

This project will be using various AI and Rule Engine algorithm to detect various attack against a company!

This project will be using various AI and Rule Engine algorithm to detect various attack against a company!

📌 Introduction This project will be using various AI and Rule Engine algorithm to detect various attack against a website! 📌 Mission After starting

Apr 29, 2022

Deno's first lightweight, secure distributed lock manager utilizing the Redlock algorithm

Deno-Redlock Description This is an implementation of the Redlock algorithm in Deno. It is a secure, lightweight solution to control resource access i

Dec 31, 2022

An algorithm for fast 2D pattern-matching with wildcards.

An algorithm for fast 2D pattern-matching with wildcards.

pattern-match-2d.js An algorithm for fast 2D pattern-matching with wildcards, with a demo app inspired by MarkovJunior (by Maxim Gumin). The algorithm

Nov 5, 2022

The Google Earth Engine implementation of the BioNet algorithm to estimate biophysical parameters along with their uncertainties.

The Google Earth Engine implementation of the BioNet algorithm to estimate biophysical parameters along with their uncertainties.

ee-BioNet The Google Earth Engine implementation of the BioNet algorithm to estimate biophysical parameters along with their uncertainties. Quantifyin

Oct 30, 2022

A DOM-merging algorithm

Idiomorph Idiomorph is a javascript library for morphing one DOM tree to another. It is inspired by other libraries that pioneered this functionality:

Dec 30, 2022

Onchain private messaging app with a significant encryption algorithm.

Onchain private messaging app with a significant encryption algorithm.

Hedwig DEMO We want to implement SSL technology to blockchain so decided to build onchain private messaging app. Diffie Hellman protocol was invented

Nov 3, 2022
Owner
Magnogen
Hey! I'm Mag. I like coding, gaming, music - stuff like that. Feel free to peruse my repos if you wish!
Magnogen
Utility to automatically fill foreign income section of 3-NDFL report based on tax report from Tinkoff broker

Заполнение дохода за пределами РФ в декларации 3-НДФЛ Disclaimer Автор не несет ответственности за корректное заполнение налоговой декларации. Вы запу

Oleg Elifantiev 12 Dec 9, 2022
Automated testing for single-page applications (SPAs). Small, portable, and easy to use. Click on things, fill in values, await for things exist, etc.

SPA Check Automated testing for single-page applications (SPAs). Small, portable, and easy to use. Click on things, fill in values, await for things e

Cory Leigh Rahman 5 Dec 23, 2022
A personal semantic search engine capable of surfacing relevant bookmarks, journal entries, notes, blogs, contacts, and more, built on an efficient document embedding algorithm and Monocle's personal search index.

Revery ?? Revery is a semantic search engine that operates on my Monocle search index. While Revery lets me search through the same database of tens o

Linus Lee 215 Dec 30, 2022
Algorithm visualizer made with React, Material UI and P5JS.

Made with React, P5JS and Material UI. Link https://andresrodriguez55.github.io/algorithmsVisualizer/#/ Description The purpose of doing this was to l

Andres Arturo Rodriguez Calderon 31 Nov 22, 2022
JS_GAME/Algorithm

?? JS_GAME JavaScript 를 이용하여 각종 게임을 만들어보자. (자바스크립트를 사용해서 게임을 만들 수 있음.) 웹페이지를 만드는 것도 좋지만, JS 를 이용하여 간단한 게임을 만들면서 생각의 전환을 해보자. 클론 코딩도 좋다! 하지만, 클론 코딩 후에

LEEJAE-GO 2 Nov 5, 2021
NodeJS Implementation of Decision Tree using ID3 Algorithm

Decision Tree for Node.js This Node.js module implements a Decision Tree using the ID3 Algorithm Installation npm install decision-tree Usage Import

Ankit Kuwadekar 204 Dec 12, 2022
A deterministic object hashing algorithm for Node.js

Deterministic-Object-Hash A deterministic object hashing algorithm for Node.js. The Problem Using JSON.stringify on two objects that are deeply equal

Zane Bauman 7 Nov 30, 2022
Dominating set solver using quantum algorithm Grover

Solution for dominating set problem using improved quantum algorithm Grover, which uses Schoning algorithm for k-SAT problem to accomplish this improvement

Fatemehe Lajevardi 8 Aug 31, 2022
Non-interactive publicly verifiable distributed key generation and resharing algorithm over BLS12-381

NPVDKG-RS This repository contains a mathematical presentation and some code to demonstrate our developed non-interactive publicly verifiable distribu

NATRIX Official 8 May 19, 2022
🤖A Tic-Tac-Toe solver that uses the minimax algorithm and alpha-beta pruning to make it unbeatable

Tic-Tac-Toe AI A Tic-Tac-Toe solver that uses the minimax algorithm and alpha-beta pruning to make it unbeatable How it Works Tic-Tac-Toe is what is k

Martin 4 May 20, 2022