Embed Graphics.h Anywhere

The embed endpoint now accepts messages from any direct parent frame, so you can integrate this on any website.

1) Load SDK

<script src="https://graphics-h-compiler.vercel.app/sdk.js"></script>

2) Add Host Element

<div id="graphicsh-embed"></div>

3) Initialize And Run

<script>
const embed = new GraphicsHEmbed('#graphicsh-embed', {
  baseUrl: 'https://graphics-h-compiler.vercel.app',
  scale: 1
});

embed.runSnippet(`
setbkcolor(BLACK);
cleardevice();
setcolor(WHITE);
circle(320, 240, 110);
outtextxy(250, 240, "Hello from embedded graphics.h");
`);
</script>

Live Demo