These are chat archives for pixijs/pixi.js

9th
Mar 2015
benny00100
@benny00100
Mar 09 2015 11:32

Hi ... I am testing pixi V3 atm. Looks pretty descent so far.

One question about Bitmap fonts/Loader :

With PIXI V2 - the following works:
http://pastebin.com/0cAzCKzb

With PIXI V3 - the following does not work:
http://pastebin.com/LUdQT7Nf

Can anyone help what I did wrong in my test code?

Chad Engler
@englercj
Mar 09 2015 16:39
Hey @benny00100 you aren't doing anything wrong, I used your code and wrote some tests and it was definitely broken. I've updated the latest dev branch with fixes and new builds. Try that out and see if you can get it to work. If not, try to put up a jsfiddle or something and I'll look at it again, thanks!
benny00100
@benny00100
Mar 09 2015 16:42
@englercj Thanks a lot - will have a look and will report back.
benny00100
@benny00100
Mar 09 2015 19:37

Ok, I compiled two examples. Something is still strange with the XHR loading I think.

Here are my test results:

#1

Environment:
Normal Apache Webserver

Pixi Version:
2.2.7

URL:
http://bennyschuetz.com/tmp/fontTestV2.html

Result:
Everything works as expected

#2

Environment:
Normal Apache Webserver

Pixi Version:
3 RC (latest)

URL:
http://bennyschuetz.com/tmp/fontTestV3.html

Result:

  • XHR loading has some problems finding the font image file
  • In Pixi Version 2 it expects file relativ to bitmap xml file
  • In Pixi Version 3 it seems that it loads the image file relativ to the javascript source (that's why I needed to fix the file path within the bitmap xml)
  • Bitmap font has no colors

#3

Environment:
PHP Build in Server (via PhpStorm)

Pixi Version:
2.2.7

URL:
http://localhost:1337/fontTestV2.html

Result:
Everything works as expected

#4

Environment:
PHP Build in Server (via PhpStorm)

Pixi Version:
3 RC (latest)

URL:
http://localhost:1337/fontTestV3.html

Result:

  • Throws error "Uncaught TypeError: Cannot read property 'responseText' of undefined", Line 23107 (Just a guess - maybe a port issue???)

@englercj
If you want to test the files locally, I zipped them for you. You can download them here:

http://bennyschuetz.com/tmp/PixiFontTests.zip

Please let me know if you need anything else.

@englercj

  • All tests done with latest Chrome browser, Windows

Additional note to #4:

  • Judging from the network console output - the font image does not get loaded.
Chad Engler
@englercj
Mar 09 2015 20:35
Thanks for all this, I'll take a look at it later tonight. I think you are right that the url is not resolving to being relative to the xml file, I'll make sure to fix that.
Eemeli Kelokorpi
@ekelokorpi
Mar 09 2015 20:50
Setting backgroundColor=0x000000 on renderer options gives white background, is that known issue?
Chad Engler
@englercj
Mar 09 2015 21:05
@ekelokorpi Nope! I'd put in an issue
Ryan
@ryanmcnz
Mar 09 2015 22:13
Is there an example I can look at in regards to using a sprite as a mask for another sprite, while testing v3 rc1? :)