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

game-mount

v0.1.1

Published

Mount a game renderer into a parent-sized box: one DPR, quality and reduced-motion policy, with adapters for PixiJS, @pixi/react, react-three-fiber and Babylon.js (Reactylon). Each adapter needs only its own renderer installed.

Downloads

607

Readme

game-mount

Mount Pixi, React Three Fiber and Babylon renderers into a parent-sized host with one quality and pixel-ratio policy.

The core has no dependencies. Renderer adapters live at separate entry points; install only the peers your adapter uses. The package ships ESM, CommonJS and TypeScript declarations.

Install

npm install game-mount pixi.js

Version 0.1.0 is the initial release candidate. Registry installation becomes available after the first release.

Quick start

Give the parent a real height. The mount creates a fresh canvas and owns its teardown; your application owns scene content.

import { QUALITY_TIERS } from "game-mount";
import { mountPixi } from "game-mount/pixi";
import "game-mount/styles.css";

const host = document.createElement("div");
host.className = "game-canvas-host";
const parent = document.createElement("main");
parent.style.height = "480px";
parent.style.display = "flex";
parent.append(host);
document.body.append(parent);

const mount = await mountPixi({
  container: host,
  quality: QUALITY_TIERS.medium,
  onResize: (width, height) => {
    // Reflow your scene after the renderer has resized.
    host.setAttribute("aria-label", `GameCanvas ${width} by ${height}`);
  },
});

// When leaving the game view:
mount.destroy();

Entry points and compatibility

All peers are optional at the package level. Each selected adapter still requires its listed peers.

| Import | Exports | Required peers | | --- | --- | --- | | game-mount | DPR, quality, device, motion, host, phase, resolution ladder and error classification | None | | game-mount/react | GameCanvasErrorBoundary | React 18 or 19 | | game-mount/pixi | mountPixi, applyFilterResolutionFix | PixiJS 8 | | game-mount/pixi/react | usePixiMount | PixiJS 8, React 18 or 19 | | game-mount/pixi/pixi-react | PixiReactMount | PixiJS 8, React 18 or 19, @pixi/react 8.0.5+ within 8.x | | game-mount/r3f | GameCanvas, AdaptiveResolution | React 18 or 19, Three >=0.160, @react-three/fiber 9 | | game-mount/babylon | babylonEngineOptions, SceneRoot, useBeforeRender | React 18 or 19, Babylon core 7–9, Reactylon 3 | | game-mount/babylon/havok | useHavokPhysics | React 18 or 19, Babylon core 7–9, Havok 1 | | game-mount/styles.css | .game-canvas-host stylesheet | None |

Use mutually compatible renderer and React versions: the peer ranges above describe this package, and upstream peers can impose narrower requirements. Mounting requires a browser; importing modules and using the pure core works in Node. Node.js 22, 24 and 26 are supported (engines.node: >=22). Development defaults to Node 26 and pnpm 12; CI verifies every supported line.

The default quality is high (DPR cap 2, antialiasing enabled). medium caps at 1.5; low caps at 1 and disables antialiasing. Babylon detects mobile devices and defaults to low there. Reduced-motion detection supplies a preference; your scene decides how to apply it.

The @pixi/react 8.0.5 ESM dependency graph has an upstream extensionless import that plain Node ESM cannot load. Use a browser bundler for that adapter. Three's CommonJS build emits its own deprecation warning; prefer ESM for r3f.

Documentation

License

MIT, Copyright (c) 2026 Jon Bogaty.