jeregrine

jeregrine

Phoenix Core Team

Easel - an Elixir 2D drawing library based on canvas for LiveView and Wx!

This is a canvas compatible api where I used the WebIDL for the CanvasRendering2d module from Firefox/Safari and converted all its functions from camelCase to snake_case and attributes to setter functions. Allowing you to write elixir and get out art or animations or charts on a canvas. Initially this was just going to be for LiveView but I realized an LLM could help me port those function calls to Wk and it did just that!

https://easel-demo.fly.dev

Above a demo site with some drawings showing some pretty stressful cases for this style of work but hopefully showing the capabilities here. Great way to get your fly machine cpu throttled lol.

For the examples I simply asked an LLM (opus4.6 and codex5.3) to create them and it had no trouble one-shotting all of them. Which makes sense because canvas is most likely well represented in it’s dataset and its trivial for it to translate it.

I did have to massage the Boids example and add templating/instancing to make it work better and also “quantization” aka chomping the precision off the floats to avoid sending mb’s of data to do 60fps. With Wx this was not an issue of course.

Here is the source and it’s up on hex/hexdocs as well.

https://github.com/jeregrine/Easel

Happy to answer any questions or take feedback.

First Post!

mudasobwa

mudasobwa

Creator of Cure

Looks fantastic.

I’d wild guess you use daisyUI and it’s not updated for system-wide dark theme (which it detects anyway,) resulting in:

Last Post!

jeregrine

jeregrine

Phoenix Core Team

Yeah makeup didn’t pickup the dark mode haha. I’ll poke around this afternoon thanks for the heads up.

Where Next?

Popular in Announcing Top

deadtrickster
I’ve just released stable versions of my Prometheus Elixir libs: Elixir client [docs]; Ecto collector [docs]; Plugs instrumenter/Export...
New
josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 10380 134
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
hpopp
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
michalmuskala
Hello everybody. I have just released Jason - a new JSON library. You might be wondering, why do we need a new library? The primary foc...
New
scohen
Lexical Lexical is a next-generation language server for the Elixir programming language. Features Context aware code completion As-you...
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: GitHub - devonestes/assertions: Helpful a...
New
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43657 311
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36432 110
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127536 1222
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement