ivan.popelyshev

Members
  • Content Count

    4110
  • Joined

  • Last visited

  • Days Won

    154

Everything posted by ivan.popelyshev

  1. Here's the plugin for it: https://github.com/pixijs/pixi-layers You can see "z-index" word in examples and use it with CTRL+C but I advice you to go through the README. Layers are better than z-index. 1. You might even not need to set numbers for z-index 2. Its clear how masks and filters work in those elements.
  2. OH, "PIXI.settings.RESOLUTION" ... I could just post it when you made that thread, but I thought 1. its too easy 2. someone else should post it Sorry next time I'll post all ideas even if its not my area of expertise
  3. No, I dont think so. Pixi has multitexturing, usually up to 16 textures can be handled in the same batch
  4. Strange that nno one answered yet. I dont have anything to say about the problem. Please post a minimal demo then, maybe people will act on it
  5. > I've had a look through the interaction manager docs https://github.com/pixijs/pixi.js/blob/dev/packages/interaction/src/InteractionManager.js First time I hear about that. No workarounds
  6. My slides for talk on russian, but look at see pictures: https://docs.google.com/presentation/d/1wX-sXRh8qkmadwMPb1noFpsVAU5jQyg9DBrwcSOYlXA/edit#slide=id.g70b2e5f95b_1_12 Game is not mine
  7. You can make any level of lighting through using many sprites on separate layers with different blendmodes and combining that layers through shaders or filters. For example, you can multiply by one light layer first ,then add second layer. The thing is, there're no great articles about that. All who learned about layering did it by reading how games were made in other engines, like gamemaker. To ease the pain, I made a plugin pixi-layers that allows to 1. render element in another container (not its parent) 2. render layers to a texture automatically, then pass that texture to filter or sprite+blendMode. No other renderer has those features. They have display_lists which are more limited. Requirements for work with lights: 0. just add pixi-lights to project <---- NO. NO. NO. 1. you have to be proficient in shaders/filters 2. you have to know how to use premultiplied alpha and custom blendmodes, how to enter formulas from https://www.w3.org/TR/compositing-1/#blendingseparable 3. need experience in stage tricks: basic case when your character has shadow and hpbar and they have to be rendered at the same time as other shadows/hpbars. How do you solve it? then you can safely use normal maps in your app because its just another trick you can use with other things you know If you dont have those qualifications, any modification of basic example will become a nightmare. That's not because PixiJS just cant go in lights - that's because bringing lighting for users less than expert level requires HUGE amount of work hours of people who 1. know the stuff 2. can write articles. What you see - lighting in pixi demo - not a heavily modified fork, but just in vanilla pixi with a plugin - its a miracle that was achieved by working my ass off. Usually those things require total rewrite of renderer APIs, and original pixi-lights for v3 overrode many things in pixi so it wasnt actually usable for more than demos.
  8. pixi-lights is no-go , because its experimental and you have to try simple lighting lke https://pixijs.io/examples/#/plugin-layers/lighting.js first. There are only four people who understand how lights work. Even if I port it to v5 - it'll take some time to produce good enough documentation and someone from your side will have to know how it works First - simple lighting with ADD and MULTIPLY layers, maybe with OVERLAY . then advanced stuff like normal maps which are used in lights.
  9. I know why sprites survived - vertexData was calculated only once, and actual rendering code every frame was dealing with numbers. ParticleContainer though reads "position.x" every frame and makes a conversion. Now I know what to tell people with same profile.
  10. OMG I dont know why do you apologize, first time I see that kind of problem, its pure gold
  11. I guys it should be "sheet.spritesheet.animations" Its javascript, there are no types, only IDE intellisense. My recommendation - learn how to use debugger. Look for places where "undefined" was found. Without DevTools debugging, breakpoints, watches, profiling you wouldn't be able to make any production app. Easy fixes like that should be obvious. You dont have to remember all the pixi documentation and examples, and those docs also wil lie to you about some things - so you really should learn how to debug.
  12. Hello and welcome to the forums! Animations are just array of `PIXI.Texture` ' s, you can make your own easily from `textures` in spritesheet itself. If you need to adjust speed, remove some frames, add timers to frames - you have to look in AnimatedSprite source. AnimatedSprite is baseline class for animations, it can work in production only in basic cases. Usually people override its methods to make more features. Documentation is fine but , its not enough, and , AnimatedSprite itself is not rocket science - you can just look in the sources! As for how to solve your particular issue - my experience is not enough to understand what are you asking for. You can wait for someone else, or you can try to describe it better, make a demo, or you can just read the sources. https://github.com/pixijs/pixi.js/blob/dev/packages/sprite-animated/src/AnimatedSprite.ts
  13. I'm sorry, but that's not how shader works in v4. You need custom renderer for it: https://github.com/pixijs/pixi-plugin-example/blob/master/src/PictureRenderer.js , this repo was created to help with that task. > because shader have better performance yes, there's no extra framebuffer for it. > we use PixiJS Guys, you really should move to v5 already. Really. Better to place bounty on converting gdevelop than fixing stuff for older versions of pixi. There are only a few people who can help you with v4.
  14. how did you manage it? Did you add 70000 handlers in ticker? If you use AnimatedSprites - it will do exactly that. Just in case, read https://github.com/pixijs/pixi.js/wiki/v5-Custom-Application-GameLoop and pixi ticker source. And animatedSprite source if you use it. I dont know which mistake did you, its good that it was fixed by moving to your own implementation - PixiJS is not a framework and allows all kind of hacks. However, it would be better if you actually know what was wrong, that way I can share it with future users via telepathy skill. What does telepathy mean? Well, when someone asks "we got 3fps on 50k sprites and we dont know what went wrong " I answer in a minute "Did you use feature X and forgot to set Y in config? please read this page on wiki: ... "
  15. Hm, OK, then I dont know whats wrong First time i see case like that.
  16. Which is the value of the first param (obj.keys length) in your case? I think its too low. The worst case its 1 - ONE batch per every sprite. It should be a constant like 1000 or 10000
  17. Also, app.renderer.extract.canvas(app.stage) is BAD idea. Answer is here: https://github.com/pixijs/pixi.js/issues/6498#issuecomment-604397290 . I referenced it here: https://github.com/pixijs/pixi.js/wiki/v5-Hacks#extract in pixijs wiki so no one can say that its missing from docs. Wiki is docs too.
  18. Hello, and welcome to the forums! According to guys from https://beatflyer.com/ , there's no chance to do it in mobiles and they do it through mediastream and not blobs
  19. > I know the "_" designates private variables It means its kinda private but languages both js and ts dont have proper modifiers for them. For example, if I want to add a field in Sprite but users might use it too - I add "_" so sudden pixijs version update wont break their code. Its just a warning "do not touch unless you saw whats its doing in source code".
  20. > but...pixi-timer I don’t understand how to use? Simple. Look in the code , if you like something - take it for your app. Its just someone's two-files plugin.
  21. arrays.sort() should work just fine even on 10k elements. Pixi has it in contaner, just enable sorting and sort() will be called in frames if you changed any of elements zIndex - es
  22. Welcome to the forums! Yes. However you wouldnt be able to do it without learning first what is Sprite, what is Texture, BaseTexture, how "Texture.from(myCanvas)" works, how actually "PIXI.Text" works and some other things. Please spend some time learning pixi and experimenting. pixijs examples: https://pixijs.io/examples/#/demos-basic/container.js pixijs wiki: https://github.com/pixijs/pixi.js/wiki also clone sources locally and open in separate IDE window, learn which hotkey in your IDE helps to find classes you want to look. For input use something like pixi-text-input: https://github.com/Mwni/PIXI.TextInput , or just position html input element on top of your "texture" or whatever you will call it after you spend some time with pixi, accessability plugin has tricks like that.
  23. Scene manager? Its somewhere here: https://exponenta.games/games/game-pack/?v=4 but i dont have unobfuscated version. > So they are kind've like a set of switches, that each time a file is opened, they try to run certain functions What file? Yes. But the way you describing it like some magic means you did not open pixi runner source. I'm disappointed. I thought you already cloned pixi and can search through classes. Its here: https://github.com/pixijs/pixi.js/blob/dev/packages/runner/src/Runner.ts