这是一个使用 Cursor IDE 完全自主创作开发的 3D 射击类游戏项目。项目采用 React、TypeScript 和 Vite 搭建的前端项目框架,结合现代化的 3D 渲染技术,打造沉浸式的游戏体验。
该模板提供了最基础的项目配置,支持以下特性:
- 快速的热模块替换(HMR)功能
- TypeScript 类型检查
- ESLint 代码规范检查
- 现代化的开发体验
目前项目支持两个官方插件:
- @vitejs/plugin-react - 使用 Babel 实现快速刷新
- @vitejs/plugin-react-swc - 使用 SWC 实现快速刷新
如果你正在开发生产环境的应用,建议更新配置以启用类型感知的 lint 规则。具体配置方法如下:
- 配置顶层
parserOptions属性 - 使用推荐的类型检查配置
- 可选择添加样式类型检查
- 安装并配置 React ESLint 插件
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
tsconfigRootDir: import.meta.dirname,
},
},
});- Replace
tseslint.configs.recommendedtotseslint.configs.recommendedTypeCheckedortseslint.configs.strictTypeChecked - Optionally add
...tseslint.configs.stylisticTypeChecked - Install eslint-plugin-react and update the config:
// eslint.config.js
import react from "eslint-plugin-react";
export default tseslint.config({
// Set the react version
settings: { react: { version: "18.3" } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs["jsx-runtime"].rules,
},
});