xdiepx Posted July 11, 2014 Share Posted July 11, 2014 I just updated Phaser and doing some browser testing. It works in Chrome and FireFox but it is failing on IE. This is the message I am getting from the console. SCRIPT5009: 'Float32Array' is undefined phaser.js, line 91 character 1 PIXI.Float32Array = Float32Array || Array; SCRIPT5009: 'Phaser' is undefined Run.js, line 22 character 2 var game = new Phaser.Game(1024, 768, Phaser.AUTO, 'canvasID'); This is also happening in the updated pixi.js SCRIPT5009: 'PIXI' is undefined singlepixi.local, line 21 character 2 // create a new loader loader = new PIXI.AssetLoader(assetsToLoader); Link to comment Share on other sites More sharing options...
wayfinder Posted July 11, 2014 Share Posted July 11, 2014 Errors that fundamental usually stem not from lib problems but some unclosed bracket or missing semicolon or comma instead or decimal point etc, in your code. Maybe it's something that FF and Chrome silently accept as valid and IE doesn't? Link to comment Share on other sites More sharing options...
lewster32 Posted July 11, 2014 Share Posted July 11, 2014 Typed Arrays should work in IE from 10 upwards: http://caniuse.com/typedarrays wayfinder 1 Link to comment Share on other sites More sharing options...
xdiepx Posted July 11, 2014 Author Share Posted July 11, 2014 Errors that fundamental usually stem not from lib problems but some unclosed bracket or missing semicolon or comma instead or decimal point etc, in your code. Maybe it's something that FF and Chrome silently accept as valid and IE doesn't? I haven't really done much except update the library. Link to comment Share on other sites More sharing options...
xdiepx Posted July 11, 2014 Author Share Posted July 11, 2014 Typed Arrays should work in IE from 10 upwards: http://caniuse.com/typedarrays I just tested it on IE10 and you are right. Does this mean IE 9 does not support Typed Arrays ? Link to comment Share on other sites More sharing options...
lewster32 Posted July 11, 2014 Share Posted July 11, 2014 That's correct - IE9 does support canvas though, but I think probably the intention is to drop support for IE9 now, since IE12 is on the way and IE10 is the minimum default installed browser on all modern Windows PCs. Link to comment Share on other sites More sharing options...
xdiepx Posted July 11, 2014 Author Share Posted July 11, 2014 I read up that typed Array improves performance which is brilliant thing, but since IE9 doesn't support typed Array shouldn't phaser/pixi have a fall back for IE9? Link to comment Share on other sites More sharing options...
lewster32 Posted July 11, 2014 Share Posted July 11, 2014 I believe it's also used for the pixel manipulation in BitmapData and probably elsewhere in some of the more advanced features too. I can't speak for Matt or Rich regarding their choices but I'd say that IE9 is a problematic platform to support and doing so will hold back everyone else - not desirable given the pace of HTML5 stuff at the moment. clark 1 Link to comment Share on other sites More sharing options...
xdiepx Posted July 11, 2014 Author Share Posted July 11, 2014 Matt has fixed it . I just tested the new Pixijs Link to comment Share on other sites More sharing options...
clark Posted July 11, 2014 Share Posted July 11, 2014 I find it odd that it does not work. One of the features I noticed is that in Pixi.js it checks to see if float32Array exists, and if not, use Array. It blew my mind trying to define it. I would have thought that this issue should not exist... or it has not been enabled.... Link to comment Share on other sites More sharing options...
clark Posted July 11, 2014 Share Posted July 11, 2014 Oh you replied when I was typing, great! Link to comment Share on other sites More sharing options...
lewster32 Posted July 11, 2014 Share Posted July 11, 2014 Oh right, it was an oversight then. No matter! Damn, that means we have to keep supporting IE9 then? Link to comment Share on other sites More sharing options...
xdiepx Posted July 11, 2014 Author Share Posted July 11, 2014 Only for a few more years . Link to comment Share on other sites More sharing options...
george Posted July 11, 2014 Share Posted July 11, 2014 Hi guys,just for completeness.1. IE9 should work out of the box.2. Phaser bundles the appropriate polyfill for TypedArrays3. p2 & pixi have working fallbacks for Arrays instead of Float32Array and4. phaser ships with the rather big polyfill for ArrayBuffer (see folder resources) to support p2 on IE9 The fallback check with 'Float32Array || Array' which caused the problems of the OP is problematic and should be fixed for months now. The only two reasons I can imagine: You've been using a very old version of PIXI or there have been a regression in the last weeks causing this error again. I bet on the first one. Discussion related to the Float32Array fallback:https://github.com/schteppe/p2.js/pull/83 Some words from Rich to IE9 in phaser:http://www.html5gamedevs.com/topic/5988-phaser-12-ie9 My last project involves heavy physics with p2 and runs on IE9 with a decent performance (50-55FPS) in my virtualbox on a macbook air. Regards George clark and lewster32 2 Link to comment Share on other sites More sharing options...
lewster32 Posted July 11, 2014 Share Posted July 11, 2014 Cool, thanks for clearing this up for us george! Link to comment Share on other sites More sharing options...
Recommended Posts