I report here parts of a technical conversation that I was having with @jonathan:
I've discovered that you can upload SVG on some NFT markets (most of them store the file on IPFS with Piñata), this will make most of the people think about uploading still vector images...but SVG can do a lot more! You can use CSS3 to animate them and even use JS!
It's a weird thing (probably to fight XSS?) that browsers stop JS (including CSS interactions :hover :click ...but not animations) if the SVG is included by <img>
, but there's a fix for that:
So basically SVG are basically "wrapped web 3.0 pages"! So I started to do a bit of research and I found out that you can embed even common HTML using the <foreignObject>
tag!
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/foreignObject
So I asked @jonathan if could be possible to embed...Hype (of course)! He made some preliminary tests and it seems working!
Of course making an export script able to make a single SVG with all external files inline (using base64 for images) would be challenging...but I thought this could be the right place to find the right people interested on doing weird experiments like this!
Think about selling directly your interactive Hype projects through NFT markets as unique pieces stored on IPFS, that would be interesting IMO!