Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Unfortunately, I don't have an answer, but I do have three pointers to projects that you could look at.</p> <p>The first is the <a href="http://Research.Sun.Com/projects/lively/" rel="noreferrer" title="Lively Kernel">Lively Kernel</a> by Dan Ingalls (yes, <em>the</em> Dan Ingalls) at Sun Labs. It is an implementation of a Smalltalk Virtual World in JavaScript on top of SVG. More precisely, it is an implementation of the Morphic GUI framework from Squeak Smalltalk in JavaScript using SVG and a port of (parts of) Squeak Smalltalk in JavaScript.</p> <p>Or, if you're not a Smalltalker and the above doesn't make sense to you: it's an Operating System, written in JavaScript with the JavaScript interpreter as the CPU, SVG as the graphics card and the browser as the computer.</p> <p>This is about as extreme as it gets, when it comes to JavaScript and SVG. And it only <em>fully</em> works in Safari 3 and partly in Firefox 3, although there is an experimental port to Internet Explorer as well.</p> <p>The second project is John Resig's <a href="http://EJohn.Org/blog/processingjs/" rel="noreferrer" title="Processing.js">Processing.js</a> port of the Processing visualization language to JavaScript. It uses the <code>&lt;canvas&gt;</code> element instead of SVG precisely because of the problems that you mentioned. This one however, only works in Firefox 3.</p> <p>The third one is <a href="http://UselessPickles.Com/triangles/demo.html" rel="noreferrer" title="Triangles in JavaScript">Real-Time 3D in JavaScript</a> by Useless Pickles. It uses <em>only</em> JavaScript, DOM and CSS and <em>no</em> SVG or <code>&lt;canvas&gt;</code> or Flash or whatever. <em>And</em> it is portable to almost any browser, including Internet Explorer 7 and up. Doing 2D should be even easier than this.</p> <p>Between those three projects you should be able to find some inspiration and also to find some people who tried to push the envelope with JavaScript and SVG or JavaScript and Graphics and can tell you what works and what doesn't.</p> <p>Conclusion: doing cross-browser SVG or cross-browser <code>&lt;canvas&gt;</code> is nigh impossible, but with a little bit of craziness, cross-browser graphics <em>without</em> SVG or <code>&lt;canvas&gt;</code> is possible.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload