Jump to content

PIXI, sounds and Typescript


Recommended Posts

I've been looking at sounds - and I've got a bit stuck.

In the PIXI examples, they've got some sound demos (https://pixijs.github.io/pixi-sound/docs/index.html), these look good - but as I'm working in Typescript, and there's currently no typings file to use it with.

I think there's a way you can use it without, but I've not had much luck getting that working... (any pointers would be gratefully received)

I'm happy to use Howler (or another sound library), in fact I have the typings for Howler already - but it seemed that using this in conjunction with the PIXI.Loader, which would be my preferred route, is also a little convoluted... (and my initial experiments failed without generating any useful errors.)

Can anyone give me some guidance? 





Link to comment
Share on other sites

I had the same problem a month ago. However, it was fixed.


And howler is fine too ^_^

However https://github.com/pixijs/pixi-sound/blob/master/package.json#L7 does contain wrong file for typings. 

I suggest you to put include the typings as a separate file, its ok to do that in TS. I use both "<reference types" and "<reference paths", sometimes i put typings into special folder and configure tsconfig.json that it looks for them (liks in https://github.com/pixijs/pixi-tilemap , lib folder).

Link to comment
Share on other sites

I didnt use it. I pinged @bigtimebuddy , and in the week by reading pixi-sound chat (slack. wanna join?) I got impression that he fixed it.

I'm still using howler.

Found the issue: https://github.com/pixijs/pixi-sound/issues/15 , and he just confirmed that he will work on it this week. again.

Btw, that's the only pixi plugin written on TS that doesnt have typings.

OK, time to fix that. I'm making fork that doesnt use import/export. Wait two hours.

Link to comment
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.

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.


  • Recently Browsing   0 members

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