d13

Loading Sounds and Json...?

Recommended Posts

Hi Everyone!

Just wondering what the state of Pixi's loader is these days: Does it handle sound files and Json? 

I remember trying to load sounds with the version used in 3.x, I had to set extensions Resource.LOAD_TYPE.XHR and Resource.XHR_RESPONSE_TYPE.BUFFER for each sound file type. Is this still something I'll need to do.

How about JSON, can I just load that as-is?

Thanks!


 

Share this post


Link to post
Share on other sites

json is detected as json. "resources['mystuff'].data - here it is .

Yes, buffer is still like in v3 but function names are bit different. maybe.

https://github.com/pixijs/pixi-spine/blob/master/src/loaders.ts#L18

As for how to use sounds, look in pixi-sound , it has some quirks that you have to ask about in its repo.

Edited by ivan.popelyshev

Share this post


Link to post
Share on other sites

Thanks Ivan!! I will check out those updated references.

I've used my own sound library in the past, which has worked will with Pixi in the past. I used Pixi's loader to load the sounds then, then my library to decode them (https://github.com/kittykatattack/sound.js/issues/8)

I've never used pixi-sound.. how stable is it? If it works well on ie11 I might consider it but it seems like there are some issues.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.