themoonrat

Members
  • Content Count

    301
  • Joined

  • Last visited

  • Days Won

    4

themoonrat last won the day on August 12

themoonrat had the most liked content!

About themoonrat

  • Rank
    Advanced Member
  • Birthday 11/25/1982

Contact Methods

  • Website URL
    http://www.moonrat.co.uk
  • Twitter
    themoonrat

Profile Information

  • Gender
    Male
  • Location
    UK

Recent Profile Visitors

3796 profile views
  1. The thing with custom fonts, is that, once loaded, the first instance being used doesn't work, but after that it does. So if you're creating text before ffo is finished, or during it finishing, then I'd totally expect to see it not working on text drawn at one time compared to text created / drawn at another time. If you want to 'force' text to redraw, call updateText on it. But that's a brute force method rather than solving the underlying issue.
  2. I recommend using https://github.com/bramstein/fontfaceobserver to load custom fonts before creating pixi text objects
  3. No downsides that I know of, or on games I've released. https://github.com/pixijs/pixi.js/issues/6853 got the potential to make it true by default for pixi V6, and examples for other libs like three where a certain setting to WebGL is just slow on certain intel gpus
  4. Have you tried setting transparency to true when creating the renderer? A lot of people have noted it gives a big boost to performance, for some reason, with Intel GPUs. By default it is false
  5. The very latest version of pixi let's you dynamically create a Bitmap Font, which I think would work really well here. https://pixijs.download/dev/docs/PIXI.BitmapFont.html#.from You get the flexibility of dynamic styles, as PIXI.Text can generate, but it'll generate texture atlases for you so the rendering speed, and changing text speed, will be as fast as BitmapText Initially it could just generate the ASCII characters, but if you detect a different character you can regenerate the atlas?
  6. Short answer. Not much. Slightly longer answer: the Ticker class uses requestAnimation to do the looping, just as would be recommended if handling calling render yourself. It just handles some edge cases with ordering and timing when adding and removing things to this rAF callback, adds a bit of useful information, like a delta, and lets you control the minfps / maxfps and speed of the ticker. There is nothing wrong with not using it at all. But what it contains are the kind of things you may start to realise are useful as you progress
  7. fontfaceobserver is the one. PixiJS wise, either wait until the successful callback function from ffo has completed and then create text using the custom font, or do a force refresh of all the text using updateText function on the successful callback. Basically, don't try to render text with a custom font before ffo has done its thing
  8. The 'from' function here is meant to be to generate your own bitmap font dynamically from a text style... which uses the Text class on the background. And the Text class uses the Canvas API to generate textures. You can use custom fonts via loaded woff / woff2 files, just like in html and CSS. But you cannot use a Bitmap font as a source to draw regular Text
  9. Timing is never a browsers strong point 😕 One option is to have, say, 3 pieces of music, all the same length, all set to loop, all set to start playing at the same time. But you change the volume of them to say, bring one bit of music whilst another fades out. Think of it like layering instruments in an orchestra.
  10. I'm sorry you don't like the solutions, but it's not something that's really come up before that people haven't been satisfied covering with the existing methods. There is nothing more we can give here.
  11. From the comments... if you didn't want any move events in your game, then that is a reasonable way to do it. There's no simpler way either at a top level or on a per component level. It's that or digging into overriding functions, like Ivan suggests above, so that if the event is a move event, it's ignored if the component contains a flag or something
  12. The reason the hitArea helps is because it uses that instead of searching through children to find the hittable areas. So if you require interactivity, hitAreas are the way to go. I'm not sure why this wasn't acceptable in your opening post? What issue were you having with them? They work on all events. In any case, for really complex scenes, what you could do is have an extra layer, where you put either transparent sprites, graphics or containers with their own hitarea - which are purely for hit areas for the scene below? So instead of stage --> armatureDisplay you have stage --> interactivity layer --> armatureDisplay Nothing below interactivity layer is actually interactive... just items in the layer above, which consist of very simple objects which mirror the size and shape of what is below.
  13. If you could put a little demo on https://www.pixiplayground.com/#/edit we could take a look for you
  14. There is a setting to enable this for all containers by default if you wish https://pixijs.download/dev/docs/PIXI.settings.html#.SORTABLE_CHILDREN