I’m thinking simple SVG is the way to go. I’m not sure if Apple’s Markup Extension exports to that format. It looks like the final result is just a bitmap image.
It looks all of the common / modern web browsers support SVG.
Even better would be to closely match SVG shapes with matter.js shapes. This can be done somewhat already with the basic set of elements in Hype right now. If you want a line, just use a very narrow box.