CosmicRipple is a CanvasRenderer
This was a test concept to learn several things:
- how to manage canvas
- how to handle JS with Classes
- how to manage a lightweight 2D Renderer (that handles FPS)
- how to do basic AI state management
Along with that this project (specifically this GitHub project) was also an excuse to start to understand JS modules.
You can check out a working version here of the Hexagon animation: Codepen
You can check out a working version here of the AI/State management: Codepen
If you want to download and test locally, you must run it as a server due to how modules work.
I was reading about canvas and decided to dive headfirst into it by trying to draw a hex grid.
When I wasn't sure why I was running into issues with rows/columns I found and referenced: https://eperezcosano.github.io/hex-grid/
I was working in Unity when I realized I could recreate a subset of their Vector2D type as a class to possibly simplify some of the code.
I watched a couple state machine videos on YouTube when I decided I wanted to take some of the Hexagon canvas project code to create an AI project in canvas.