Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.04 KB

README.md

File metadata and controls

42 lines (33 loc) · 1.04 KB

#Web Grider A nodejs package which draw the grid behind webpages

Use

import { GridReveal } from "grid-reveal";
const g = new GridReveal();
await g.init();
const {originalBase64, gridBase64} = await g.renderPage("ENCODED_URL", opts);

Options

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
}

Examples

youtube-homepage youtube-homepage

development