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

@number10/jsx-phaser

v5.1.0

Published

Phaser 4 renderer for @number10/jsx-core — JSX UI components, gestures, effects

Readme

@number10/jsx-phaser

Phaser 4 renderer adapter for the PhaserJSX framework — provides Phaser-specific runtime, mounting, and native components.

Usage

/** @jsxImportSource @number10/jsx-phaser */
import * as Phaser from 'phaser'
import { Button, Text, View, mountJSX } from '@number10/jsx-phaser'

class GameScene extends Phaser.Scene {
  create() {
    mountJSX(this, App, { width: this.scale.width, height: this.scale.height })
  }
}

Renderer support

@number10/jsx-phaser supports both Phaser WebGL and Phaser Canvas renderers.

  • View overflow="hidden" uses Phaser-native clipping in both modes
  • WebGL uses the stencil-based path
  • Canvas uses a native ctx.clip() path tied to the container transform

That means scroll views and clipped subtrees now behave consistently even when a project runs with type: Phaser.CANVAS.

Auto-mount plugin

Use createPhaserJSXPlugin() when you want to mount JSX from the Phaser game config instead of calling mountJSX() manually inside a scene.

If a page hosts multiple Phaser.Game instances, give each plugin entry its own key:

createPhaserJSXPlugin({
  key: 'PhaserJSXInventory',
  component: InventoryHud,
})

Without a unique key, Phaser treats the plugin registration as global and later game roots can collide with the first one.

What's included

  • All @number10/jsx-components re-exported — portable UI components
  • Phaser-specific components (Graphics, Particles, TileSprite)
  • Mount system (mountJSX, scene lifecycle)
  • Gesture system (touch, drag, double-tap, long-press)
  • Theme system with Phaser-specific defaults and presets
  • Renderer parity helpers for WebGL/Canvas clipping behavior

Phaser-native components (Klasse C)

These are intentionally NOT portable — they use Phaser GameObjects directly:

| Component | API | Notes | | ----------------- | ------------------------------------- | ------------------------------------- | | Graphics | onDraw(Phaser.GameObjects.Graphics) | Phaser-native drawing | | Particles | Phaser particle emitter | Phaser-specific | | TileSprite | Phaser tile sprite | Phaser-specific | | RefOriginView | Phaser origin API | Legacy, Phaser-only | | Sprite (Phaser) | Phaser.GameObjects.Sprite | Has animation callbacks + Phaser refs |

⚠️ Name conflict: Sprite exists in both @number10/jsx-components (portable) and @number10/jsx-phaser (Phaser-native with animation callbacks). ⚠️ Name conflict: NineSlice exists in both @number10/jsx-components (portable, TextureResolver-based) and @number10/jsx-phaser (Phaser-native Phaser.GameObjects.NineSlice).

License

GPL-3.0-only