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 🙏

© 2024 – Pkg Stats / Ryan Hefner

sparkar-smoother

v0.2.2

Published

Make object smoothly follow facial features with object's naming.

Downloads

15

Readme

Smoother

index

Smoother is a Spark AR tool to let you make object follow facial feature with exponential smooth WITHOUT Any Additional Patch or Script.

Install

Import

  1. Download Smoother.js (Right click and Save as)

  2. Drag/Drop or import it to Spark AR

  3. (Optional) Load in the required modules

    const Smoother = require('./Smoother');
    // Your script...
  4. You can also Click Here to Download a Sample Project.

npm

  1. Add package with yarn or npm

    yarn add sparkar-smoother

    or

    npm i sparkar-smoother
  2. Load in the required modules. If you use webpack to transpile code, you must import this module.

    const Smoother = require('sparkar-smoother');
    // Your script...

Usage

This tool make object follow head by naming, so you don't need to add any Patch or write any code. All you need to do is naming your scene object.

The name should follow this pattern: face<index> -s<ms> [<feature>] [-noR]

  • index: 0-5. Spark AR supports detection of up to 5 faces.
  • ms: Smooth milliseconds, the minimum valid value is 0.
  • feature: Click here to look up supported feature and keyword.
  • noR: Follow position only, without rotation.

There are some naming example:

| Name Pattern | Description | | ------------------ | ------------------------------------------------------------ | | face0 -s500 | Follow the face of index 0 with exponential smooth 500 millisecond. | | face1 -s300 | Follow the face of index 1 with exponential smooth 300 millisecond. | | face2 -s0 | Follow the face of index 1 without any smooth exponential smooth. | | face3 -s0 -noR | Follow the face of index 3 position only, excluding rotation. | | face3 -s50 eyeL | Follow the left eye of face 3 with exponential smooth 50 millisecond. | | face4 -s50 eyeR | Follow the right eye of face 4 with exponential smooth 50 millisecond. | | face4 -s20 mouth | Follow the mouth of face 4 with exponential smooth 50 millisecond. |

Please Note that you may need to add the max number of Face Tracking manually for detect more than one face: Project > Edit Properties > Capabilities

Facial Feature Keywords

| Keywords | Description | | ----------- | ------------------------ | | eyeL | Left Eye | | eyebowL | Left Eyebow | | eyeLOC | Left Eye Outside Corner | | eyelidLU | Left Eyelid Upper | | eyeR | Right Eye | | eyebowR | Right Eyebow | | eyeROC | Right Eye Outside Corner | | eyelidRU | Right Eyelid Upper | | mouth | Mouth | | mouthlipU | Mouth Upperlip | | mouthlipD | Mouth Lowerlip | | mouthLC | Mouth Left Corner | | mouthRC | Mouth Right Corner | | foreheadT | Forehead top |

Additional

  • You can change all of these keywords in the CONFIG field of source code.
  • By default if the face of specific index in not detected, the corresponding scene object will be hidden. You can set it in the CONFIG field of source code.
  • You can set up Smoother.enable in your script to toggle smooth effect.

Donations

If this is useful for you, please consider a donation🙏🏼. One-time donations can be made with PayPal.