Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/17/19 in all areas

  1. Hi everyone, I'm trying to port an avatar editor made with AS3. The original app makes use of the gskinner Color Matrix class for adjusting brightness, contrast, saturation and hue of each part and stores those values in a DB. So imo I have two options here: 1. Port the class to js and try to use the stored values as they are. 2. Find an algorithm to transform those values to use them with PixiJS Color Matrix Filter directly. As I'm not very good at maths I've tried the 1st option so I ported the class to JS and tried to use it as the matrix for the color matrix filter. Saturati
    1 point
  2. 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));
    1 point
  3. 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 o
    1 point
  4. I found a workable solution by manually drawing lines under my text. It's quite straightforward too. // Text Object containing the string to be displayed let textObject = this.game.add.text(0, 0, 'My Text', { font: '18px Verdana', fill: '#000000' }, this); // Graphics Object used to draw a line let underline = this.game.add.graphics(textObject.left, textObject.bottom - 7); // Specify the line (size, color) underline.lineStyle(2, 0xE21838); // Location to start drawing the line (x, y) underline.moveTo(0, 0); // Draw a line the width of objectText's string underline.lineTo(textObject.width,
    1 point
×
×
  • Create New...