• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by freddyInKorea

  1. my mistake it was because of cache issue: this._zoomOut[name] = new PIXI.Sprite(PIXI.Texture.fromImage(name,undefined,undefined,0.5)); PIXI.Texture.removeTextureFromCache(name); this._zoomIn[name] = new PIXI.Sprite(PIXI.Texture.fromImage(name,undefined,undefined,1));
  2. Hello guys, I realize that my sprites were beautiful when I zoom in and quite ugly when I zoom out, so I decided to define two sprites to keep a good quality in zoom out or in: this._zoomOut[name] = new PIXI.Sprite(PIXI.Texture.fromImage(name,undefined,undefined,0.5)); this._zoomIn[name] = new PIXI.Sprite(PIXI.Texture.fromImage(name,undefined,undefined,1)); when I use this two lines of code separately it works well. But when I use both of them, the second call doesn't apply the 4th parameter "sourceScale". It means this._zoomIn[name] receives a sprite from a texture with 0.5 of sourceScale too. That's super weird, are there any cache to clear?
  3. well, it's a little bit inconvenient but it's far from being a blocking point. thank you for this framework and thank you for the work you have done
  4. Looks great but it seems this lib doesn't support a lot of SVG features. It's ok, I think I will just create all svg files in my solution, however it would have been awesome to change svg properties during runtime. I made a SVG tank, and I wished to set tank's color by editing this SVG during runtime. Let's wait the next PIXI JS version to see if this feature will be available. 😋
  5. I found out a solution from this website: const blob = new Blob([svgObject], {type: 'image/svg+xml'}); const url = URL.createObjectURL(blob); PIXI.Texture.fromImage(url,undefined,undefined,2); Unfortunately, when I zoom in now the quality is quite low do you have any idea which may provoke that? <svg version="1.0" id="blop_1" x="0px" y="0px" width="800px" height="800px" viewBox="0 0 800 800" style="enable-background:new 0 0 800 800;" xml:space="preserve"> <circle cx="400" cy="400" r="400" stroke="black" stroke-width="3" fill="red" /> </svg> Thank you for your helps EDIT: FIREFOX : doesn't display EDGE: no quality loss when zoom in CHROME: quality loss when zoom in it's quite strange
  6. Hello everybody, First of all, thank you for providing such a great framework. here is my question: is it possible to generate a texture from the content of a SVG file instead of its path. I found an issue talking about it: http:// var texture = PIXI.Texture.fromImage('data:image/svg+xml;charset=utf8,' + serializedSvg) but it seems that the given solution doesn't work anymore. I tried it in my project and it doesn't display anything. thank you for your helps.