-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
2dRelated to @hex-engine/2dRelated to @hex-engine/2dgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
It would be nice to have a component that can expose the frames of an animated GIF image using the Animation interface; I'm picturing something like this:
import { useType, useNewComponent, GIF, useDraw } from "@hex-engine/2d";
import someGifFile from "./whatever.gif";
function MyComponent() {
useType(MyComponent);
const gif = useNewComponent(() => GIF(someGifFile));
gif.play(); // `gif` has the same interface as AnimationAPI
useDraw((context) => {
gif.drawCurrentFrame(context, { x: 0, y: 0 });
});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2dRelated to @hex-engine/2dRelated to @hex-engine/2dgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed