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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@osobh/reactar

v0.0.3

Published

AR Library for React Native and Expo

Readme

reactAR

reactAR is a comprehensive Augmented Reality (AR) library for React Native and Expo projects. It provides tools for AR session management, rendering, sensor integration, and more—enabling you to build immersive AR experiences on both iOS and Android.

Features

  • Core AR Session & Rendering

    • Manage AR sessions (initialize, start, pause/resume, stop).
    • Integrate with Expo's Camera module for live video feed.
    • Render AR content using GLView and Three.js (via expo-three).
    • Basic 3D scene graph setup with sample objects.
  • Sensors & Tracking

    • Integrate device sensors like Accelerometer, Gyroscope, and DeviceMotion.
    • Environmental detection features such as plane detection and hit testing.
    • Support for anchoring virtual objects to real-world positions.
  • Asset Management & Loading

    • Load and cache 3D models, textures, and other assets using Expo's Asset and FileSystem modules.
  • User Interaction & UI

    • Gesture handling with GestureHandler for intuitive AR interactions.
    • In-AR UI overlays and controls with React components.
  • Media, Audio & Recording

    • Capture screenshots or record AR sessions using Expo's captureRef.
    • Spatial audio integration via expo-av for enhanced immersion.
  • Utilities & Cross-Platform Support

    • Performance monitoring and debugging tools.
    • Cross-platform support for ARKit (iOS) and ARCore (Android).

Installation

Install the package via npm or yarn:

npm install reactAR
# or
yarn add reactAR

API Reference

ARSession

The ARSession class manages the AR session lifecycle. • Methods: • initialize(): Promise Requests camera and sensor permissions, then initializes the AR session. • start(): void Starts the AR session, initiating the camera feed and sensor tracking. • pause(): void Pauses the session, suspending camera and sensor updates. • resume(): void Resumes the session from a paused state. • stop(): void Stops the session and cleans up resources. • getState(): ARSessionState Returns the current state of the AR session.

ARRenderer

The ARRenderer React component sets up a 3D scene using Expo’s GLView and Three.js. It handles the rendering loop and displays sample AR content, which you can extend or replace with your custom AR objects.

Project Structure

reactAR/ ├── src/ │ ├── core/ │ │ ├── ARSession.ts // AR session management (no JSX) │ │ └── ARRenderer.tsx // AR rendering component (uses JSX) │ ├── sensors/ │ │ ├── DeviceTracking.ts // Sensor data and device tracking logic │ │ └── EnvironmentalDetection.ts // Environmental detection logic │ ├── assets/ │ │ └── AssetManager.ts // Asset loading and caching utilities │ ├── ui/ │ │ └── GestureHandler.tsx // UI component for gesture handling │ ├── media/ │ │ └── MediaCapture.ts // Media capture utilities │ └── index.ts // Main export entry point ├── package.json ├── README.md ├── tsconfig.json // TypeScript configuration └── tests/ └── (unit and integration tests)