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

@oxyfoo/avatar-factory

v1.2.3

Published

Performant asset management for React Native

Readme

AvatarFactory

High-performance 2D avatar rendering library for React Native with native Metal (iOS) and OpenGL ES (Android) rendering engines.

Installation

npm install @oxyfoo/avatar-factory

Usage

import { AvatarFrame, AvatarCharacter } from '@oxyfoo/avatar-factory';

function MyComponent() {
  return (
    <AvatarFrame
      width={300}
      height={300}
      backgroundColor="#f0f0f0"
    >
      <AvatarCharacter
        body="human_00"
        bodyColor="#ffdbac"
        position={{ x: 0, y: 0 }}
        rotation={{ z: 0 }}
        scale={1.0}
        items={[
          { id: 'hair_00' },
          { id: 'top_00', color: '#ff0000' },
          { id: 'bottom_00', color: '#0000ff' },
          { id: 'shoes_00' }
        ]}
      />
    </AvatarFrame>
  );
}

API

Components

  • <AvatarFrame> - Container component for rendering avatars
  • <AvatarCharacter> - Defines an avatar to render inside the frame

Functions

  • getTechnology() - Returns the rendering technology: 'Metal', 'OpenGL ES', 'Lite', or 'Unknown'

Note: All props are documented with TypeScript types and JSDoc comments. Use your IDE's autocomplete for detailed prop information.

Development

Build

npm run lint        # Lint code
npm run typecheck   # Type checking
npm run build       # Build TypeScript

Example app

cd Example
npm install
npm start

# Then
npm run ios         # Run on iOS simulator
npm run android     # Run on Android emulator

Multi-Avatar Stress Test

To test the SharedTextureManager with multiple avatars:

  1. Edit Example/index.js and change:

    import App from './App';
    // to
    import App from './AppMultiTest';
  2. Run the app - you can now display 5, 10, 20, or 30+ avatars simultaneously!

Architecture

┌─────────────────────────────────────────────────────────┐
│           SharedTextureManager (Singleton)              │
│  ┌───────────────────────────────────────────────────┐  │
│  │  Global Texture Cache                             │  │
│  │  - Reference counting                             │  │
│  │  - Automatic cleanup                              │  │
│  │  - Thread-safe operations                         │  │
│  └───────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────┘
         ▲              ▲              ▲
         │              │              │
    ┌────┴────┐    ┌────┴────┐    ┌────┴────┐
    │ Avatar  │    │ Avatar  │    │ Avatar  │
    │ Frame 1 │    │ Frame 2 │    │ Frame N │
    └─────────┘    └─────────┘    └─────────┘

Each AvatarFrame shares the same texture cache, dramatically reducing memory usage.

License

UNLICENSED