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

@three-ws/viewer-presets

v0.2.0

Published

Tuned visual presets for three.ws avatar viewers — light rigs, floor reflection, and bloom configs derived from Ready Player Me's visage (MIT).

Readme


@three-ws/viewer-presets is a small, data-first package of visual presets for 3D avatar viewers: a five-light rig, floor-reflection parameters, and a bloom configuration. The tuning values are derived from Ready Player Me's open-source visage viewer (MIT) and re-tuned for three.ws, so avatars render color-accurate to that reference setup. It's framework-agnostic: presets are plain frozen objects, and the one factory (buildLightRig) takes your THREE namespace as an argument instead of importing Three.js itself.

Install

npm install @three-ws/viewer-presets

three (>=0.150.0) is an optional peer dependency — only buildLightRig() touches it, and you pass your own THREE namespace in. The preset constants and the floorReflectionConfig / bloomConfig helpers are pure data and need nothing.

Usage

import * as THREE from 'three';
import { buildLightRig, floorReflectionConfig, bloomConfig } from '@three-ws/viewer-presets';

// 1. Build the five-light avatar rig as a THREE.Group and add it to your scene.
const { group, headTarget, shoeTarget } = buildLightRig(THREE);
scene.add(group);

// 2. Floor reflection config — `color` must match your canvas background.
const floor = floorReflectionConfig({ color: '#0b0b12' });
// feed `floor` into MeshReflectorMaterial (or your own reflector)

// 3. Bloom config — feed into the `postprocessing` Bloom effect (or equivalent).
const bloom = bloomConfig({ intensity: 0.15 });

You can also import each preset from its own subpath:

import { LIGHT_CONFIG, buildLightRig } from '@three-ws/viewer-presets/lights';
import { FLOOR_REFLECTION_DEFAULTS, floorReflectionConfig } from '@three-ws/viewer-presets/floor';
import { BLOOM_DEFAULTS, bloomConfig } from '@three-ws/viewer-presets/bloom';

Presets

Light rig (./lights)

buildLightRig(THREE, overrides?) returns a THREE.Group containing five spotlights — fill (blue rim), back (warm rim), key (soft face fill), lift (body/shoe wash), and silhouette (arms/legs) — plus a head target and shoe target the lights aim at. Positions, angles, intensities, and colors come from LIGHT_CONFIG; overrides patches the defaults block (e.g. keyLightIntensity, fillLightColor, backLightPosition, lightTarget).

Floor reflection (./floor)

FLOOR_REFLECTION_DEFAULTS holds reflector parameters (resolution, mixBlur, mixStrength, blur, mirror, depth thresholds, planeSize, fog range, …) using the same names as visage's FloorReflection component. floorReflectionConfig(props) merges your overrides; color is required and should match the canvas background so the plane fades in seamlessly.

Bloom (./bloom)

BLOOM_DEFAULTS is a verbatim-tuned bloom config (luminanceThreshold, luminanceSmoothing, mipmapBlur, intensity, kernelSize). bloomConfig(overrides?) merges your changes over it.

API

| Export | Signature | |---|---| | buildLightRig(THREE, overrides?) | (THREE, Partial<LightingOverrides>) => { group, headTarget, shoeTarget } | | LIGHT_CONFIG | Frozen LightConfig (angles, positions, and a defaults overrides block). | | floorReflectionConfig(props) | (Partial<FloorReflectionProps> & { color }) => FloorReflectionProps; throws if color is missing. | | FLOOR_REFLECTION_DEFAULTS | Frozen floor-reflection defaults (no color). | | bloomConfig(overrides?) | (Partial<BloomProps>) => BloomProps | | BLOOM_DEFAULTS | Frozen bloom defaults. |

Requirements

  • Node >=18.
  • Optional peer dependency: three >=0.150.0 (only for buildLightRig; passed in, not imported).
  • Run the test suite with npm test (Node's built-in node:test).

Attribution

Preset values are derived from Ready Player Me's visage viewer (MIT) and re-tuned for three.ws. See NOTICE for details. This package is distributed under Apache-2.0.

Related packages

Links

  • Homepage: https://three.ws
  • Changelog: https://three.ws/changelog
  • Issues: https://github.com/nirholas/three.ws/issues
  • License: Apache-2.0 — see LICENSE