목차
[images]
[screenshot]
[script]
[style]
index.html
[screenshot]
[script]
[style]
index.html
본문내용
var puzzle = function(canvas){
this.canvas = canvas;
this.stage = canvas.getContext(\\"2d\\");
this.imgArray = [\\"./images/iu.jpg\\", \\"./images/borakai.jpg\\", \\"./images/nalyu.jpg\\", \\"./images/praha.jpg\\", \\"./images/news.jpg\\", \\"./images/jeju.jpg\\", \\"./images/sulak.jpg\\", \\"./images/glove.jpg\\", \\"./images/bird.jpg\\", \\"./images/cat.jpg\\"];
this.imageWidth = 0;
this.imageHeight = 0;
this.canvasWidth = 0;
this.canvasHeight = 0;
this.pieceWidth = 0;
this.pieceHeight = 0;
this.pieces = [];
this.currentPiece = null;
this.currentDropPiece = null;
this.coord = {x:0, y:0};
this.img = null;
this.tint = \\"lightgray\\";
this.sBtn = null;
this.imgSrc = \\"./images/iu.jpg\\";
this.startTime = null;
this.endTime = null;
}
puzzle.prototype.ready = function(){
var s = this, c = s.canvas, g = s.stage;
s.img = null;
s.img = new Image();
s.imgSrc = lottery(s.imgArray);
s.img.src = s.imgSrc;
......
this.canvas = canvas;
this.stage = canvas.getContext(\\"2d\\");
this.imgArray = [\\"./images/iu.jpg\\", \\"./images/borakai.jpg\\", \\"./images/nalyu.jpg\\", \\"./images/praha.jpg\\", \\"./images/news.jpg\\", \\"./images/jeju.jpg\\", \\"./images/sulak.jpg\\", \\"./images/glove.jpg\\", \\"./images/bird.jpg\\", \\"./images/cat.jpg\\"];
this.imageWidth = 0;
this.imageHeight = 0;
this.canvasWidth = 0;
this.canvasHeight = 0;
this.pieceWidth = 0;
this.pieceHeight = 0;
this.pieces = [];
this.currentPiece = null;
this.currentDropPiece = null;
this.coord = {x:0, y:0};
this.img = null;
this.tint = \\"lightgray\\";
this.sBtn = null;
this.imgSrc = \\"./images/iu.jpg\\";
this.startTime = null;
this.endTime = null;
}
puzzle.prototype.ready = function(){
var s = this, c = s.canvas, g = s.stage;
s.img = null;
s.img = new Image();
s.imgSrc = lottery(s.imgArray);
s.img.src = s.imgSrc;
......
소개글