Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- flashlight(color: String, time: any): Promise<any> {
- return new Promise(resolve => {
- setTimeout(function() {
- // this.drawLight(color);
- const c: any = document.getElementById('flashlight');
- const ctx = c.getContext('2d');
- ctx.beginPath();
- ctx.arc(c.width / 2, c.height - 50, 50, 0, 2 * Math.PI);
- ctx.fillStyle = color;
- ctx.fill();
- ctx.stroke();
- resolve(true);
- }, time);
- });
- }
Add Comment
Please, Sign In to add comment