marching icon indicating copy to clipboard operation
marching copied to clipboard

Using Marching.js as the renderer for a js/html website/app?

Open drawtheliner opened this issue 1 year ago • 1 comments

I'd like to use the library as a renderer in web projects, such as websites, apps and games. However I'm not sure how to set this up.

In my js/html projects, I usually have a setup function, and then a function triggered by requestAnimationFrame, which deals with the app/game logic, and updating the scene based on the passage of time and user input.

However in marching.js it seems animation is handled differently. Is it possible to use it for the purposes I described, or is marching.js exclusively meant to be used for live coding?

drawtheliner avatar Jun 24 '24 12:06 drawtheliner

no, that will work fine. take a look at the demo.html file. then make sure you’re using a render preset that supports animation, and you can change whatever you like in your callback.

charlieroberts avatar Jun 24 '24 13:06 charlieroberts