PP

phaserjs/phaser

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4.1万 stars 质量 79 趋势 54MIT

phaserjs/phaser 是从 https://github.com/phaserjs/phaser. 导入的特工技能候选。

概览

phaserjs/phaser 是从 https://github.com/phaserjs/phaser. 导入的特工技能候选。

概述(AI 翻译)

Phaser 是一个快速、免费且有趣的开源 HTML5 游戏框架,支持桌面和移动网页浏览器的 WebGL 和 Canvas 渲染,已活跃开发超过 13 年。

游戏可以为网页开发,也可以作为YouTube Playables、Discord活动、Reddit游戏、Twitch叠加层,或者通过第三方工具编译到iOS、Android、Steam和原生应用。你可以使用JavaScript或TypeScript进行开发。Phaser支持包括React和Vue在内的40多种前端框架。

Phaser 由 Phaser Studio Inc 商业开发和维护,同时还有我们出色的开源社区。得益于快速的支持和开发者友好的 API,Phaser 目前是 GitHub 上星级最高的游戏框架之一。

想了解更多吗?点击下面的图片观看我们的介绍视频。


安装NPM的相位枪

通过 npm 安装:

然后导入到你的项目中:

使用CDN中的相位枪

Phaser 在 jsDelivr 上,这是一个“开发者超高速 CDN”。在你的 HTML 中包含以下其中之一:

它也可以从Cloudflare的cdnjs获取:

创建相位枪游戏应用

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Phaser - HTML5 Game Framework

Phaser is a fast, free, and fun open source HTML5 game framework that offers WebGL and Canvas rendering across desktop and mobile web browsers and has been actively developed for over 13 years.

Games can be built for the web, or as YouTube Playables, Discord Activities, Reddit games, Twitch Overlays or compiled to iOS, Android, Steam and native apps using 3rd party tools. You can use JavaScript or TypeScript for development. Phaser supports over 40 different front-end frameworks including React and Vue.

Phaser is commercially developed and maintained by Phaser Studio Inc along with our fantastic open source community. As a result of rapid support, and a developer friendly API, Phaser is currently one of the most starred game frameworks on GitHub.

Interested in learning more? Click the image below to watch our intro video.


Installing Phaser from NPM

Install via npm:

npm install phaser

Then import it in your project:

import Phaser from 'phaser';

Using Phaser from a CDN

Phaser is on jsDelivr which is a “super-fast CDN for developers”. Include either of the following in your html:


It is also available from Cloudflare’s cdnjs:


Create Phaser Game App

The easiest way to get started quickly with Phaser is our create-phaser-game app. This CLI tool presents an interactive selection of official project templates and demo games. Issue the command, answer some questions and the app will download and configure the right package for you.

npm create @phaserjs/game@latest
npx @phaserjs/create-game@latest
yarn create @phaserjs/game
pnpm create @phaserjs/game@latest
bun create @phaserjs/game@latest

We support Vue.js, React, Angular, Next.js, SolidJS, Svelte and Remix with Vite, Rollup, Parcel, Webpack, ESBuild, Import Map and Bun. Most come in both JavaScript and TypeScript versions.

View the create game app tutorial.

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add phaserjs/phaser
新手?先看 mcpskill.org 教程 →