(function() {
    var qcanvas = new Qcanvas({
        id: 'qcanvas',
        width: 300,
        height: 200
    });
    qcanvas.load({
        "person": "../img/spirit1.png",
    }, function() {

        var spiritSource = qcanvas.getSourceByName("person");

        qcanvas.spirit({
            img: spiritSource,
            row: 1,
            column: 8,
            framesIndex: [0, 0],
            tStart: [0, 120],
            tWidth: 40,
            tHeight: 64,
            isLoop: true,
            during: 1,
            degree: 30,
            mouseup: function() {
                console.log(this);
                console.log('触发mouseup事件');
            }
        })
    })


})();

(function() {
    var qcanvas = new Qcanvas({
        id: 'qcanvas1',
        width: 300,
        height: 200
    });

    qcanvas.spirit({
        // img:spiritSource,
        img: '../img/spirit1.png',
        row: 1,
        column: 8,
        framesIndex: [0, 0],
        tStart: [0, 120],
        tWidth: 40,
        tHeight: 64,
        isLoop: true,
        during: 1,
        mouseup: function() {
            console.log(this);
            console.log('触发mouseup事件');
        }
    })

})()