npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@face-auth/face-id-video-guidelines

v0.0.5

Published

face-id-video-guidelines is an npm package that provides on-screen visual guides over the live video stream to help users correctly position their face. This improves the quality and consistency of face capture and ensures better results when using the fa

Downloads

797

Readme

@face-auth/face-id-video-guidelines

Visual face-alignment guides for browser video streams. Current package version: 0.0.5.

Installation

npm install @face-auth/face-id-video-guidelines

Public Exports

  • FaceGuidelines
  • GuidelinesOptions
  • OvalDimensions

Quick Start

import { FaceGuidelines } from "@face-auth/face-id-video-guidelines";

const video = document.getElementById("videoRef") as HTMLVideoElement;
const guidelines = new FaceGuidelines(video);

navigator.mediaDevices.getUserMedia({ video: true }).then((stream) => {
  video.srcObject = stream;
  video.onloadedmetadata = () => {
    video.play();
    guidelines.start();
  };
});

FaceGuidelines

Creates and manages a canvas overlay synchronized with an existing HTMLVideoElement.

import { FaceGuidelines } from "@face-auth/face-id-video-guidelines";

const guidelines = new FaceGuidelines(videoElement, {
  oval: {
    line: {
      strokeStyle: "#22C55E",
    },
  },
});

Constructor

  • new FaceGuidelines(videoElement: HTMLVideoElement, options?: GuidelinesOptions)

Methods

  • start(): void
  • stop(): void
  • updateOptions(partialOptions: GuidelinesOptions): void
  • getOvalDimensions(): OvalDimensions
  • destroy(): void

Behavior summary

  • start() begins the render loop and is safe to call again.
  • stop() stops rendering and clears the current overlay.
  • updateOptions(...) deep-merges partial changes into previous options.
  • destroy() stops rendering, disconnects overlay syncing, and removes the overlay canvas from the DOM.

GuidelinesOptions

export interface GuidelinesOptions {
  text?: {
    drawText?: boolean | null;
    text?: string | null;
    textColor?: string | null;
    font?: string | null;
    x?: number | null;
    y?: number | null;
  };
  oval?: {
    size?: {
      x?: number | null;
      y?: number | null;
      radiusX?: number | null;
      radiusY?: number | null;
      scale?: number | null;
    };
    line?: {
      drawLine?: boolean | null;
      strokeStyle?: string | null;
      lineWidth?: number | null;
      lineDash?: number[] | null;
      lineDashOffset?: number | null;
      lineCap?: CanvasLineCap | null;
      lineJoin?: CanvasLineJoin | null;
      opacity?: number | null;
    };
    overlay?: {
      drawOverlay?: boolean | null;
      color?: string | null;
    };
  };
}

Defaults

Text

| Option | Default | | --- | --- | | text.drawText | false | | text.text | "Align your face" | | text.textColor | "#FFFFFF" | | text.font | "30px Arial" | | text.x | videoWidth / 2 | | text.y | videoHeight - 50 |

Oval

| Option | Default | | --- | --- | | oval.size.x | videoWidth / 2 | | oval.size.y | videoHeight / 2 - 20 | | oval.size.radiusX | 120 | | oval.size.radiusY | 160 | | oval.size.scale | 1 |

Line

| Option | Default | | --- | --- | | oval.line.drawLine | true | | oval.line.strokeStyle | "#FFFFFF" | | oval.line.lineWidth | 4 | | oval.line.lineDash | [10, 15] | | oval.line.lineDashOffset | 0 | | oval.line.lineCap | "round" | | oval.line.lineJoin | "round" | | oval.line.opacity | 0.8 |

Overlay

| Option | Default | | --- | --- | | oval.overlay.drawOverlay | true | | oval.overlay.color | "rgba(0, 0, 0, 0.35)" |

Runtime Update Semantics

updateOptions(...) is intended for visual changes driven by parent state.

  • Partial updates preserve previous values for omitted fields.
  • Values are sanitized before rendering.
  • If the loop is active, changes are rendered immediately.
  • If the loop is stopped, changes are applied on the next start().

Example:

guidelines.updateOptions({
  oval: {
    line: {
      strokeStyle: "#3B82F6",
      lineDash: [],
    },
  },
  text: {
    drawText: true,
    text: "Center your face",
  },
});

OvalDimensions

getOvalDimensions() returns:

{
  x: number;
  y: number;
  radiusX: number;
  radiusY: number;
  scale: number;
}

Browser Support

  • Browser runtime only.
  • Requires an existing HTMLVideoElement.
  • For the first accurate render, call start() after video metadata is loaded.