• Content Count

  • Joined

  • Last visited

  • Days Won


themoonrat last won the day on August 12 2020

themoonrat had the most liked content!

About themoonrat

  • Rank
    Advanced Member
  • Birthday 11/25/1982

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location

Recent Profile Visitors

3929 profile views
  1. It's by design, because I may have some children that I want to add to one parent one moment, then to another parent the next. If you went through each child, and called destroy, then that child will automatically remove itself from the parent, so maybe that's the better way to go?
  2. Scoping alienAnim is created in one function, then in gameLoop you try to refer to it, but its not in scope. I'd expect a browser to show a reference error.
  3. For 1. Try setting to false For 2, could you try the latest Dev version please? Or latest release candidate at least, As I know there have been PRs to standardize access to the top level scope, away from window. And that might help in this scenario?
  4. Texture objects emit an 'update' event So you can do texture.on('update', () => { console.log(texture.valid) });
  5. Ah haha the Megaways chestnut. Still working in slots, so something high level. Hmmm. The main advise would be to not try to make it work in the same visual code as normal reels. They move differently, they work differently. When they are spinning, they all move the same amount of pixels per second, so giving them all that same velocity keeps them lined up there, but when they land, you know that the 'final' position will be adjusted depending on the height. You can either hard bake in these offset positions in, or pre-calculate them. Per size, per index. So imagining a center point of "0" Landing 2 symbols (both very tall): position index 0 = -200, position index 1 = 200 Landing 3 symbols (all of them tall): position index 0 = -150, position index 1 = 0, position index 2 = 150 etc. In a similar way, when they are all together, spinning around with different heights, you can calculate the offset of each symbol based on how tall it is.
  6. Indeed. Go with whichever way makes it easier for you to manage in code. The issue I see with your first path is that it doesn't play well with wanting to animate symbols bouncing as they land, or animating wins. You may want to consider a custom class to deal with how symbols work rather than relying on a single animated sprite.
  7. The docs show the correct usage parameters to be name, style, options BitmapFont.from("ExampleFont", style, { chars: BitmapFont.NUMERIC }) You have put the chars property with in the style object, when it needs to be in a new object passed in as 3rd parameter.
  8. 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.
  9. I recommend using to load custom fonts before creating pixi text objects
  10. No downsides that I know of, or on games I've released. 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
  11. 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
  12. The very latest version of pixi let's you dynamically create a Bitmap Font, which I think would work really well here. 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?
  13. 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
  14. 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
  15. 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