This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { delay } from "rxjs/operators/delay"; | |
| import { Observable } from "rxjs/Observable"; | |
| import { Subject } from "rxjs/Subject"; | |
| import { Subscription } from "rxjs/Subscription"; | |
| import { v4 as uuid } from 'uuid'; | |
| /** | |
| * Default scheduler task interface | |
| * | |
| * @export |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <title>Url Spectrum</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <link rel="stylesheet" type="text/css" media="screen" href="main.css" /> | |
| <script> | |
| const chars = ["⡀", "⢠", "⢰", "⢸"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function deepClone(obj) { | |
| var copy; | |
| // Handle the 3 simple types, and null or undefined | |
| if (null == obj || "object" != typeof obj) return obj; | |
| // Handle Date | |
| if (obj instanceof Date) { | |
| copy = new Date(); | |
| copy.setTime(obj.getTime()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private getAverageRGB(imgEl) { | |
| const blockSize = 5; // only visit every 5 pixels | |
| const defaultRGB = { r: 0, g: 0, b: 0 }; // for non-supporting envs | |
| const canvas = document.createElement('canvas'); | |
| const context = canvas.getContext && canvas.getContext('2d'); | |
| const rgb = { r: 0, g: 0, b: 0 }; | |
| let data, width, height; | |
| let i = -4; | |
| let length; | |
| let count = 0; |