
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@nativescript/canvas-phaser
Advanced tools
Tools for using Phaser3 to build native 2D games in NativeScript πΎπΎ
npm i @nativescript/canvas-phaser
Import the library into your JavaScript file:
import TNSPhaser from "@nativescript/canvas-phaser";
TNSPhaser.game({ canvas, renderer: Phaser.WEBGL || Phaser.CANVAS, ...extras })Given a canvas from a
Canvas, return a
Phaser.Game
that draws into it.
| Property | Type | Description | Default Value |
|---|---|---|---|
| canvas | TNSCanvas | Required: canvas that the Phaser.Game will render to | null |
| renderer | number? | Optional: choose the renderer type e.g Phaser.CANVAS (1) , Phaser.WEBGL(2) | 1 |
| width | number? | Optional: height of the Phaser.Game | canvas height |
| height | number? | Optional: width of the Phaser.Game | canvas width |
| title | string? | Optional: title of the Phaser.Game | "tns-phaser-game" |
| Property | Type | Description |
|---|---|---|
| game | Phaser.Game | The Phaser3 game used for rendering game logic |
const game = TNSPhaser.game({ canvas });
Under the hood, TNSPhaser is maintaining global instances of a few libraries.
window.Phaser = require("phaser");
Finally when a new instance of TNSPhaser.Game is created, we set the document.readyState to 'complete'
global.document.readyState = "complete";
Apache License Version 2.0, January 2004
FAQs
Build awesome 2D games with Phaser.js and NativeScript
The npm package @nativescript/canvas-phaser receives a total of 103 weekly downloads. As such, @nativescript/canvas-phaser popularity was classified as not popular.
We found that @nativescript/canvas-phaser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 18 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.