|
|
|
|
|
|
|
|
let deg = this.randomNum(-30, 30);
|
|
|
let deg = this.randomNum(-30, 30);
|
|
|
this.ctx.translate(dis, this.options.height * 0.5);
|
|
|
this.ctx.translate(dis, this.options.height * 0.5);
|
|
|
this.ctx.rotate(deg * Math.PI / 180);
|
|
|
this.ctx.rotate(deg * Math.PI / 180);
|
|
|
this.ctx.fillText(item, 0, 0);
|
|
|
|
|
|
|
|
|
this.ctx.fillText(item, 0, 3);
|
|
|
this.ctx.rotate(-deg * Math.PI / 180);
|
|
|
this.ctx.rotate(-deg * Math.PI / 180);
|
|
|
this.ctx.translate(-dis, -this.options.height * 0.5);
|
|
|
this.ctx.translate(-dis, -this.options.height * 0.5);
|
|
|
})
|
|
|
})
|