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

@unopsitg/page-assistant-react

v0.2.2

Published

Interactive 3D character assistant React component — walks, points, speaks, and guides tours

Readme

@unopsitg/page-assistant-react

A React component that renders an interactive 3D character assistant on your page. The character can walk to elements, point at things, speak using Web Speech API, and guide users through tours.

Built on React Three Fiber and Three.js with Mixamo-rigged GLB models.

Installation

npm install @unopsitg/page-assistant-react

Peer dependencies

Your project must also have these installed:

npm install react react-dom three @react-three/fiber meshoptimizer

| Peer dependency | Version | |----------------|---------| | react | >= 18 | | react-dom | >= 18 | | three | >= 0.150 | | @react-three/fiber | >= 9 | | meshoptimizer | >= 0.20 |

Quick start

Wrap your app (or a subtree) in PageAssistantProvider, then use the usePageAssistant hook to control the character:

import { PageAssistantProvider, usePageAssistant } from '@unopsitg/page-assistant-react';

function App() {
  return (
    <PageAssistantProvider characterId="amy">
      <MyPage />
    </PageAssistantProvider>
  );
}

function MyPage() {
  const assistant = usePageAssistant();

  return (
    <div>
      <button onClick={() => assistant.show()}>Show</button>
      <button onClick={() => assistant.walkTo('#features')}>Walk to Features</button>
      <button onClick={() => assistant.say('Welcome!')}>Speak</button>
      <button onClick={() => assistant.wave()}>Wave</button>
    </div>
  );
}

Provider props

| Prop | Type | Default | Description | |------|------|---------|-------------| | characterId | string | First key in characters | Which character to render. | | characters | Record<string, CharacterDefinition> | Built-in set | Custom character definitions. Replaces the built-in set entirely. | | containerMode | boolean | false | Render inside a sized container instead of a full-viewport overlay. | | width | string \| number | — | Container width (when containerMode is true). | | height | string \| number | — | Container height (when containerMode is true). | | className | string | — | CSS class applied to the canvas wrapper. | | initiallyVisible | boolean | true | Whether the character is visible on mount. | | reducedMotion | boolean | false | Suppress the 3D canvas entirely. | | stickyHeaderSelector | string | — | CSS selector for a sticky/fixed header. Scroll calculations offset by its height. |

API

The usePageAssistant() hook returns a PageAssistantAPI object:

Movement

| Method | Description | |--------|-------------| | walkTo(target, options?) | Walk to a DOM element or CSS selector. Auto-scrolls if needed. | | walkToPosition(screenX, screenY, options?) | Walk to screen coordinates. | | setPosition(screenX, screenY) | Snap to a position instantly. |

Gestures

| Method | Description | |--------|-------------| | wave(options?) | Wave animation (one-shot). | | point(options?) | Point animation (one-shot). | | pointAt(target, options?) | Aim an arm at a DOM element, selector, or {x, y}. | | talk(options?) | Talking animation (looping). | | dance(options?) | Dance animation (looping). | | idle() | Return to idle. |

Orientation

| Method | Description | |--------|-------------| | lookAt(target) | Turn head toward a DOM element or selector. | | lookAtCursor() | Continuously track the mouse cursor. | | lookForward() | Stop tracking and face forward. | | followCursorWithArms() | Point arms at cursor position. | | stopFollowingCursorWithArms() | Stop arm tracking. | | turnLeft() / turnRight() | Rotate the body. | | straightenUp() | Reset body rotation. |

Visibility

| Method | Description | |--------|-------------| | show() | Make the character visible. | | hide() | Hide the character. |

Speech

| Method | Description | |--------|-------------| | say(text, options?) | Speak using Web Speech API with an optional voice preference. | | stopSpeaking() | Stop current speech. | | showBubble(data) | Show a speech bubble with title/description. | | hideBubble() | Hide the speech bubble. | | getAvailableVoices() | List available SpeechSynthesisVoice objects. |

Tours

| Method | Description | |--------|-------------| | startTour(config) | Begin a guided tour. | | nextStep() / prevStep() | Navigate tour steps. | | restartTour() | Restart from step 0. | | stopTour() | End the tour. |

State (read-only)

| Property | Type | |----------|------| | isVisible | boolean | | isFollowingCursor | boolean | | isFollowingWithArms | boolean | | currentState | AssistantState | | isTourActive | boolean | | currentTourStep | number | | tourStepCount | number |

Events

| Method | Description | |--------|-------------| | onStateChange(cb) | Subscribe to state changes. Returns unsubscribe function. | | onClick(cb) | Subscribe to character clicks. | | onHover(cb) | Subscribe to hover enter/leave. |

Custom characters

Pass a characters record to replace the built-in set with your own models:

import { PageAssistantProvider } from '@unopsitg/page-assistant-react';
import type { CharacterDefinition } from '@unopsitg/page-assistant-react';

const MY_CHARACTERS: Record<string, CharacterDefinition> = {
  robot: {
    id: 'robot',
    label: 'Robot',
    sex: 'male',
    modelPath: '/models/robot.glb',
    modelHeight: 1.47,
    modelScale: 1,
  },
};

<PageAssistantProvider characters={MY_CHARACTERS} characterId="robot">
  <App />
</PageAssistantProvider>

Models must be GLB files with a Mixamo-compatible skeleton and these animation clips: Idle, Walk, Point, Wave, Talk, Dance.

See the monorepo README for the full CharacterDefinition schema and model requirements.

3D assets

Character GLB models are not bundled in this package. They are loaded at runtime from the URL specified in each character's modelPath. The built-in characters expect models at /models/<name>.glb — you must host these files on your server or CDN.

Exports

This package re-exports key items from @unopsitg/page-assistant-core for convenience:

  • CHARACTERS, DEFAULT_CHARACTER_ID (constants)
  • All types: PageAssistantAPI, CharacterDefinition, TourConfig, AssistantState, etc.

Related packages

| Package | Description | |---------|-------------| | @unopsitg/page-assistant-core | Shared types, constants, and utilities | | @unopsitg/page-assistant-web-component | Framework-agnostic <page-assistant> custom element |

License

MIT