Gerente

Members
  • Content Count

    96
  • Joined

  • Last visited

Everything posted by Gerente

  1. Hi Ivan, I tried with PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST; but nothing changed. I want to use my own tilemap component but pixi-tilemap seems to work directly with webgl so its much faster. thanks.
  2. Hello, there is any consideration to draw a sprite after another?. I'm having a hard time trying to make them fit perfectly. I'm starting to think that is something about decimals or something because most of the sprites have a line/space between them , and in mobiles is even worst. I have a big spritesheet with tiles, and I extract them with: new PIXI.Texture(texture, new PIXI.Rectangle(col * tileSize, row * tileSize, tileSize, tileSize)) where col and row indicate the position of the tile. Could be a problem related with this method? the spritesheet is fine because it works perfect in Tiled.
  3. Gerente

    Fog of War

    thank you, ill try that and let you know
  4. Gerente

    Fog of War

    Hello, anyone has any example about a fog of war around a specific point? thanks.
  5. This might help you to start: https://jsfiddle.net/vwcns1qk/4/
  6. yes, I found the issue!. its the emulator, it doesnt come with the last version of chrome. So, you test it on a real android device or full update your AVD! Im testing in a real android and it works fine!
  7. Hi Tymski. For Android, Cordova just wrap your html page into a webview. This webview can be hardware accelerated but it comes with many issues. I have tried to make it work but it just doesnt. Im posting for help in android forums and no one answer. check this post, its about the same topic: Android Webview Forum: https://plus.google.com/u/0/communities/105434725573080290360/s/hardware acceleration
  8. Ok, so it's an issue with the hardware acceleration in android if you set it as false it works, but very slow, I need to find another solution. <activity android:name=".MainActivity" android:hardwareAccelerated="false">
  9. Ok, I did some more test, and is not only PIXI that doesnt work. The issue is when the android webview is too big, it draw the canvas, but it doesnt draw any graphic inside. I have not been able to figure out why it happen, but is related with the HEIGHT of the canvas, the width doesnt affect it.
  10. I created a webview in android and I get the same problem. I tried this and it works: window.onload = function(){ var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.beginPath(); ctx.arc(95, 50, 40, 0, 2 * Math.PI); ctx.stroke(); } so weird..
  11. Yes, what I did was copy this code into the cordova project and I still getting the same problem. It still showing that transparent square at the right bottom. http://pixijs.io/examples/#/basics/basic.js
  12. I'm doing a very basic test. Create a Render and add a Rectangle, it works everywhere except with cordova. so basically PIXI + CORDOVA doesnt work? that's sad. Ill try PHONE GAP and if doesnt work then its a PIXI issue thanks botmaster for your help!
  13. set the background blue to detect the render. That small transparent at the right bottom appears when I add a graphic. so weird. I
  14. I can't find the post, I saw "the light" with your answer but now I'm back to the darkness, very sad, even thinking to switch framework =(. Mighty Ivan, I summon you! Please help!
  15. Hi botmaster, you mean : var renderer = PIXI.autoDetectRenderer(300, 600,{transparent:false}); ?? I just tried and still showing a weird transparent square at the right bottom when I add a graphic. I dont see "notMultiplied" as a valid value for "transparent" param.
  16. Should I use only canvas? I can see the square of 300x600 but it doesnt show any graphic or sprite. var renderer = PIXI.autoDetectRenderer(300, 600); renderer.root = new PIXI.Container(); renderer.root.name = 'root' document.getElementsByTagName('body')[0].appendChild(renderer.view); var graphics = new PIXI.Graphics(); graphics.position.set(0,0) graphics.beginFill(0xFF0000); graphics.drawRect(0, 0, 1, 1); graphics.endFill(); renderer.root.addChild(graphics) renderer.render(renderer.root);
  17. I have this same issue 4 years later (2018). I''m trying apache cordova and PIXI render doesnt draw graphics. Any idea why?
  18. If you use the shared ticker then just stop it and it should top all the update, and then start() to resume PIXI.shared.ticker.stop() PIXI.shared.ticker.start()
  19. what about this?. seems easier and seems to work fine: function createTexture(params) { params = Object.assign({ width: 10, height: 10, color: 'white' }, params) const canvas = document.createElement('canvas'); canvas.width = params.width; canvas.height = params.height; const context = canvas.getContext('2d'); context.fillStyle = params.color; context.fillRect(0, 0, params.width, params.height); return new PIXI.Texture(new PIXI.BaseTexture(canvas)); }
  20. I would not be able to do something like that, I need more experience and knowledge. Thanks anyway.
  21. Hello, there is a way to create by code a texture of size W and H ? Texture.WHITE creates a 10x10 texture but if you change it size after adding it into a PIXI.Sprite it will resize back to 10x10. If you resize it after assign it to the Sprite it will change the scale. I need it basically because the "containsPoint" function only works based on the texture size or the Sprite.
  22. Gerente

    PIXI 3D?

    Sound great!. Keep doing that amazing work!. Thanks!
  23. Gerente

    PIXI 3D?

    what is this? version 3 of pixi?? with camera Euler? https://gameofbombs.github.io/pixi-bin/index.html?s=flip&f=lookEuler.js&title=Camera lookEuler&plugins=pixi-spine,pixi-extra-filters Seems like it was removed in PIXI version 4
  24. Lol, yes, lets see if they are really the "most anal" sprite!. Flip the texture with rotate=8 is an option, but what happen with the animatedSprite?. If I load an animatedSprite with 10 frame looking to the left side, changing the texture rotation would require to add 10 more rotated textures!. And this is just an example, it could be more. scale.x = -1 look like the solution BUT it change the position texture inside the object!! Any idea for this? Thanks
  25. Gerente

    Camera 2d

    great, that is what I needed! thanks!