Jump to content

PIXI.Float32Array and Phaser is undefined in IE


xdiepx
 Share

Recommended Posts

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

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

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

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.

Link to comment
Share on other sites

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

Hi guys,

just for completeness.

1. IE9 should work out of the box.

2. Phaser bundles the appropriate polyfill for TypedArrays

3. p2 & pixi have working fallbacks for Arrays instead of Float32Array and

4. 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

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...