Juego de Concentración completo en HTML5 con PIXI.js 3

This post is an updated copy from the article of the great Emanuele Feronato’s bloghttp://www.emanueleferonato.com/2014/02/26/complete-html5-concentration-game-made-with-pixi-js/

If you are learning pixi.js then you know that in this moment there is version 3 (3.08 on 20th october of 2015), but from the resources of the official page  you get a link to a non updated article to introduce you in pixi.js, programming a concentration game.

What are the changes that you have to make to go to version 3 of pixi.js?

  • “DisplayObjectContainer” is “Container” now
  • “PIXI.AssetLoader” is “PIXI.loader”, don’t need to use new, look isn’t capitalized 😉
  • “requestAnimFrame” is “requestAnimationFrame”, because that was a pollyfill and now this is the standard way. Look at the documentation:
  • PIXI.Stage has been remove

Updated version of the source code, pixi.js v3:

Source code: concentration

I have refactored the code, using objects and inheritance, let’s see