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

react-three-fiber-8thwall

v0.1.6

Published

Run React Three Fiber and 8th Wall together — one canvas, one WebGLRenderer; XR8 drives render and frame tick.

Readme

react-three-fiber-8thwall

Starter for Web AR: run React Three Fiber and 8th Wall together — one canvas, one WebGLRenderer, one render path.

Demo: react-three-fiber-8thwall.vercel.app
npm: react-three-fiber-8thwall
Article: React Three Fiber and 8th Wall on One WebGLRenderer

One canvas, one WebGLRenderer — XR8 drives the runtime; R3F owns the scene graph

Benefits

  • One canvas, one WebGLRenderer — R3F reuses XR8’s gl, scene, and camera. No nested <Canvas>, no second renderer.
  • One draw path — XR8.Threejs renders the camera feed + scene. StopR3FRender stops R3F from also calling gl.render.
  • Stable frame timing — R3F frameloop: "never"; XR8 onUpdate calls advance() so useFrame runs on XR8’s tick.
  • Cleaner resize / picking — R3F setSize is muted during configure so it doesn’t fight XR8; on canvas size change we pass the CSS box into R3F.

Run the starter

git clone https://github.com/nagendra-dharmireddi/react-three-fiber-8thwall.git
cd react-three-fiber-8thwall
npm install
npm run dev

Open the HTTPS Network URL on your phone (camera needs a secure context). Local SSL comes from @vitejs/plugin-basic-ssl.

What you edit

// src/App.tsx
import EighthWall from "./eighthwall/EighthWall";
import Experience from "./eighthwall/Experience";

export default function App() {
  return (
    <EighthWall>
      <Experience />   {/* ← put your R3F scene here */}
    </EighthWall>
  );
}

Swap Experience for any plain R3F tree (<mesh>, useFrame, etc.).

Non-AR (no 8th Wall) — same scene under a normal Canvas:

import { Canvas } from "@react-three/fiber";

<Canvas>
  <Experience />
</Canvas>

Required index.html pieces

Already set up in this starter. Keep them if you copy files elsewhere:

  1. 8th Wall CDNs — engine, xrextras, landing-page scripts
  2. AR canvas with class r3f-8thwall:
<canvas class="r3f-8thwall"></canvas>

<EighthWall> queries canvas.r3f-8thwall. Wrong class → AR never starts.

How it works

| Piece | Role | | --- | --- | | EighthWall | Boots XR8, mounts your R3F children on the shared scene | | StopR3FRender | useFrame(..., 1) so R3F does not call gl.render (XR8 draws) | | createR3FModule | Shared XR8 gl / scene / camera; frameloop: "never"; XR8 onUpdate → advance(); resize guard + CSS size on canvas change | | initializeXR | Standard 8th Wall pipeline modules; R3F bridge last |

XR8 drives render + frame tick. R3F children own the scene graph.

Common mistakes

  1. Missing 8th Wall script tags in index.html
  2. Missing or misnamed canvas — must be class="r3f-8thwall"
  3. Missing canvas CSS (touch-action: none in src/index.css)
  4. Nesting a second R3F <Canvas> / second renderer inside EighthWall
  5. Letting R3F also gl.render — fights XR8’s draw (often a white screen)
  6. Letting R3F setSize run against XR8 during configure — can desync buffer vs layout
  7. Overwriting camera.position every frame in AR — let XR8 own SLAM pose
  8. Testing over plain HTTP — use the HTTPS URL from npm run dev

Project layout

src/
  App.tsx                 starter entry
  index.css               canvas.r3f-8thwall touch rules
  eighthwall/
    EighthWall.tsx        AR host
    StopR3FRender.tsx     disables R3F gl.render
    Experience.tsx        sample scene — replace this
    setup.ts              window.THREE + extend(THREE)
    pipeline/             initializeXR + createR3FModule
    utils/                picking / resize helpers
index.html                8th Wall scripts + <canvas class="r3f-8thwall">

More detail: src/eighthwall/README.md · Developer.md · CI

License

MIT


Using as an npm package (optional)

This repo is primarily a starter. Package: npmjs.com/package/react-three-fiber-8thwall

npm install react-three-fiber-8thwall three @react-three/fiber
import { EighthWall } from "react-three-fiber-8thwall";

<EighthWall>
  <YourScene />
</EighthWall>

You still need the 8th Wall CDNs and <canvas class="r3f-8thwall"> in your own index.html. Add the canvas touch-action: none CSS yourself (see src/index.css).

Push to main publishes to npm and deploys the starter to Vercel — see .github/workflows/README.md for secrets.