Sign in to follow this  

Unity [web] A Couple Time-Wasters

This topic is 4374 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been exploring SVG over the last year or so when I have a chance and I've managed to cook up two proof-of-concept demos that work in IE (with Adobe plugin) as well as Firefox 1.5: Yet Another SVG Tetris (also works in Opera 9 TP1) SVG Solitaire I would appreciate any constructive feedback. Clearly SVG has a ways to go before it catches on in the general web development community, but the upcoming release of Opera 9 and Safari with native SVG support should help. You can see some of my other SVG web projects on my blog. Thanks, Jeff

Share this post


Link to post
Share on other sites
Are there plugins somewhere that make it available in Firefox 1.0.x as well? I haven't updated to 1.5 yet.

Share this post


Link to post
Share on other sites
Sander,

You can download the Adobe SVG Viewer plugin and make it work for Firefox 1.0.x (following instructions at bottom of this page, but of course I would recommend upgrading to 1.5 anyway ;)

Btw, I haven't officially tested this configuration so if you do, please let me know how it goes.

Regards,
Jeff

Share this post


Link to post
Share on other sites
Plugin seems to be Windows only. I'm running Linux. Oh well, maybe I should upgrade to 1.5.

Share this post


Link to post
Share on other sites
I doubt very much whether any SVG plugin will allow those games to work.

In order to run your typical SVG game, the browser needs to have the ability to script the SVG DOM. I don't think this is possible using a SVG plugin, which only allows the viewing of static SVGs.

Firefox 1.5 does this.

Mark

Share this post


Link to post
Share on other sites
Mark,

Sorry, but you are mistaken. The Adobe SVG Viewer plugin indeed supports scripting of the SVG DOM. Try it out, it works (I have tested it). What is more difficult is scripting between an HTML DOM and a referenced SVG document's DOM (which is not what these games do, they are standalone SVG files).

Regards,
Jeff

Share this post


Link to post
Share on other sites
Cool, I didn't know that.

I didn't actually realise that you could put scripts in SVG, I had assumed that the only way to script it was to write javascript in the page that somehow scripted the SVG DOM. But that doesn't work, right?

Adobe SVG has its own script interpreter?

Mark

Share this post


Link to post
Share on other sites
Quote:
Original post by markr
I didn't actually realise that you could put scripts in SVG, I had assumed that the only way to script it was to write javascript in the page that somehow scripted the SVG DOM. But that doesn't work, right?


Mark, ideally you would be able to script either way: from within the SVG or from a XHTML page that contains the SVG - though this latter isn't supported consistently yet (particularly because IE doesn't support XHTML and SVG, thus we have to use a plugin for the SVG content).

Quote:
Original post by markr
Adobe SVG has its own script interpreter?


Yes, though truth be told, they actually used Mozilla's javascript engine (Rhino). Unfortunately the version of the engine they used is a little dated now and doesn't support niceties like XMLHTTP (as a consequence, Adobe SVG uses proprietary methods like getUrl()...

It's interesting stuff, anyways...

Share this post


Link to post
Share on other sites
Actually it's probably the Spidermonkey engine (Rhino is written in Java iirc). I seem to recall something about it being able to use the browser's scripting engine instead of the internal one, but I've never done enough testing to see the difference.

Share this post


Link to post
Share on other sites
Quote:
Original post by Metaphorically
Actually it's probably the Spidermonkey engine (Rhino is written in Java iirc). I seem to recall something about it being able to use the browser's scripting engine instead of the internal one, but I've never done enough testing to see the difference.


My bad, Spidermonkey it is...

Share this post


Link to post
Share on other sites
Sign in to follow this