LordPayso

Members
  • Content Count

    9
  • Joined

  • Last visited

  1. Ok. SO i accidentally figured this out. Initially we were setting the texture of our Sprites with the fromImage() method. I then re-factored the initial setting to use the fromFrame() method and now it is working. Apologies for not being clear form the start.
  2. No errors printed to the console. It is in the WebView browser used for Cordova.
  3. On our Android 4.1.* devices the seTexture method is called but the texture does not change/update. I can see this visibly and when I log out the value of the sprite's texture source, it remains the texture that it was initially set to.
  4. REally cannot think of a way around this apart from using a display object container and then removing/adding sprites as appropriate.
  5. Is there anyway to clear a texture prior to applying a new one? Have added a spritesheet to no avail like so: var loader = new PIXI.AssetLoader(['images/daggers/sprDagger.json']); loader.onComplete = function(elm){ console.dir(PIXI.TextureCache); }; loader.load();And then call the frame: dagger.setTexture(PIXI.Texture.fromFrame(prefix + dagger.number.toString() + '0.png'));
  6. I am updating the texture of a sprite when it is rotated to reflect different shading like so: d.updateDaggerShade = function(dagger, color, pos) { var prefix; (color === 'white') ? prefix = 'w' : prefix = 'b'; dagger.setTexture(PIXI.TextureCache[prefix + dagger.number.toString() + (pos + 1).toString()]); console.log(dagger.texture.baseTexture.source.src); return; };Where d is the sprite object. All the textures have been cached also. This works fine on desktop, iPhone but not Android. We are using Cordova to wrap the web code to deploy as an app. Would using a sprite sheet be a more robust alternative? I do not need to animate the textures, just change them when the rotation has finished.
  7. I think we have attributed this to clearRect() failure in this version of Android. http://www.html5gamedevs.com/topic/114-canvasclearrect-bug-in-android-stock-browser/
  8. Hi, We have just started using Pixi.js and are noticing some visual artefacts in Android. We are building a game, much like chess, where a user starts of with some pieces and drags them to a board layout. the starting position for the pieces is at the bottom of the UI away from the board. The problem is that when the sprites are dragged from their starting position to the board we still see a representation of that sprite in its original position in the UI. This is only happening on Android and we are using web technologies with Phonegap for the build. It is proving really hard to fix and/or debug due to the nature of the build process and it is fine on web and iOS also. Any pointers would be well received I have done some more testing i do not believe the sprites to be actually duplicated, I used the following code to check that they were the only sprites present on the board: PIXI.DisplayObjectContainer.prototype.contains = function(child) { return (this.children.indexOf( child ) !== -1); }