Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


opd last won the day on July 1 2020

opd had the most liked content!

About opd

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. opd

    Sprite compression

    I use Cloudflare's webp conversion service. It comes with the Pro package, so it's $20 a month. Depending on you needs, it can be really worthwhile. For me, it's appealing as you just turn it on and then you don't think about it anymore.
  2. Thanks for the reply. In the end, I decided not to support IE at all. If anyone is interested, I check for window.document.documentMode and display a 'browser not supported' message.
  3. Does any still bother with IE? Using Pixi v5 and have it setup so that it detects support for WebGL and displays a 'browser not supported' message when not supported. It should work fine on IE but for some other reason my project doesn't work and it doesn't even display an error in the console. Really don't want to debug and figure out what's not working, so I'm tempted to just reject any IE browser. Does anyone else do this? Looking at the stats, IE 11 is 1.5% of my visitors. Also, if you don't bother with IE 11, do you go full ES6?
  4. I started out using Howler, but then went with Pixi-sound. Problem I had with Howler was when loading multiple sound files and then if one of them fails. It was too difficult to detect which specific file had failed so it could be retried.
  5. To make your text appear as in the sample image, you can rotate the textfield. myTextField.rotation=-Math.PI/2; Alternatively, to make your text appear as in Ex1, you can start a new line after each character with \n myTextField.text='N\nA\nM\nE'
  6. Hi, I'm finishing up my first Pixi project and am thinking about performance. I'm using the PIXI.Application class which creates the canvas, renderer, ticker and then updates the canvas every frame. As I understand it, this means that the whole canvas gets redrawn every frame. Would it be a good idea to put the background image into a separate canvas below the app, so it doesn't have to be redrawn each time? Also, is it best practice to manually handle updating the canvas and to only redraw the parts that change?
  7. opd

    help with this?

    If you just mean the picture of the woman's face with the mouseover effects, then you don't need PIXI or even Canvas. Just use CSS or simple Javascript with different images.
  8. opd

    New Pixi Loader

    Hi Huanzyz, I'm also currently in Vietnam, so happy to help. There are a few problems with your code: The file type here is .pnj when it should be .png const url = "http://deelay.me/2000/https://66.media.tumblr.com/avatar_d319f37438d5_128.pnj"; In your Application declaration, you don't need a comma after the last item. It should be like this - note, no comma after transparent. const app = new Application({ width: 1000, height: 600, transparent: true }); Finally, as Ivan showed, url shouldn't be inside the { }. Only crossorigin should be and
  9. If anyone is interested, I solved this by importing the json file and then using the Spritesheet class, as per this thread https://github.com/pixijs/pixi.js/issues/4029 import mySheetData from '../mySheet.json'; ... startLoad(){ this.loader.add('main',mySheetData.meta.image); this.loader.on('complete',this.loaded.bind(this)); this.loader.load(); } loaded(){ let mySheet=new PIXI.Spritesheet(this.loader.resources.main.texture.baseTexture,mySheetData); mySheet.parse(() => { myResources=mySheet.textures; }); } ... this.background=new PIXI.Sprite(myResources["background.png
  10. I'm using Texture Packer to create spritesheets and then loading them from the .json file. Like this: this.loader.add('main','./ims/mySprite.json'); ... let myResources=this.loader.resources.main.textures; ... let myBackground=new PIXI.Sprite(myResources["background.png"]); let myButton=new PIXI.Sprite(myResources["button.png"]); However, I have a dozen or so different sprites that load at different times and I don't want to have to load a json file for each one. I think it makes more sense to just load the images and then keep the frame data in the javascript, as an object that
  11. Hi, I recently switched from using CreateJS to PIXI and am quite unsure about best practices and typical ways of doing things. I'm have a web app with a bunch of different JS files: pixi.js, greensock, howler and about 20 of my own. Is it recommended to bundle everything into one big index.js file? Webpack recommends against this as it comes out at more than 500kb. So, what do you usually do? Load each of the libraries separately and then have one index.js for everything else?
  • Create New...