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

facebetter

v1.4.6

Published

Face beauty effects SDK with WebAssembly support

Readme

Facebetter Web SDK

Facebetter is a high-performance, cross-platform SDK for real-time face beauty and AR effects. The Web version leverages WebAssembly (WASM) and WebGL acceleration to provide professional-grade skin retouching, face reshaping, makeup, and virtual background capabilities directly in the browser.

🔗 Quick Links


🌟 Key Features

  • Extreme Performance: Optimized with WASM and SIMD instructions for low-latency, real-time processing on all modern browsers.
  • Advanced Skin Retouching: Smoothing, whitening, rosy tint, and sharpening for a natural, high-end look.
  • Precise Face Reshaping: Comprehensive adjustments for face thinning, V-shape, eye enlargement, nose slimming, and chin/forehead contouring.
  • Professional Makeup: Real-time application of lipstick, blush, and more with parametric intensity control.
  • AI Virtual Background: High-precision portrait segmentation for background blur and custom image replacement.
  • Premium Effects: Includes 20+ real-time filters, animated stickers (in development), and professional-grade Chroma Key (Green Screen) removal.
  • Developer Friendly: Clean, well-documented JS API. Integrated in minutes with support for various input sources (Image, Video, Canvas, ImageData).
  • Cross-Platform Consistency: Shared core algorithms with Android, iOS, and Desktop SDKs ensure a unified experience across all devices.

📦 Installation

via npm (Recommended)

Ideal for modern frontend environments like Vite, Webpack, React, or Vue.

npm install facebetter

via CDN

For direct browser usage.

<!-- Import SDK via CDN -->
<script src="https://cdn.jsdelivr.net/npm/facebetter/dist/facebetter.js"></script>

🚀 Quick Start

1. Initialize the Engine

Facebetter supports both online activation via appId / appKey and offline activation via licenseJson.

import { BeautyEffectEngine, EngineConfig } from 'facebetter';

// 1. Configure the engine
const config = new EngineConfig({
  appId: 'YOUR_APP_ID',
  appKey: 'YOUR_APP_KEY',
  // Or use offline license
  // licenseJson: '{...}'
});

// 2. Create engine instance
const engine = new BeautyEffectEngine(config);

// 3. Initialize (Loads WASM resources and performs authentication)
try {
  await engine.init();
  console.log('Facebetter Engine initialized successfully');
} catch (error) {
  console.error('Initialization failed:', error);
}

2. Configure Beauty Parameters

import { BeautyType, BasicParam, ReshapeParam } from 'facebetter';

// Enable specific beauty modules
engine.setBeautyTypeEnabled(BeautyType.Basic, true);   // Basic skin retouching
engine.setBeautyTypeEnabled(BeautyType.Reshape, true); // Face reshaping

// Set skin smoothing intensity (0.0 - 1.0)
engine.setBasicParam(BasicParam.Smoothing, 0.8);
// Set eye enlargement intensity (0.0 - 1.0)
engine.setReshapeParam(ReshapeParam.EyeSize, 0.5);

3. Process Video Stream

const videoElement = document.querySelector('video');
const canvas = document.querySelector('canvas');
const ctx = canvas.getContext('2d');

function processFrame() {
  if (engine.initialized) {
    // Process the current frame and get the result as ImageData
    const resultData = engine.processImage(videoElement);
    
    // Render to your canvas
    if (resultData) {
      ctx.putImageData(resultData, 0, 0);
    }
  }
  requestAnimationFrame(processFrame);
}

processFrame();

🛠️ API Overview

Core Methods

| Method | Description | | :--- | :--- | | init() | Asynchronously initializes the engine and loads assets. | | setBeautyTypeEnabled(type, enabled) | Toggle specific modules (Basic, Reshape, Makeup, Background). | | setBasicParam(param, value) | Adjust skin retouching settings (Smoothing, Whitening, etc.). | | setReshapeParam(param, value) | Adjust face reshaping settings (Thinning, Eye Size, etc.). | | setMakeupParam(param, value) | Adjust makeup intensity (Lipstick, Blush, etc.). | | setFilter(path, intensity) | Apply a LUT filter with custom intensity. | | setVirtualBackground(options) | Configure background blur or image replacement. | | processImage(source) | Process an input source (Image, Video, Canvas, or ImageData). | | destroy() | Clean up resources and release WebAssembly memory. |


⚠️ Important Notes

  1. WASM Asset Path: By default, the SDK expects WASM and asset bundles in the /facebetter/ directory. Ensure your static asset server is configured correctly.
  2. Secure Context: The SDK requires a Secure Context (HTTPS or localhost) to access modern browser features.
  3. Performance Optimization:
    • Always call processImage within a requestAnimationFrame loop.
    • Match input resolution with the display canvas to avoid unnecessary scaling overhead.
  4. Memory Management: Always call engine.destroy() when the engine is no longer needed to prevent memory leaks in Single Page Applications (SPAs).

📄 Licensing & Support

Facebetter offers a Free Tier and Enterprise Licensing:

  • Free Tier: 5,000 free minutes per month, including all Pro+ features (with watermark).

  • Enterprise: Watermark-free, usage-based or perpetual licensing with priority support.

  • For technical support, visit Facebetter.net.

  • For commercial licensing inquiries, contact [email protected].

Copyright © 2025 Pixpark. All rights reserved.