All Activity

This stream auto-updates     

  1. Past hour
  2. Thank for your answer, Ivan. I've got an answer from Engler about OnError being called with the error, the loader, and the resource that failed. http://englercj.github.io/resource-loader/classes/loader.html#onerrorsignal Got too used to error handlers being called with single error objects, so didn't look for docs, sorry my bad. Since I didn't know how to catch what files failed to load, so I just reset the loader and reload all the resources again relying on browser cache to handle repeats and it magically worked well. Thanks for your help.
  3. Today
  4. Thanks for you immediate help, Ivan. I see it finally works well😀. I can understand 2, could you please elaborate 3 a little bit for me? I don't quite get it. Thanks in advance.
  5. Oh, I see your playground. I don't know why didnt you encounter precision issue, its a miracle. Btw, one of other problems is that "precision" in second line (not first one) actually forces pixi to spawn one more "precision" before that and maybe it somehow works... Yes, just apply 2 and 3 to your playground and you'll get good result.
  6. Dear @Oliver Zhou ! What can I say? Welcome to the forums! I'm glad you tried that thing and get the result. I can help with small problems. OK, here it is: https://jsfiddle.net/Hackerham/0vftxLzn/17/ 1. There is a problem with precision - same uniforms used in vertex/fragment (inputSize, outputFrame) require same precision. If you use old devices that dont have highp - well, we can always stuff them in "dimensions" uniform like before to get rid of that. Honestly, its one of new problems that were spawned in v5. We try to fix old ones - get new ones However you either solved that on your own either you used legacy mode and "filterArea" uniform that comes with it, the real help follows: 2. To center coords by center of sprite - I removed "-=" from mapping , it doesnt work with screen pixels anymore, its filterArea pixels. 3. To get rid of bleeding problem you encountered - "filter.padding=1; filter.autoFit = false". And, like for any other v5 filters thread, I recommend to look at https://pixijs.io/examples/#/mesh-and-shaders/triangle-textured.js in case you need only one sprite affected and not whole container - UV manipulation is easier than those renderTexture inputs/outputs. We had a thread today where I posted the result for different shader,
  7. Hi Ivan, I created a pixi-playground at here for you: https://www.pixiplayground.com/#/edit/Y6TocuLkUOTfl7HrfcZFp
  8. Hello, @Oliver Zhou ! Please post your code in codepen, jsfiddle or pixi-playground OH, wait, I see you posted it here.
  9. I have rewritten the code as https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters suggested. Please help
  10. Hey, I am Arsalan, 2D artist based in the UK, I specialise in concept-art, character design and bone animation. Full Portfolio: http://arsalangameart.artstation.com Some work from last Project: https://arsalangameart.artstation.com/projects/4bENYn I am available for hire. Would prefer a remote job, but also available for freelancing. Can send me a private message if you are interested to hire me. Rate negotiable.
  11. I tried this example in v5, it seems that it didn't work as expected any more. I have no idea why class CrtWarpFilter extends PIXI.Filter { constructor() { super(null, ` precision mediump float; varying vec2 vTextureCoord; uniform sampler2D uSampler; uniform highp vec4 inputSize; uniform highp vec4 outputFrame; vec2 mapCoord( vec2 coord ) { coord *= inputSize.xy; coord += outputFrame.xy; return coord; } vec2 unmapCoord( vec2 coord ) { coord -= outputFrame.xy; coord /= inputSize.xy; return coord; } vec2 warpAmount = vec2( 2.0 / 34.0, 1.0 / 16.0 ); vec2 warp(vec2 pos) { pos = pos * 2.0 - 1.0; pos *= vec2( 1.0 + (pos.y * pos.y) * warpAmount.x, 1.0 + (pos.x * pos.x) * warpAmount.y ); return pos * 0.5 + 0.5; } void main() { vec2 coord = vTextureCoord; coord = mapCoord(coord ) / outputFrame.zw; coord = warp( coord ); coord = unmapCoord(coord * outputFrame.zw); gl_FragColor = texture2D( uSampler, coord ); } `); } }
  12. Hello, and Welcome to the forums! First, small thing: in both v4 and v5 application adds render() method in ticker if you dont stop it , so you dont have to add "renderer.render(stage)" there if you are not a fan of 120FPS. Filter approach: https://www.pixiplayground.com/#/edit/6ThqOOz-SVJe3AyvkbnaU v5 does have a slight regression in terms of how can you set up uniforms: there is no automatic creation for them! Either you specify them in constructor, either you set them in `filter.uniforms` before the first render. Yes, you did that. But you assumed that "filter.uniforms.resolution" exists - it does not. That's the first problem - its your job to create arrays. Second problem is that "resolution" uniform exists and pixijs uploads there information different from what you want, it is mentioned in v5 docs here: https://github.com/pixijs/pixi.js/blob/e0320c08763cf10a0b92c84bc8d69e412806e2a9/packages/core/src/filters/Filter.js#L105 , its modified here: https://github.com/pixijs/pixi.js/blob/dev/packages/core/src/filters/FilterSystem.js#L259 Almost no mentions in docs about that, and PixiJS doesn't have a warning in case you use the same names as it does. I debug it by placing breakpoint in https://github.com/pixijs/pixi.js/blob/e0320c08763cf10a0b92c84bc8d69e412806e2a9/packages/core/src/shader/ShaderSystem.js#L132 , and tracking which uniforms are uploaded, after that line it goes inside generated sync uniforms function where all is present. When it tried to upload [NaN, NaN] to resolution I realized what is wrong. So, lets rename it to "dimensions" or use already existing "outputFrame.zw". Shader approach: Filter input is a temporary framebuffer that contains rendered container. Why the heck do we need that if you do not use the input? Because v4 did not have good ways to specify shader except that. In v5 we have a mesh shader for such cases: https://pixijs.io/examples/#/mesh-and-shaders/triangle-color.js , https://pixijs.io/examples/#/mesh-and-shaders/triangle-textured.js Lets copy it, and adjust the shader: dont use gl_FragCoord, use texture coords (uvs). https://www.pixiplayground.com/#/edit/6ThqOOz-SVJe3AyvkbnaU Conclusion: PixiJS docs / wiki are still not enough for people to understand stuff about shaders. We need to improve them. However, I have two questions to you : did you at least read https://github.com/pixijs/pixi.js/wiki/v5-Creating-filters or did you not notice that it exists? Did you look at previous topic here at the forums about filter convertion? I mention "Shader Approach" very often. I've spent an hour to make that post. I will link it every next time someone else asks for filter convertion.
  13. Yes, there's no that thing. This application demonstrates a possibilities of engene in graphics and new some new features, so to not overcolplicate it I decide not to include price calculations in it. For price calculations you can look at another aplication from our site, for example Recliner Configurator.
  14. @Marino I recommend phaser. - It's easy to learn to learn. - There are more than 1000 examples. - There are at least 10 books about it. - It has a huge community that will make it easier to get support. - It comes with batteries included (its full of features) Good luck.
  15. Yesterday
  16. Phaser 3 repo is at https://github.com/photonstorm/phaser Phaser 3 Docs are at https://github.com/photonstorm/phaser3-docs If you clone the repo, the docs are in the 'docs' folder. eslintignore is nothing to do with docs. It's to do with what gets lint checked. However, there is no eslint file in the docs repo. There's also no 'npm build' command either, so you were looking in a different repo. Phaser 2 repo is at https://github.com/photonstorm/phaser-ce Phaser 2 docs are in the docs folder of that repo.
  17. Hello. I recently visited this site and when I downloaded the Phaser Github repo, I found that it is not version 2.6.2 but it was version 3. But ok, that is not the worst problem. When I cloned the repo, the docs folder weren't downloaded. I also found that in that .eslintignore file, there was a line docs/* which of course means, ignore the docs folder. Also another strange thing is, when I cloned the repo, in my local repository of Phaser, the file .eslintignore didn't contain the line docs/* which is what the hell. Do I need to build Phaser or docs in order to have them. But I already run npm install npm run lint npm run build which only built Phaser. It didn't generate docs, what the hell. Some tricks going on. How do i get the docs? Also should I upgrade my Phaser 2.6 games to Phaser 3? Are they very different from each other?
  18. I saw some cool smoke filter on a tutorial site but it was really old (like Pixi 2.0). I managed to get it to work on v4 but I don't know how to goto v5... https://jsbin.com/mabapatetu/1/edit Can anyone help me?
  19. Solution can also appear in one of pulls: https://github.com/pixijs/pixi.js/pulls?utf8=✓&q=is%3Apr+BitmapText
  20. No idea how to do that. Well, actually lots of ideas but nothing ready You may find something in issues related to BitmapText and its loading: https://github.com/pixijs/pixi.js/issues?utf8=✓&q=is%3Aissue+BitmapText If there's no such thing, learn the source code of BitmapText and its loader, https://github.com/pixijs/pixi.js/tree/dev/packages/text-bitmap/src , and hack something. According to https://github.com/pixijs/pixi.js/blob/dev/packages/text-bitmap/src/BitmapFontLoader.js#L139 , if you put your texture in loader with a certain name - it will be loaded instead of the corresponding page of your fnt file.
  21. Hey im trying to find a way to load the png file directly, instead of using the fnt reference: <page id='0' file='myfont.png'/> Is there a way to do something like this: const bitmapFontText = new PIXI.BitmapText('some text', "myfont.png", { font: '20px myfont', align: 'left' }); or another workaround.
  22. I had that problem in production. What i did - I reset() the loader and added everything again. On any error. But I guess its not for your case: > it happens to different files and in 1 in 20 times game loads successfully. So far I didn't see code that does reloading of individual resources in case of error in public (forum, issues). Please share it if you make something. It shouldn't be that difficult, if you read sources of resource-loader ( https://github.com/englercj/resource-loader/ )
  23. I did sent an invoice to support@famobi.com and billing@famobi.com on the 9th and just got payed today.
  24. ichwan

    i'm confuse

    thanks guys, I'll try it right now
  25. Last week
  26. Hi, I'd like to work on this project. We can offer you several options that we would like to discuss via our email: idlagames@gmail.com
  27. I replied. Thank you. Please submit your offer according to the terms in topic. Thanks.
  1. Load more activity