Skip to content

Instantly share code, notes, and snippets.

@zeffii
Last active February 2, 2026 09:45
Show Gist options
  • Select an option

  • Save zeffii/b24f051f1956d4978d273ee88b2d9350 to your computer and use it in GitHub Desktop.

Select an option

Save zeffii/b24f051f1956d4978d273ee88b2d9350 to your computer and use it in GitHub Desktop.
maxmsp v8ui dynamic svg for mgraphics.svg_render
// possibilities are endless with substitutions
outlets = 3;
inlets = 4;
var mstr = `
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="50" cy="50" r="40" fill="blue" />
</svg>
`;
mgraphics.init()
mgraphics.relative_coords = 0;
mgraphics.autofill = 0;
function paint(){
mgraphics.svg_render(mstr);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment