Schroedingers-Hat / jsphys

Libraries for physics simulation on javascript canvas
GNU Affero General Public License v3.0
11 stars 1 forks source link

Wider browser compatability. #31

Closed Schroedingers-Hat closed 12 years ago

Schroedingers-Hat commented 13 years ago

Doesn't work in Firefox 3.6 We should examine and test a few different browsers, decide on what we want to support.

capnrefsmmat commented 13 years ago

I think we should suggest, at a minimum:

If we can get IE8 and Opera to work as well, that'd be great, but I don't want to spend too much time fighting with old browsers.

Schroedingers-Hat commented 13 years ago

If safari works, do we assume all webKit is good? Otherwise sounds fine, maybe test with the slightly older browsers and fix simple things if they break, but don't stress about ignoring them if there's a feature we need or some such.

capnrefsmmat commented 13 years ago

Well, what matters most is the JavaScript engine and the canvas implementation. Chrome and Safari share WebKit, but Chrome uses V8 and Safari uses Nitro for their JavaScript engines. Fortunately the only other JS engines around are Opera's, Firefox's, and IE's.

Schroedingers-Hat commented 13 years ago

Did some browser testing: FF4 is/was recently working again -- main issue seems to be drawing too far off the canvas, ff5 and chrome seem quite tolerant of it Opera 10 and 11 are not far from working. They don't like defineProperty which can be easily worked around by turning V X0 etc into V() X0() etc or simply modifying scene so it doesn't need them (it shouldn't really, anyway). There's something weird in load(), too. They don't seem to like either changing to a frame during load or translating frame in general. Also there was some weird upside downyness, but I don't know if that was just git bisect picking the commits where I was swapping x/y. Opera 9 seems to have issues with jQuery and some other things which were not immediately apparent. Suggest not supporting. IE8 is a completely lost cause. I managed to dig through some of the surface issues only to uncover exponentially more. Haven't tested safari or IE9 Tested opera mini on a recent samsung for shits and giggles, it appears to work other than the same issue opera 10 had (which can be overcome once I implement isInteresting). Wouldn't animate without modification so I don't know what framerate it's capable of. @capnrefsmmat Would that count as a low end enough system for you? :P Also do you reckon we could call the two most recent versions of opera/ff/chrome/safari? along with IE9 and maybe opera mini reasonably wide compatibility?

capnrefsmmat commented 13 years ago

Opera 10 and 11 are not far from working. They don't like defineProperty which can be easily worked around by turning V X0 etc into V() X0() etc or simply modifying scene so it doesn't need them (it shouldn't really, anyway).

How would scene implement click-to-get-nearest-object without access to X0, XView, or V? Or do you think we should add methods to extendedObject and photon to simplify this?

Also, I think there's a fallback function available for browsers that don't have defineProperty, so we can support Opera if we want to.

IE8 is a completely lost cause. I managed to dig through some of the surface issues only to uncover exponentially more.

Not surprised. It's inevitable, since we're stressing so many new browser features.

Haven't tested safari or IE9

Works in Safari, last I checked, with the caveat that we fall back to Float32Arrays. I don't have IE9 around, unfortunately.

@capnrefsmmat Would that count as a low end enough system for you? :P

If we can run real-time relativity simulation on a smartphone, technology is awesome.

Also do you reckon we could call the two most recent versions of opera/ff/chrome/safari? along with IE9 and maybe opera mini reasonably wide compatibility?

Yeah. Maybe Safari on iPad if possible. Opera isn't as important as the others, given its low usage.

capnrefsmmat commented 13 years ago

I just tried on Mobile Safari on an old iPod touch. It runs! ... at about one frame per second. Not too surprising. I can try it on an iPhone 4 over the weekend. The newer hardware should be a bit faster.

On Aug 30, 2011, at 1:32 PM, Schroedingers-Hat reply@reply.github.com wrote:

Did some browser testing: FF4 is/was recently working again -- main issue seems to be drawing too far off the canvas, ff5 and chrome seem quite tolerant of it Opera 10 and 11 are not far from working. They don't like defineProperty which can be easily worked around by turning V X0 etc into V() X0() etc or simply modifying scene so it doesn't need them (it shouldn't really, anyway). There's something weird in load(), too. They don't seem to like either changing to a frame during load or translating frame in general Opera 9 seems to have issues with jQuery and some other things which were not immediately apparent. Suggest not supporting. IE8 is a completely lost cause. I managed to dig through some of the surface issues only to uncover exponentially more. Haven't tested safari or IE9

Reply to this email directly or view it on GitHub: https://github.com/Schroedingers-Hat/jsphys/issues/31#issuecomment-1946775

Schroedingers-Hat commented 13 years ago

sweet, what about on a minimal demo? Something with 5 or 10 points in it? I can imagine that'd still be quite useful.

capnrefsmmat commented 13 years ago

Well, the light clock demo moves a bit faster, but nowhere near smoothly. I think the 3-year-old iPod Touch just can't keep up.

Schroedingers-Hat commented 13 years ago

3D is almost go for ff3.5 and friends who freak out at trying to draw at 1/0. It was working, but I may have broken it again with the latest changes in trying to remove ugly near-origin drawing artefacts.

Schroedingers-Hat commented 13 years ago

Rather than spamming with lots of these, I'll replace the last one: As of 06/09/11 Branch compat, not merged into master: FF: 2+, or 3.6+ if you don't want the fillText workaround (slow). Safari 3.2.3+, or 4+ if you don't want the fillText workaround (slow). opera 9+ or 10+ --All need an alternate for -/+ to be defined, 9 needs fillText workaround. chrome -- haven't tested earlier versions, most should work. Some may not have native filltext IE8: Tested, works with flashcanvas and flash 10 IE9: Not tested.

That takes us back by five years or so, bit less for IE/chrome. If anyone has an older browser than that, their hardware isn't going to be up for it unless they have a new browser (and thus faster JS) anyway.

Schroedingers-Hat commented 13 years ago

@capnrefsmmat Do you have access to some systems with IE8 and 9 that you could test? Also various versions of flash 9/10 for IE8. If we can confirm that IE 8 works on more than just my system (Utilu and IETester aren't always 100% accurate) we could bother DrRocket again. Also IE7 is fairly close to working (It worked the first time I had IE8 working, but has since broken again), but I have no debug tools for it, I'm wondering how much to care -- The gotta-catch-em-all urge is strong...but not quite that strong.

capnrefsmmat commented 13 years ago

The physics computer labs have some recent IE version on them, but I don't know which. I can test on them later this week. Unfortunately at the moment I'm a bit buried in homework.

Schroedingers-Hat commented 13 years ago

Ah, IE7 doesn't do JSON. Utilu must have been wigging out when things worked. Nor do firefox<3.5 or older opera/webkit which makes me wonder by what magic it works on those browsers -- esp my copy of safari 3.2 which is very definitely sandboxed and can't get at any other webkit libraries which may be installed. Is jQuery perhaps automatically loading a json library and parsing it for us?

capnrefsmmat commented 13 years ago

Parsing what? demo.js? That's just a valid JS file; JSON is a subset of JavaScript, and rather than parsing demos.js as JSON, it's just a JavaScript file that defines an object.

Schroedingers-Hat commented 13 years ago

IE9 works

Schroedingers-Hat commented 13 years ago

IE 6 and 7 now work. Other than the android browser, I think that's everything supported that could possibly be supported.

capnrefsmmat commented 12 years ago

Closing this. We'll open bugs for any specific browser compat issues that come up.