combomash / engine

TypeScript Algorithmic Media Engine
https://www.npmjs.com/package/@combomash/engine
ISC License
0 stars 0 forks source link

frames #3

Closed owmo-dev closed 3 months ago

owmo-dev commented 3 months ago

Add support for one-shot frame rendering, passed in as configurations to the initialization of the Engine. The exact frame should be provided (defaults to 0) and calculated from an input FPS (default is 30) so that the time can advance to the correct point in a potential timeline.

owmo-dev commented 3 months ago

When doing a one-shot render, it should perform a safe shutdown (no resizing, no loops running, etc.).

The canvas should NOT be destroyed, remain displaying.

It should have some kind of "done rendering" function that could be implemented (useful later when you're automating the Engine and the workflow execution will wait for this signal). Requirements aren't hard defined, see what is minimally doable and useful for a given project that needs this functionality.

owmo-dev commented 3 months ago

Init needs to support an exact resolution "fit mode" so that the canvas can be precisely rendered. The view in the window should not really care if the canvas fits or not in this mode, as it's purely for rendering a frame.

owmo-dev commented 3 months ago

Whoops, forgot to protect main so I was doing the work on main this whole time! :)