#Web Grider A nodejs package which draw the grid behind webpages
import { GridReveal } from "grid-reveal";
const g = new GridReveal();
await g.init();
const {originalBase64, gridBase64} = await g.renderPage("ENCODED_URL", opts);
interface Viewport {
//he page width in pixels.
width: number;
//The page height in pixels.
height: number;
}
interface TGridRevealRenderOptions{
/*Int value, if presents, elements with less text length will be ignored*/
textLength?: number|null,
/*float value 0-1, if present the more the bigger blocks (less details)*/
sizeThreshold?: number|null,
}
type TGridRevealRenderPageOptions = {
viewPort?: Viewport,
renderOptions?: TGridRevealRenderOptions
}
- packaged by tsdx