Skip to main content

One post tagged with "Templates"

View All Tags

PixiJS 更新 - 仅用一条命令即可开始使用 PixiJS 构建!🚀

· 6 min read
Zyie
PixiJS Admin

正如我们在之前的PixiJS 更新文章中提到的,我们正专注于让 PixiJS 更易于使用和理解。今天,我们将项目向这个目标推进了一步,我们很高兴地介绍PixiJS Create

🌐 As we mentioned in our previous PixiJS Update post, we are focusing on making PixiJS easier to use and understand. Today we're pushing the project one step closer to that goal and we’re excited to introduce PixiJS Create.

一个易于使用的命令行工具,为使用你喜爱的打包工具的 PixiJS 提供模板,以及一个新的“创作模板”,帮助你开始使用 PixiJS 及其生态系统。

🌐 An easy to use CLI that provides templates for using PixiJS with your favourite bundler, as well as a new "Creation Template" to get you started with PixiJS and its ecosystem.

PixiJS Create CLI

🚀 入门

🌐 🚀 Getting Started

PixiJS Create 是一个新的 CLI 工具,简化了设置 PixiJS 项目的过程。它提供了一种快速简便的方式,通过一个命令即可创建一个新的 PixiJS 项目,并配备你开始所需的工具。

无论你更喜欢使用 Vite、Webpack 还是 esbuild,PixiJS Create 都能满足你的需求。 只需运行即可:

🌐 Whether you prefer using Vite, Webpack, or esbuild, PixiJS Create has you covered. It is as simple as running:

NPM:

npm create pixi.js@latest

Yarn:

yarn create pixi.js

PNPM:

pnpm create pixi.js

包子:

🌐 Bun:

bun create pixi.js

然后只需按照提示选择你想要的模板,就可以开始了!

🌐 Then just follow the prompts to select your desired template and you're good to go!

在运行该工具时,你将会看到一个选项,可以选择 打包模板创建模板。让我们仔细看看这两个选项。

🌐 When running the tool, you will be presented with an option of either a Bundler Template or a Creation Template. Let's take a closer look at each of these options.

🛠️ 打包器模板:简单且基础

🌐 🛠️ Bundler Templates: Simple and Barebones

Bundler 模板是用于使用流行构建工具设置 PixiJS 项目的精简起点。这些模板仅关注基本要素,为你提供一个无额外复杂性的简单环境来启动项目。

🌐 Bundler Templates are stripped-down starting points for setting up PixiJS projects with popular build tools. These templates focus solely on the essentials, giving you a no-frills environment to start your project without any added complexity.

包括什么?

🌐 What’s Included?

Bundler 模板非常适合如果你想完全控制项目的设置,同时又想跳过搭建整个项目的麻烦。它们轻量、高效,非常适合自定义工作流程。

🌐 Bundler Templates are ideal if you want complete control over your project’s setup while skipping the hassle of setting up an entire project. They’re lightweight, efficient, and perfect for custom workflows.

🎨 创作模板:功能丰富的起点

🌐 🎨 Creation Templates: Feature-Rich Starting Points

创建模板超越了基础,提供了一个功能齐全的基础,用于使用 PixiJS 构建应用。这些模板解决了开发者在开始新项目时常遇到的常见问题,提供了简化屏幕管理、资源处理、音频等的工具。

🌐 Creation Templates go beyond the basics, offering a fully-featured foundation for building applications with PixiJS. These templates address common challenges developers face when starting a new project, providing tools that simplify screen management, asset handling, audio and more.

包括什么?

🌐 What’s Included?

  • 屏幕管理:轻松处理过渡并组织应用状态。
  • 资源加载:内置支持 PixiJS AssetPack,使资源管理轻松自如。
  • 音频播放:利用 PixiJS Sound 使用现代 WebAudio API 功能。
  • 响应式设计:自动处理各种屏幕尺寸的调整。
  • 简易界面:包含一个用于常见界面元素的基础界面库。
  • 动画工具:包括预配置的库支持,如用于骨骼动画的 Spine 和用于平滑补间和过渡的 Motion。

创建模板非常适合希望从坚实的基础开始快速开发的开发者,使他们能够专注于构建出色的内容,而不是担心设置问题。

🌐 Creation Templates are perfect for developers who want to hit the ground running with a robust foundation, enabling them to focus on building amazing content rather than worrying about setup.

🌍 适用于每个平台的创作模板

🌐 🌍 Creation Templates for Every Platform

对于创建模板,我们首先支持通用的基于网页的应用,但计划很快将模板生态系统扩展到其他平台:

🌐 For the creation templates we’re starting with support for general web-based applications but are planning to expand the template ecosystem to other platforms soon:

  • 网页模板:通用创建模板(现已可用)。

即将推出:

🌐 Coming Soon:

  • Discord 模板:使用他们的 SDK 构建用于 Discord 的多人应用。
  • Facebook 模板:为 Facebook Instant Games 创建应用。
  • YouTube 模板:开发 YouTube 可播放内容。

致谢

🌐 Acknowledgements

该项目基于优秀的 create-vite 工具,并受到 Phasercreate-game 项目的启发。我们对他们的工作及其提供的灵感表示感谢。

🌐 This project is based on amazing create-vite tool and inspired by the create-game project by Phaser. We are grateful for their work and the inspiration it provided.

🌐 保持联系

🌐 🌐 Stay Connected

关注 ZyiePixiJS 的社交媒体,获取最新动态。加入我们在 Discord 的活跃社区,参与实时讨论和获取支持。

🌐 Follow Zyie and PixiJS on social media for the latest updates. Join our vibrant community on Discord for real-time discussions and support.