All Activity

This stream auto-updates     

  1. Past hour
  2. Good one to play while drinking a cup of coffee at the morning 😃
  3. Today
  4. AdvancedBloomFilter is a multi-pass filter, you have to go inside it and modify it that way in last step it . If you are not ready to dig into filters, shaders and the harder part - multi-pass filters - dont go there. As for why bloom and other filters are applied to transparent too - that's how it works everywhere. Workaround without direct usage of custom filter: render container into renderTexture, apply bloomFilter to sprite and a mask it with itself. However you'll need to mask only alpha stuff , that's not included in pixi vanilla package - you'll have to modify SpriteMaskFilter anyway, I published workarounds before but i dont have time to search for them now. If you explain why exactly do you need such thing and whether you are ready to wait when someone does it, we can think of something
  5. I am trying to apply AdvancedBloomFilter to a sprite, but now the filter is applied to the entire sprite(even the transparent pixel). Is there any way to just apply the AdvancedBloomFilter to the colored pixels?
  6. Welcome to the forums! I congratulate you on first solved issue, and advice to read stuff from this subforum, I have answered tile-related questions every week. Also https://github.com/pixijs/pixi.js/issues , both open and closed issues are good source of knowledge. If you feel strong enough, clone pixijs sources and next time just look into them if you think something is wrong with docs Transforms and Texture are the basics, I'm glad you are spending time on them. It will help even if you work with other renderers/game engines.
  7. if your cloth wont be rotated, you can just change filterArea every frame - that will limit the temporary buffer pixi uses to draw this thing on. cloth.filterArea = cloth.getBounds(); // execute every frame or every time you change something If you start rotating cloth... well.. I believe you'll need to get inside filter and use that multiply formula you did before, "gl_FragColor = stuff1 * stuff2". However this time, you already have formulaes for position, scale and pivot (which is basically tilePosition of tilingSprite) Actually, why do you even rotate that TilingSprite? I thought "tilingSprite.tileTransform.rotation" is better in your case
  8. Sports betting is gradually setting up a new dimension and has registered consistent growth changes in the sports betting industry. This means online betting now becomes exciting platforms that allow people to develop their own team. Nowadays, sports betting is a serious business, and with fun and exciting casino games, it often carries higher stakes due to which it has been taken more seriously by bettors. The increasing demand for sports betting is likely to create a buzz in the market and to gain this momentum, most sports betting software development companies to grab customer attention.
  9. Sports betting is gradually setting up a new dimension and has registered consistent growth changes in the sports betting industry. This means online betting now becomes exciting platforms that allow people to develop their own team. Nowadays, sports betting is a serious business, and with fun and exciting casino games, it often carries higher stakes due to which it has been taken more seriously by bettors. The increasing demand for sports betting is likely to create a buzz in the market and to gain this momentum, most sports betting software development companies to grab customer attention.
  10. Thanks for your advice, I've tried it as you said. It seems to work, but how do I remove the black area? I want it became transparent which is black now function setup(loader, res) { let cloth = new PIXI.Sprite(PIXI.loader.resources["cloth"].texture) let flower = new PIXI.TilingSprite(PIXI.loader.resources["flower"].texture); let fw = 328; let fh = 240; let cw = 179; let ch = 182; flower.anchor.set(0.5,0.5); flower.rotation = 0.3; flower.scale.set(1.1,1.1); flower.width = fw; flower.height = fh; flower.position.set(fw/2,fh/2); flower.tilePosition.set((fw-cw)/2,(fh-ch)/2); flower.blendMode= PIXI.BLEND_MODES["MULTIPLY"]; cloth.filters = [new PIXI.filters.AlphaFilter()]; cloth.addChild(flower); app.stage.addChild(cloth); }
  11. Huh, then i forgot whats in trim.x/y . Its easy to forget all those params, I look in the code every time I use them.
  12. Thank you for your opinion! Yes, you're right about repeating tutorial, it's really annoying. But I don't think it's possible to use arrows in this game, It's required to move in varying angles to fly around complicate landscapes, and the arrows allow to use only a few directions.
  13. Ah! Nevermind. The answer was obvious. Just applied 24, 0 in the trim rectangle. Thank you so much!
  14. MjM1NjIxLDFlKzMwMixJbmZpbml0eSwzMzk1MiwwLDEyOTAwMTUyLDEyOTAwMTUyLDY0OTk1OTIsMCw1MDQsOCwwLDAsMCw0MzU5NS43OCw5OTk5OTksMTE5NDk5NTAxMzk1OTg0LjAwLDExOTQ5OTUwMTM5NTk4NC4wMCw5NTI3NzUzODgyOTgzMjEuMDAsOTUyNzc1Mzg4Mjk4MzIxLjAwLDM2MjUzNzA1MjQwMjA0NDg2NC4wMCwzNjI1MzcwNTI0MDIwNDQ4NjQuMDAsNzEzOTkzNTQwNzc1ODkuMDAsNzEzOTkzNTQwNzc1ODkuMDAsMzk2OTc4NTIxNjUyODEyODY0LjAwLDM5Njk3ODUyMTY1MjgxMjg2NC4wMCwxMzA4Njk2OTA3NjczMS4wMCwxMzA4Njk2OTA3NjczMS4wMCwwLDAsMTAwLDAsOTAwLDAsMCwwLDAsOSwyOSw2LDM3LDYsMTk5OSw4LDI3LDYsMzk4LDUsNSwwLDk5LDAsMTAsOSw3NzUsNCw5NSwxLDEsMSwxLDEsMSwxLDAsMSwxLDEsMSwxLDEsMSwxLDEsMSwxLDEsMSwwLDEsMSwxLDEsMCwxLDEsMSwxLDAsMSwxLDEsMSwwLDEsMSwxLDEsMCwxLDEsMSwxLDAsSW5maW5pdHksMCwzLDg3LDEzOCxJbmZpbml0eSwwLDAsMCw= make sure no spaces when u enter in inport ur welcome
  15. thanks Ivan! Worked like a charm myContainer.setTransform( widthPoint, heightPoint, scaleRatio, scaleRatio, 0, 0, 0, widthPoint, heightPoint );
  16. Okay, I figured out what you meant. I did this: const orig = sprite.texture.frame.clone(); const trim = new PIXI.Rectangle(0, 0, orig.height, orig.width); sprite.texture = new PIXI.Texture(sprite.texture.baseTexture, sprite.texture.frame, orig, trim, 6); That does allow me to use texture realignment potentially, but I would still need to have an offset. It still aligns it to the left, like if I'd used a pivot at (0,0) and then rotated it. See this reference: https://ibb.co/L0J2FFG Basically, I need that platform to align where that red outline is (shifted 24 pixels to the right). How would I go about doing that?
  17. Yesterday
  18. Hi guys, I’ve been super busy this week creating custom music for a bunch of indie projects, but I did manage some more mad experiments with pixel art-style wood tiles...128X128. You can download them freely here: https://soundimage.org/art-wood/ OGG MUSIC UPDATE: All of the music tracks on my Horror/Surreal page can now be downloaded as very high-quality Ogg files. Halloween’s not too far off, so I’ll try to create more creepy music tracks this month. Meanwhile, if anyone has requests for Ogg versions of tracks that haven’t been made available yet, just let me know and I’ll be happy to upload them for you. Enjoy!
  19. OK, I answer that question for 100th time Transform is calculated from position.scale.rotation.pivot. If you change "position" and "pivot" at the same time, you can get any origin. Here's how to use pivot, basically: https://pixijs.io/examples/#/demos-basic/container.js Consider you have position pos and you want to rotate or scale around "origin" in local coords. that's how you do it: container.position.set(pos.x + origin.x, pos.y + origin.y); container.pivot.set(origin.x, origin.y); Why is that? Spend more time with pixi and you'll get it. Position is where you pin container in global coordinate system, pivot is in local, its like you pin two sheets of paper with a needle. You want to make container in center of screen? Set position to center of screen and pivot to your local center whatever you want to be , for example player character coordinates. As to why is there is no anchor - container width and height are calculated props, they are based on children, and if there would be an anchor - it will have very not obvious feedback.
  20. > it shows it really scrunched up because its trying to fit inside the original 48x24, but with a texture that is now like 24x48. You have to look closer in https://pixijs.io/examples/#/textures/texture-rotate.js , it switches width/height exactly for that case. However, i think trim's "x" and "y" should be zero there, otherwise it'll be strange if you use texture inside an atlas.
  21. How do I change transform origin of a container? I am reading the docs and there is no anchor.set like sprites. This code apples the transform I want to all container children but it appears they are scaled from bottom left corner - I want to change this origin. myContainer.setTransform(0, 0, myRatio, myRatio);
  22. Well, the issue with rotating the texture is that it does it with the 48x24 limits. So when you rotate by 6, for example, it shows it really scrunched up because its trying to fit inside the original 48x24, but with a texture that is now like 24x48. See the reference image: https://ibb.co/RNBpY2m The one on the left is three separate platforms, connected by 48x48 tiles, but they're at the top. The ones on the right are supposed to look like that platform, but rotated to face the right.
  23. Texture rotations are the best for this case. > since the examples I found also didn't work I think rotations work only if you also specify third and fourth param. just copy frame there const orig= texture.frame.clone(); const trim = new PIXI.Rectangle(0, 0, orig.width, orig.height); rotatedTexture = new PIXI.Texture(texture.baseTexture, frame, orig, trim, 8); I also recommend to use PIXI.Graphics beginTextureFill instead of sprite if you have many tiles.
  24. decrease the quality parameter -> less texture2D calls -> works on mobiles. I have better glowFilter, to be published soon
  25. I've been trying for hours to find a solution to this, and I can't seem to find one that works without disrupting the bounds / positions of the base object. What I have is a grid of 48x48 tiles, and arbitrarily sized sprites within them. For example, multiple platforms that are 48x24 and which can connect together. What I need is for the platform to be able to rotate left, right, or a half rotation (such that it's upside down). A flip would also suffice for the half rotation. I tried texture rotation, and that definitely wasn't what I needed. It just stretched the image very strangely for me within the platform. I then tried solutions like this: sprite.pivot.set( 0, 0 ); sprite.rotation = 270 * Math.PI / 180; obj.pos.y += 48; Technically, that positions it exactly where I need. The problem is that this doesn't work, because the collision system and bounds are handled separately outside of PIXI. In short, I need the *image* to rotate within the tile, but I need the x, y position to remain at the same location (the upper left corner of the tile). Bonus points if anyone can explain a proper X flip and Y flip, since the examples I found also didn't work (e.g. sprite.texture = new PIXI.Texture(sprite.texture.baseTexture, sprite.texture.frame, null, null, 8); )
  26. Hi all, There is one problem I use glowFilter, and on desktop it works properly, but on mobile it's turn off, and I don't know why. Maybe someone know what is the problem?
  27. jackied

    Writing help

    Well, if you really need that - check rushessay service. They won't let you down. Trust me.
  1. Load more activity