TypeScript type definitions for phaser3-rex-plugins, a comprehensive collection of plugins for Phaser 3. Current stable version 0.2.0, released 2023-09-12. Provides type safety and autocompletion for popular plugins like Webfont loader, Container Lite, Input text, and more. Updated infrequently; supports only a subset of all rex plugins (marked as [x] in README). No built-in tests or CI beyond Travis. Differentiator: fills the gap for TypeScript users of the rexrainbow plugin ecosystem, unlike the JS-only original.
npm install phaser3-rex-plugins-typesVerified import paths — ran on the pinned version, not inferred.
Initializes a basic Phaser 3 game with TypeScript, demonstrating how to use rex plugins types (WebfontLoader and ContainerLite) without explicit imports.
Check the README for supported plugins; for unsupported ones, you must write custom declarations or use `any`.
Ensure tsconfig includes this package and that no other package provides conflicting augmentations.
Add "node_modules/phaser3-rex-plugins-types" to the include array in tsconfig.json. See quickstart.
Validate types against the original rex plugins documentation. Report issues on GitHub.
Ensure you have installed and imported phaser3-rex-plugins (the JS package) and added the plugin to the Phaser config. Example:
import RexPlugins from 'phaser3-rex-plugins';
const config = { plugins: { scene: [{ key: 'rexWebfont', plugin: RexPlugins.WeFontLoader, sceneKey: 'rexWebfont' }] } };
Then use this.load.rexWebfont(...).Confirm you have added this package to tsconfig include array AND that the plugin is registered in Phaser config via phaser3-rex-plugins. Example:
import RexPlugins from 'phaser3-rex-plugins';
const config = { plugins: { scene: [{ key: 'rexContainerLite', plugin: RexPlugins.ContainerLite, sceneKey: 'rexContainerLite' }] } }.Do not use `import something from 'phaser3-rex-plugins-types'`. Instead, just `import 'phaser3-rex-plugins-types'` once at the top of your entry file.