Ir al contenido principal

Entradas

Mostrando entradas de julio, 2018

Learning easeljs Day#4

So, I decided that I wanted to practice and learn my JavaScript skills doing video games. I wasn't sure with what I should begin, as I have try this several times and fail.

So I found this library easeljs. It's really easy to use it.
This post and the future ones, are to share, part of the code and explain some of the things I had issues to manage, probably this can help somebody.


See the Pen Running-Scripts V2 by Diego (@diegotc) on CodePen.
function init() { stage = new createjs.Stage("demoCanvas"); circle = new createjs.Shape(); spriteSheet = new createjs.SpriteSheet({ framerate: 5, "images": ["man2_rt1.gif","man2_rt2.gif","man2_Up_rt1.gif","man2_Up_rt2.gif","man2_Down_rt1.gif","man2_Down_rt2.gif"], "frames": {"regX": 16, "height": 32, "count": 6, "regY": 0, "width": 32}, "animati…