slot5/js/slot.js
function _fill_canvas(canvas, items) {
            var ctx = canvas.getContext('2d');
            ctx.fillStyle = '#ddd';

            for (var i = 0; i < ITEM_COUNT; i++) {
                var asset = items[i];
                ctx.save();
                ctx.shadowColor = "rgba(0,0,0,0.5)";
                ctx.shadowOffsetX = 5;
                ctx.shadowOffsetY = 5;
                ctx.shadowBlur = 5;
                ctx.drawImage(asset.img, 3, i * SLOT_HEIGHT + IMAGE_TOP_MARGIN);
                ctx.drawImage(asset.img, 3, (i + ITEM_COUNT) * SLOT_HEIGHT + IMAGE_TOP_MARGIN);
                ctx.restore();
                ctx.fillRect(0, i * SLOT_HEIGHT, 70, SLOT_SEPARATOR_HEIGHT);
                ctx.fillRect(0, (i + ITEM_COUNT) * SLOT_HEIGHT, 70, SLOT_SEPARATOR_HEIGHT);
            }
        }
function _fill_canvas(canvas, items) {
            var ctx = canvas.getContext('2d');
            ctx.fillStyle = '#ddd';

            for (var i = 0; i < ITEM_COUNT; i++) {
                var asset = items[i];
                ctx.save();
                ctx.shadowColor = "rgba(0,0,0,0.5)";
                ctx.shadowOffsetX = 5;
                ctx.shadowOffsetY = 5;
                ctx.shadowBlur = 5;
                ctx.drawImage(asset.img, 3, i * SLOT_HEIGHT + IMAGE_TOP_MARGIN);
                ctx.drawImage(asset.img, 3, (i + ITEM_COUNT) * SLOT_HEIGHT + IMAGE_TOP_MARGIN);
                ctx.restore();
                ctx.fillRect(0, i * SLOT_HEIGHT, 70, SLOT_SEPARATOR_HEIGHT);
                ctx.fillRect(0, (i + ITEM_COUNT) * SLOT_HEIGHT, 70, SLOT_SEPARATOR_HEIGHT);
            }
        }
function _fill_canvas ( canvas , items ) { var ctx = canvas . getContext ( '2d' ) ; ctx . fillStyle = '#ddd' ; for ( var i = 0 ; i < ITEM_COUNT ; i ++ ) { var asset = items [ i ] ; ctx . save ( ) ; ctx . shadowColor = "rgba(0,0,0,0.5)" ; ctx . shadowOffsetX = 5 ; ctx . shadowOffsetY = 5 ; ctx . shadowBlur = 5 ; ctx . drawImage ( asset . img , 3 , i * SLOT_HEIGHT + IMAGE_TOP_MARGIN ) ; ctx . drawImage ( asset . img , 3 , ( i + ITEM_COUNT ) * SLOT_HEIGHT + IMAGE_TOP_MARGIN ) ; ctx . restore ( ) ; ctx . fillRect ( 0 , i * SLOT_HEIGHT , 70 , SLOT_SEPARATOR_HEIGHT ) ; ctx . fillRect ( 0 , ( i + ITEM_COUNT ) * SLOT_HEIGHT , 70 , SLOT_SEPARATOR_HEIGHT ) ; } }
all loaded draws canvas strip
all loaded draws canvas strip