diff --git a/QuickStart/.DS_Store b/QuickStart/.DS_Store index deea84d..2f58298 100644 Binary files a/QuickStart/.DS_Store and b/QuickStart/.DS_Store differ diff --git a/QuickStart/Web/CommonFeatures/.env b/QuickStart/Web/CommonFeatures/.env deleted file mode 100644 index 0171430..0000000 --- a/QuickStart/Web/CommonFeatures/.env +++ /dev/null @@ -1,18 +0,0 @@ -# init config -VEGAME_ACCOUNT_ID="your accountId" # 火山引擎用户账号,可通过火山引擎官网页面右上角 用户 > 账号管理 > 主账号信息 获取 - -# start config -VEGAME_GAME_ID="your gameId" # 游戏ID,可通过火山引擎云游戏控制台『游戏管理』页面获取,例如:1428112352161312345 - -# start token 启动云游戏的令牌(通过调用服务端 STSToken 接口获取),有关服务端 STSToken 接口的详细信息,参考 [签发临时 Token](https://www.volcengine.com/docs/6512/75588) -# 实际业务场景中根据接口获取,就没必要放在环境变量中,start 之前先调用一遍接口,获取 token 即可 - # Token 创建时间 -VEGAME_TOKEN_CURRENT_TIME="" - #Token 过期时间 -VEGAME_TOKEN_EXPIRED_TIME="" -# 用于鉴权的临时 Token -VEGAME_TOKEN_SESSION_TOKEN="" -# 用于鉴权的临时 Access Key -VEGAME_TOKEN_ACCESS_KEY_ID="" -# 用于鉴权的临时 Secret Key -VEGAME_TOKEN_SECRET_ACCESS_KEY="" \ No newline at end of file diff --git a/QuickStart/Web/CommonFeatures/README.md b/QuickStart/Web/CommonFeatures/README.md deleted file mode 100644 index 2aea171..0000000 --- a/QuickStart/Web/CommonFeatures/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# 云游戏客户端 Web SDK demo - -这个开源项目展示了火山引擎云游戏客户端 Web SDK 的以下功能: - -1. 配置接入云游戏服务的必要参数 -2. 开始游戏和结束游戏 -3. 大文件传输 -4. 清晰度切换 -5. 自定义本地键盘 Input 框 -6. 虚拟手柄 -7. 挂机 -8. 单触点转鼠标消息 -9. 设置保活时间 -10. 设置重连时间 -11. 坐标旋转 -12. 切换角色 -13. 客户端前后台切换 -14. 同步本地键盘状态到云端 -15. 更新画面放缩比 -16. 虚拟键鼠 -17. 本地输入法显示中文合成过程 -18. 自动回收时长 -19. 触控转鼠标 - -方便用户快速接入云游戏客户端 Web SDK。 - -## 目录结构 - -```bash -├── src -│ ├── config.js # 导出 Web SDK 需要的配置 -│ ├── index.html # 页面布局 -│ ├── main.js # 主要实现逻辑 -│ ├── libs # 项目依赖的sdk -│ ├── utils.js # 公共方法 -│ ├── constant.js # 公共常量 -│ ├── features # 功能模块 -│ │ ├── file-channel.js # 大文件传输 -│ ├── features # 功能模块 -│ │ ├── index.js # 导出模块 -│ │ ├── clarity.js # 清晰度切换 -│ │ ├── clear-custom-local-keyboard-input.js # 清除自定义本地键盘 Input 框的状态 -│ │ ├── game-pad.js # 虚拟手柄 -│ │ ├── get-auto-recycle-time.js # 获取自动回收时长 -│ │ ├── get-user-profile-path.js # 获取存档路径 -│ │ ├── idle-time.js # 设置保活时间 -│ │ ├── ime-composition-visible.js # 本地输入法显示中文合成过程 -│ │ ├── reconnect-time.js # 设置重连时间 -│ │ ├── rotate-coordinate.js # 坐标旋转 -│ │ ├── session-mode.js # 挂机 -│ │ ├── set-auto-recycle-time.js # 自动回收时长 -│ │ ├── set-idle-time.js # 设置保活时间 -│ │ ├── set-custom-local-keyboard-input-id.js # 设置自定义本地键盘 Input 框 -│ │ ├── set-role.js # 切换角色 -│ │ ├── set-touch-to-mouse.js # 单触点转鼠标消息 -│ │ ├── set-user-profile-path.js # 设置存档路径 -│ │ ├── switch-background.js # 客户端前后台切换 -│ │ ├── sync-local-keyboard-close-status.js # 同步本地键盘状态到云端 -│ │ ├── update-video-scale.js # 更新画面放缩比 -│ │ ├── virtual-input-suite.js # 虚拟键鼠 -│ │ ├── touch-to-mouse-event.js # 触控转鼠标 -│ └── style.css # 样式文件 -└── vite.config.js # vite 配置文件 -└── .env # Web SDK 启动需要的配置 -``` - -## 运行示例程序 - -> 首先需要确保拥有 `node` 环境,如果没有,请前往 [nodejs 官网](https://nodejs.org/zh-cn/download)下载并安装 `nodejs` - -1. 下载项目到本地 - -```bash -git clone https://github.com/volcengine/veGame.git -``` - -2. 进入 Web Quick Start 目录 - -```bash -cd vePhone/QuickStart/Web/CommonFeatures -``` - -3. 安装依赖 - -```bash -npm install -``` - -4. 在`.env`文件中填写启动云游戏需要的配置,配置如下: - -```bash -# init config -VEGAME_ACCOUNT_ID="your accountId" # 火山引擎用户账号,可通过火山引擎官网页面右上角 用户 > 账号管理 > 主账号信息 获取 - -# start config -VEGAME_GAME_ID="your gameId" # 游戏ID,可通过火山引擎云游戏控制台『游戏管理』页面获取,例如:1428112352161312345 - -# start token 启动云游戏的令牌(通过调用服务端 STSToken 接口获取),有关服务端 STSToken 接口的详细信息,参考 [签发临时 Token](https://www.volcengine.com/docs/6512/75588) -# 实际业务场景中根据接口获取,就没必要放在环境变量中,start 之前先调用一遍接口,获取 token 即可 - # Token 创建时间 -VEGAME_TOKEN_CURRENT_TIME="" - #Token 过期时间 -VEGAME_TOKEN_EXPIRED_TIME="" -# 用于鉴权的临时 Token -VEGAME_TOKEN_SESSION_TOKEN="" -# 用于鉴权的临时 Access Key -VEGAME_TOKEN_ACCESS_KEY_ID="" -# 用于鉴权的临时 Secret Key -VEGAME_TOKEN_SECRET_ACCESS_KEY="" -``` - -5. 执行启动命令 - -```bash -npm run dev -``` - -6. 打开浏览器,访问 `localhost:8080` 即可 - -## 参考资料 - -注:如果不能访问以上链接,请参考 [开通云游戏服务](https://www.volcengine.com/docs/6512/75577) 说明文档。 diff --git a/QuickStart/Web/CommonFeatures/package-lock.json b/QuickStart/Web/CommonFeatures/package-lock.json deleted file mode 100644 index 5820150..0000000 --- a/QuickStart/Web/CommonFeatures/package-lock.json +++ /dev/null @@ -1,1132 +0,0 @@ -{ - "name": "vegame-sdk-npm-quick-start", - "version": "0.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "vegame-sdk-npm-quick-start", - "version": "0.0.0", - "dependencies": { - "@popperjs/core": "^2.11.8", - "@volcengine/vegame": "^1.55.0", - "bootstrap": "^5.3.3" - }, - "devDependencies": { - "sass": "^1.71.1", - "vite": "^4.4.5" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.18.17.tgz", - "integrity": "sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz", - "integrity": "sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.18.17.tgz", - "integrity": "sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz", - "integrity": "sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz", - "integrity": "sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz", - "integrity": "sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz", - "integrity": "sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz", - "integrity": "sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz", - "integrity": "sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz", - "integrity": "sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz", - "integrity": "sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz", - "integrity": "sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz", - "integrity": "sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz", - "integrity": "sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz", - "integrity": "sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz", - "integrity": "sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz", - "integrity": "sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz", - "integrity": "sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz", - "integrity": "sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz", - "integrity": "sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz", - "integrity": "sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz", - "integrity": "sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmmirror.com/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" - }, - "node_modules/@volcengine/vegame": { - "version": "1.55.0", - "resolved": "https://registry.npmmirror.com/@volcengine/vegame/-/vegame-1.55.0.tgz", - "integrity": "sha512-o53jjroRo2hZrJsx3DajRjzkn4tQCpv0CRk+RgWzFIdkcJI453WrHZq8s8ZZSXfp0PQvUnfHeHhTZ3idcm/yqw==" - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/bootstrap": { - "version": "5.3.3", - "resolved": "https://registry.npmmirror.com/bootstrap/-/bootstrap-5.3.3.tgz", - "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", - "peerDependencies": { - "@popperjs/core": "^2.11.8" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/esbuild": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.18.17.tgz", - "integrity": "sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.18.17", - "@esbuild/android-arm64": "0.18.17", - "@esbuild/android-x64": "0.18.17", - "@esbuild/darwin-arm64": "0.18.17", - "@esbuild/darwin-x64": "0.18.17", - "@esbuild/freebsd-arm64": "0.18.17", - "@esbuild/freebsd-x64": "0.18.17", - "@esbuild/linux-arm": "0.18.17", - "@esbuild/linux-arm64": "0.18.17", - "@esbuild/linux-ia32": "0.18.17", - "@esbuild/linux-loong64": "0.18.17", - "@esbuild/linux-mips64el": "0.18.17", - "@esbuild/linux-ppc64": "0.18.17", - "@esbuild/linux-riscv64": "0.18.17", - "@esbuild/linux-s390x": "0.18.17", - "@esbuild/linux-x64": "0.18.17", - "@esbuild/netbsd-x64": "0.18.17", - "@esbuild/openbsd-x64": "0.18.17", - "@esbuild/sunos-x64": "0.18.17", - "@esbuild/win32-arm64": "0.18.17", - "@esbuild/win32-ia32": "0.18.17", - "@esbuild/win32-x64": "0.18.17" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/immutable": { - "version": "4.3.5", - "resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.3.5.tgz", - "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", - "dev": true, - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rollup": { - "version": "3.27.0", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.27.0.tgz", - "integrity": "sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=14.18.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/sass": { - "version": "1.71.1", - "resolved": "https://registry.npmmirror.com/sass/-/sass-1.71.1.tgz", - "integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==", - "dev": true, - "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/vite": { - "version": "4.4.8", - "resolved": "https://registry.npmmirror.com/vite/-/vite-4.4.8.tgz", - "integrity": "sha512-LONawOUUjxQridNWGQlNizfKH89qPigK36XhMI7COMGztz8KNY0JHim7/xDd71CZwGT4HtSRgI7Hy+RlhG0Gvg==", - "dev": true, - "dependencies": { - "esbuild": "^0.18.10", - "postcss": "^8.4.26", - "rollup": "^3.25.2" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@types/node": ">= 14", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - } - }, - "dependencies": { - "@esbuild/android-arm": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.18.17.tgz", - "integrity": "sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==", - "dev": true, - "optional": true - }, - "@esbuild/android-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.18.17.tgz", - "integrity": "sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==", - "dev": true, - "optional": true - }, - "@esbuild/android-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.18.17.tgz", - "integrity": "sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.17.tgz", - "integrity": "sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==", - "dev": true, - "optional": true - }, - "@esbuild/darwin-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.18.17.tgz", - "integrity": "sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.17.tgz", - "integrity": "sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==", - "dev": true, - "optional": true - }, - "@esbuild/freebsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.17.tgz", - "integrity": "sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.18.17.tgz", - "integrity": "sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.18.17.tgz", - "integrity": "sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ia32": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.18.17.tgz", - "integrity": "sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.18.17.tgz", - "integrity": "sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-mips64el": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.17.tgz", - "integrity": "sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-ppc64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.17.tgz", - "integrity": "sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==", - "dev": true, - "optional": true - }, - "@esbuild/linux-riscv64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.17.tgz", - "integrity": "sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==", - "dev": true, - "optional": true - }, - "@esbuild/linux-s390x": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.18.17.tgz", - "integrity": "sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==", - "dev": true, - "optional": true - }, - "@esbuild/linux-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.18.17.tgz", - "integrity": "sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==", - "dev": true, - "optional": true - }, - "@esbuild/netbsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.17.tgz", - "integrity": "sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==", - "dev": true, - "optional": true - }, - "@esbuild/openbsd-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.17.tgz", - "integrity": "sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==", - "dev": true, - "optional": true - }, - "@esbuild/sunos-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.18.17.tgz", - "integrity": "sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==", - "dev": true, - "optional": true - }, - "@esbuild/win32-arm64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.18.17.tgz", - "integrity": "sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==", - "dev": true, - "optional": true - }, - "@esbuild/win32-ia32": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.18.17.tgz", - "integrity": "sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==", - "dev": true, - "optional": true - }, - "@esbuild/win32-x64": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.18.17.tgz", - "integrity": "sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==", - "dev": true, - "optional": true - }, - "@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmmirror.com/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==" - }, - "@volcengine/vegame": { - "version": "1.55.0", - "resolved": "https://registry.npmmirror.com/@volcengine/vegame/-/vegame-1.55.0.tgz", - "integrity": "sha512-o53jjroRo2hZrJsx3DajRjzkn4tQCpv0CRk+RgWzFIdkcJI453WrHZq8s8ZZSXfp0PQvUnfHeHhTZ3idcm/yqw==" - }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "bootstrap": { - "version": "5.3.3", - "resolved": "https://registry.npmmirror.com/bootstrap/-/bootstrap-5.3.3.tgz", - "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", - "requires": {} - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "esbuild": { - "version": "0.18.17", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.18.17.tgz", - "integrity": "sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.18.17", - "@esbuild/android-arm64": "0.18.17", - "@esbuild/android-x64": "0.18.17", - "@esbuild/darwin-arm64": "0.18.17", - "@esbuild/darwin-x64": "0.18.17", - "@esbuild/freebsd-arm64": "0.18.17", - "@esbuild/freebsd-x64": "0.18.17", - "@esbuild/linux-arm": "0.18.17", - "@esbuild/linux-arm64": "0.18.17", - "@esbuild/linux-ia32": "0.18.17", - "@esbuild/linux-loong64": "0.18.17", - "@esbuild/linux-mips64el": "0.18.17", - "@esbuild/linux-ppc64": "0.18.17", - "@esbuild/linux-riscv64": "0.18.17", - "@esbuild/linux-s390x": "0.18.17", - "@esbuild/linux-x64": "0.18.17", - "@esbuild/netbsd-x64": "0.18.17", - "@esbuild/openbsd-x64": "0.18.17", - "@esbuild/sunos-x64": "0.18.17", - "@esbuild/win32-arm64": "0.18.17", - "@esbuild/win32-ia32": "0.18.17", - "@esbuild/win32-x64": "0.18.17" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "immutable": { - "version": "4.3.5", - "resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.3.5.tgz", - "integrity": "sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", - "dev": true, - "requires": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "rollup": { - "version": "3.27.0", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.27.0.tgz", - "integrity": "sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "sass": { - "version": "1.71.1", - "resolved": "https://registry.npmmirror.com/sass/-/sass-1.71.1.tgz", - "integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==", - "dev": true, - "requires": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - } - }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "vite": { - "version": "4.4.8", - "resolved": "https://registry.npmmirror.com/vite/-/vite-4.4.8.tgz", - "integrity": "sha512-LONawOUUjxQridNWGQlNizfKH89qPigK36XhMI7COMGztz8KNY0JHim7/xDd71CZwGT4HtSRgI7Hy+RlhG0Gvg==", - "dev": true, - "requires": { - "esbuild": "^0.18.10", - "fsevents": "~2.3.2", - "postcss": "^8.4.26", - "rollup": "^3.25.2" - } - } - } -} diff --git a/QuickStart/Web/CommonFeatures/package.json b/QuickStart/Web/CommonFeatures/package.json deleted file mode 100644 index 1a02795..0000000 --- a/QuickStart/Web/CommonFeatures/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "vegame-sdk-npm-quick-start", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite --host", - "build": "vite build", - "preview": "vite preview" - }, - "devDependencies": { - "sass": "^1.71.1", - "vite": "^4.4.5" - }, - "dependencies": { - "@popperjs/core": "^2.11.8", - "@volcengine/vegame": "^1.55.0", - "bootstrap": "^5.3.3" - } -} diff --git a/QuickStart/Web/CommonFeatures/src/config.js b/QuickStart/Web/CommonFeatures/src/config.js deleted file mode 100644 index 4cc4f40..0000000 --- a/QuickStart/Web/CommonFeatures/src/config.js +++ /dev/null @@ -1,34 +0,0 @@ -import { MODE } from "@volcengine/vegame"; -console.log("mode", MODE, import.meta.env); -const isPC = - !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( - navigator.userAgent - ); - -// 实例化 veGameSDK 的部分参数 全部参数参考:https://www.volcengine.com/docs/6512/75597#%E5%AE%9E%E4%BE%8B%E5%8C%96-vegamesdk -// 初始化配置由环境变量中获得 -// 由于采用的是 vite 构建的,所以环境变量在 import.meta.env 中。详见 https://cn.vitejs.dev/guide/env-and-mode.html -export const initConfig = { - userId: "vegame_github_quick_start", // 必填参数,开发者可进行自定义,可以用来标识游戏玩家或账号等 - accountId: import.meta.env.VEGAME_ACCOUNT_ID, // 必填参数,火山引擎账号ID,可通过火山引擎官网页面右上角 用户 > 账号管理 > 主账号信息 获取 - enableLocalKeyboard: true, // 是否开启本地键盘输入。前提:需要联系运营同学给游戏所在业务开启「拉起本地输入法配置」 - mode: MODE.CLOUD_PHONE_GAME, // 默认为云游戏手游 MODE.CLOUD_PHONE_GAME,如果需要控制云游戏端游,请传 MODE.CLOUD_PC - isPC, // 是否为 PC Web 环境下使用。默认非 PC Web 环境下,将会监听 Touch 事件,而 PC Web 环境下将监听鼠标以及键盘事件 - domId: "player", - isDebug: true, -}; - -// 调用 veGameSDK.start 的参数 -export const startConfig = { - gameId: import.meta.env.VEGAME_GAME_ID, //必填参数,游戏ID,可通过火山引擎云游戏控制台『游戏管理』页面获取,例如:1428112352161312345 - token: { - CurrentTime: import.meta.env.VEGAME_TOKEN_CURRENT_TIME, // Token创建时间 - ExpiredTime: import.meta.env.VEGAME_TOKEN_EXPIRED_TIME, // Token过期时间 - SessionToken: import.meta.env.VEGAME_TOKEN_SESSION_TOKEN, // 用于鉴权的临时Token - AccessKeyID: import.meta.env.VEGAME_TOKEN_ACCESS_KEY_ID, // 用于鉴权的临时AccessKey - SecretAccessKey: import.meta.env.VEGAME_TOKEN_SECRET_ACCESS_KEY, // 用于鉴权的临时SecretKey - }, // 必填参数,启动云游戏的令牌,通过调用服务端 STSToken 接口获取,实际业务场景中根据接口获取,就没必要放在环境变量中,start 之前先调用一遍接口,获取 token 即可 - roundId: "vegame_github_quick_start_round_id", //必填参数,当次游戏生命周期的标识符,请根据实际业务需求做修改 - audioAutoPlay: true, - mute: true, // audioAutoPlay 和 mute 设置为 true 是针对部分浏览器对网页上的自动播放功能做了限制而做的特殊处理,请根据实际业务场景选择是否设置以及使用哪种自动播放处理策略。云游戏自动播放策略处理详见文档:https://www.volcengine.com/docs/6512/129586 -}; diff --git a/QuickStart/Web/CommonFeatures/src/constant.js b/QuickStart/Web/CommonFeatures/src/constant.js deleted file mode 100644 index 59525ea..0000000 --- a/QuickStart/Web/CommonFeatures/src/constant.js +++ /dev/null @@ -1,165 +0,0 @@ -const Clarity = { - Smooth: 2, - SD: 6, - UltraHD: 14, - HD: 16, -}; - -export const clarityList = [ - { - label: "流畅", - value: Clarity.Smooth, - }, - { - label: "标清", - value: Clarity.SD, - }, - { - label: "超清", - value: Clarity.UltraHD, - }, - { - label: "高清", - value: Clarity.HD, - }, -]; - -const VeGameMode = { - Normal: 0, - HangUp: 1, -}; - -export const veGameModeList = [ - { - label: "正常模式", - value: VeGameMode.Normal, - }, - { - label: "挂机模式", - value: VeGameMode.HangUp, - }, -]; - -const VeGameRole = { - Observer: 0, - Operator: 1, -}; - -export const veGameRoleList = [ - { - label: "观看者", - value: VeGameRole.Observer, - }, - { - label: "操作者", - value: VeGameRole.Operator, - }, -]; - -const veGameVirtualInputSuite = { - Show: "show", - Release: "release", - StartEdit: "startEdit", - ExportKeysConfig: "exportKeysConfig", - EnableTouch: "enableTouch", - DisableTouch: "disableTouch", -}; - -export const veGameVirtualInputSuiteList = [ - { - label: "显示虚拟键鼠配置", - value: veGameVirtualInputSuite.Show, - }, - { - label: "销毁虚拟键鼠配置", - value: veGameVirtualInputSuite.Release, - }, - { - label: "开启编辑虚拟键鼠配置", - value: veGameVirtualInputSuite.StartEdit, - }, - { - label: "导出虚拟键鼠配置", - value: veGameVirtualInputSuite.ExportKeysConfig, - }, - { - label: "开启触屏操作透传至游戏", - value: veGameVirtualInputSuite.EnableTouch, - }, - { - label: "关闭触屏操作透传至游戏", - value: veGameVirtualInputSuite.DisableTouch, - }, -]; - -const veGamePad = { - Show: "show", - Release: "release", - StartModifyGamePadLayout: "startModifyGamePadLayout", - ExportGamePadConfig: "exportGamePadConfig", - RefreshGamePadLayoutWithConfig: "refreshGamePadLayoutWithConfig", - EnableTouch: "enableTouch", - DisableTouch: "disableTouch", - EnableVibrate: "enableVibrate", - DisableVibrate: "disableVibrate", -}; - -export const veGamePadList = [ - { - label: "显示虚拟手柄配置", - value: veGamePad.Show, - }, - { - label: "销毁虚拟手柄配置", - value: veGamePad.Release, - }, - { - label: "开启编辑虚拟手柄配置", - value: veGamePad.StartModifyGamePadLayout, - }, - { - label: "导出虚拟手柄配置", - value: veGamePad.ExportGamePadConfig, - }, - { - label: "刷新虚拟手柄配置", - value: veGamePad.RefreshGamePadLayoutWithConfig, - }, - { - label: "开启触屏操作透传至游戏", - value: veGamePad.EnableTouch, - }, - { - label: "关闭触屏操作透传至游戏", - value: veGamePad.DisableTouch, - }, - { - label: "开启震动", - value: veGamePad.EnableVibrate, - }, - { - label: "关闭震动", - value: veGamePad.DisableVibrate, - }, -]; - -// 触控类型 -export const ACTION = { - DOWN: 0, - UP: 1, - MOVE: 2, - TOUCH_START: 0, - TOUCH_END: 1, - TOUCH_MOVE: 2, - WHEEL: 8, - PC_TOUCH_UP: 0, - PC_TOUCH_DOWN: 1, - PC_TOUCH_MOVE: 2, -}; - -// 鼠标按键 -export const MOUSE_BUTTON = { - LEFT: 0, - CENTER: 1, - RIGHT: 2, -}; diff --git a/QuickStart/Web/CommonFeatures/src/features/clarity.js b/QuickStart/Web/CommonFeatures/src/features/clarity.js deleted file mode 100644 index cebea1e..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/clarity.js +++ /dev/null @@ -1,55 +0,0 @@ -import { clarityList } from "../constant.js"; - -const clarity = (veGameSdkInstance) => { - let syncBtn = null; - let clarityDataDropdown = null; - - const clarityData = async function () { - var value = $(this).text(); - if (value) { - const currentClarityValue = clarityList.find( - (item) => item.label === value - ); - try { - const res = await veGameSdkInstance.switchVideoStreamProfile( - currentClarityValue.value - ); - console.log("res", res); - console.log(`清晰度已切换为${value}`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - clarityDataDropdown = document.createElement("div"); - $(clarityDataDropdown) - .addClass("dropdown") - .html( - ` -
` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", clarityData); - }, - stopSuccess() { - $(syncBtn).remove(); - syncBtn = null; - - $(clarityDataDropdown).remove(); - clarityDataDropdown = null; - }, - }; -}; - -export default clarity; diff --git a/QuickStart/Web/CommonFeatures/src/features/clear-custom-local-keyboard-input.js b/QuickStart/Web/CommonFeatures/src/features/clear-custom-local-keyboard-input.js deleted file mode 100644 index 29dfe3b..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/clear-custom-local-keyboard-input.js +++ /dev/null @@ -1,33 +0,0 @@ -const clearCustomLocalKeyboardInput = (veGameSdkInstance) => { - let clearCustomLocalKeyboardInputDataBtn = null; - - const clearCustomLocalKeyboardInputData = async () => { - try { - await veGameSdkInstance.clearCustomLocalKeyboardInput(); - console.log("清除自定义本地键盘 Input 框的状态成功"); - } catch (error) { - console.error(error); - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - // demo 的 pc 场景才展示本地键盘 - if (veGameSdkInstance.isPC) { - clearCustomLocalKeyboardInputDataBtn = document.createElement("btn"); - $(clearCustomLocalKeyboardInputDataBtn) - .text("清除自定义本地键盘 Input 框的状态") - .addClass("btn btn-primary btn-sm") - .appendTo(".action-container") - .on("click", clearCustomLocalKeyboardInputData); - } - }, - stopSuccess() { - $(clearCustomLocalKeyboardInputDataBtn).remove(); - clearCustomLocalKeyboardInputDataBtn = null; - }, - }; -}; - -export default clearCustomLocalKeyboardInput; diff --git a/QuickStart/Web/CommonFeatures/src/features/game-pad.js b/QuickStart/Web/CommonFeatures/src/features/game-pad.js deleted file mode 100644 index 5a617df..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/game-pad.js +++ /dev/null @@ -1,97 +0,0 @@ -// 虚拟手柄 参考文档: https://www.volcengine.com/docs/6512/1263810 -import { veGamePadList } from "../constant.js"; -import { MODE } from "@volcengine/vegame"; - -const gamePad = (veGameSdkInstance) => { - let gamePadDropDown = null; - - let pad = null; - const gamePadFunc = async function () { - var value = $(this).text(); - if (value) { - try { - switch (value) { - case "关闭触屏操作透传至游戏": - pad.enableTouch(false); - console.log(`${value}成功`); - break; - case "关闭震动": - pad.enableVibrate(false); - console.log(`${value}成功`); - break; - case "导出虚拟手柄配置": - const config = await pad.exportGamePadConfig(); - console.log(`导出虚拟手柄配置,${JSON.stringify(config)}`); - break; - default: - pad[veGamePadList.find((item) => item.label === value).value]?.(); - console.log(`${value}成功`); - break; - } - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - console.log("gamePad", veGameSdkInstance); - // 引入提供的 umd 文件,全局变量名为 veGamegamePad - pad = new veGamePadSDK(veGameSdkInstance); - - // 从操控状态进入编辑状态时(调用 startEdit 方法),触发此事件回调。 - pad.on("start-edit", () => { - console.log("start-edit"); - }); - // 手柄在编辑状态下,用户单击恢复默认时,触发此事件回调,此时手柄恢复至进入编辑之前的 UI 配置。 - pad.on("restore-default", () => { - console.log("restore-default"); - }); - pad.on("cancel-edit", () => { - console.log("cancel-edit"); - }); - // 在编辑状态下,用户单击保存时,触发此事件回调,此时手柄更新为新的 UI 配置。 - pad.on("save-config", (params) => { - const { config } = params; - console.log("save-config", config); - }); - - // 游戏过程中,游戏内部的震动场景会触发此事件。 - pad.on("gamepad-vibrate", (params) => { - const { index, l, r } = params; - console.log("index", index, "l", l, "r", r); - }); - - if (veGameSdkInstance.mode === MODE.CLOUD_PHONE_GAME) { - gamePadDropDown = document.createElement("div"); - $(gamePadDropDown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", gamePadFunc); - } - }, - stopSuccess() { - $(gamePadDropDown).remove(); - gamePadDropDown = null; - pad.release(); - pad = null; - }, - }; -}; - -export default gamePad; diff --git a/QuickStart/Web/CommonFeatures/src/features/get-auto-recycle-time.js b/QuickStart/Web/CommonFeatures/src/features/get-auto-recycle-time.js deleted file mode 100644 index f3a77f9..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/get-auto-recycle-time.js +++ /dev/null @@ -1,31 +0,0 @@ -const getAutoRecycle = (veGameSdkInstance) => { - let getAutoRecycleDataBtn = null; - - const getAutoRecycleTime = async () => { - try { - const res = await veGameSdkInstance.getAutoRecycleTime(); - console.log(res); - console.log(`自动回收时长为${res.duration}秒`); - } catch (error) { - console.error(error); - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - getAutoRecycleDataBtn = document.createElement("btn"); - $(getAutoRecycleDataBtn) - .text("获取自动回收时长") - .addClass("btn btn-primary btn-sm") - .appendTo(".action-container") - .on("click", getAutoRecycleTime); - }, - stopSuccess() { - $(getAutoRecycleDataBtn).remove(); - getAutoRecycleDataBtn = null; - }, - }; -}; - -export default getAutoRecycle; diff --git a/QuickStart/Web/CommonFeatures/src/features/get-user-profile-path.js b/QuickStart/Web/CommonFeatures/src/features/get-user-profile-path.js deleted file mode 100644 index 1fc2209..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/get-user-profile-path.js +++ /dev/null @@ -1,38 +0,0 @@ -// 获取存档路径 -const getUserProfilePath = (veGameSdkInstance) => { - let getUserProfilePathDropDown = null; - - const getUserProfilePathFunc = async function () { - var value = $(this).text(); - if (value) { - try { - // 实例代码:具体的path可自定义 - const userProfilePath = await veGameSdkInstance.getUserProfilePath(); - console.log( - `保存用户配置文件的路径为:${JSON.stringify(userProfilePath)}` - ); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - // 手游才能设置挂机模式 - getUserProfilePathDropDown = document.createElement("div"); - $(getUserProfilePathDropDown) - .text("获取保存用户配置文件的路径") - .addClass("btn btn-primary btn-sm") - .appendTo(".action-container") - .on("click", getUserProfilePathFunc); - }, - stopSuccess() { - $(getUserProfilePathDropDown).remove(); - getUserProfilePathDropDown = null; - }, - }; -}; - -export default getUserProfilePath; diff --git a/QuickStart/Web/CommonFeatures/src/features/idle-time.js b/QuickStart/Web/CommonFeatures/src/features/idle-time.js deleted file mode 100644 index c155922..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/idle-time.js +++ /dev/null @@ -1,51 +0,0 @@ -const idleTime = (veGameSdkInstance) => { - let syncBtn = null; - let idleDataDropdown = null; - - const setIdleTime = async function () { - var value = $(this).text(); - console.log("选中的值:", value); - if (value) { - try { - const res = await veGameSdkInstance.setIdleTime( - Number(value.replace("s", "")) - ); - console.log("res", res); - console.log(`设置保活时间为${value}`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - idleDataDropdown = document.createElement("div"); - $(idleDataDropdown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", setIdleTime); - }, - stopSuccess() { - $(syncBtn).remove(); - syncBtn = null; - - $(idleDataDropdown).remove(); - idleDataDropdown = null; - }, - }; -}; - -export default idleTime; diff --git a/QuickStart/Web/CommonFeatures/src/features/ime-composition-visible.js b/QuickStart/Web/CommonFeatures/src/features/ime-composition-visible.js deleted file mode 100644 index b36a0b4..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/ime-composition-visible.js +++ /dev/null @@ -1,42 +0,0 @@ -// 本地输入法 -const imeCompositionVisible = (veGameSdkInstance) => { - let imeCompositionVisibleDataBtn = null; - - const showImeComposition = async () => { - try { - /* - 本地输入法显示中文合成过程 - 参数说明: - @param visible: 是否显示中文合成过程 - @param style: 中文合成过程的样式 - */ - await veGameSdkInstance.setIMECompositionVisible( - true, - "background-color: transparent;" - ); - console.log("本地输入法显示中文合成过程成功"); - } catch (error) { - console.error(error); - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - if (veGameSdkInstance.isPC) { - imeCompositionVisibleDataBtn = document.createElement("btn"); - $(imeCompositionVisibleDataBtn) - .text("本地输入法显示中文合成过程") - .addClass("btn btn-primary btn-sm") - .appendTo(".action-container") - .on("click", showImeComposition); - } - }, - stopSuccess() { - $(imeCompositionVisibleDataBtn).remove(); - imeCompositionVisibleDataBtn = null; - }, - }; -}; - -export default imeCompositionVisible; diff --git a/QuickStart/Web/CommonFeatures/src/features/index.js b/QuickStart/Web/CommonFeatures/src/features/index.js deleted file mode 100644 index 9febaa2..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/index.js +++ /dev/null @@ -1,20 +0,0 @@ -export { default as clarity } from "./clarity.js"; -export { default as idleTime } from "./idle-time.js"; -export { default as setAutoRecycleTime } from "./set-auto-recycle-time.js"; -export { default as getAutoRecycleTime } from "./get-auto-recycle-time.js"; -export { default as updateVideoScale } from "./update-video-scale.js"; -export { default as switchBackground } from "./switch-background.js"; -export { default as reconnectTime } from "./reconnect-time.js"; -export { default as sessionMode } from "./session-mode.js"; -export { default as imeCompositionVisible } from "./ime-composition-visible.js"; -export { default as syncLocalKeyboardCloseStatus } from "./sync-local-keyboard-close-status.js"; -export { default as clearCustomLocalKeyboardInput } from "./clear-custom-local-keyboard-input.js"; -export { default as setCustomLocalKeyboardInputId } from "./set-custom-local-keyboard-input-id.js"; -export { default as rotateCoordinate } from "./rotate-coordinate.js"; -export { default as setRole } from "./set-role.js"; -export { default as setUserProfilePath } from "./set-user-profile-path.js"; -export { default as getUserProfilePath } from "./get-user-profile-path.js"; -export { default as setTouchToMouse } from "./set-touch-to-mouse.js"; -export { default as virtualInputSuite } from "./virtual-input-suite.js"; -export { default as gamePad } from "./game-pad.js"; -export { default as touchToMouseEvent } from "./touch-to-mouse-event.js"; diff --git a/QuickStart/Web/CommonFeatures/src/features/reconnect-time.js b/QuickStart/Web/CommonFeatures/src/features/reconnect-time.js deleted file mode 100644 index 4e62ca3..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/reconnect-time.js +++ /dev/null @@ -1,51 +0,0 @@ -const reconnectTime = (veGameSdkInstance) => { - let syncBtn = null; - let reconnectTimeDataDropDown = null; - - const setReconnectTime = async function () { - var value = $(this).text(); - console.log("选中的值:", value); - if (value) { - try { - // 单位 毫秒 - await veGameSdkInstance.setReconnectTime( - Number(value.replace("s", "")) * 1000 - ); - console.log(`已设置重连时间为${value}`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - reconnectTimeDataDropDown = document.createElement("div"); - $(reconnectTimeDataDropDown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", setReconnectTime); - }, - stopSuccess() { - $(syncBtn).remove(); - syncBtn = null; - - $(reconnectTimeDataDropDown).remove(); - reconnectTimeDataDropDown = null; - }, - }; -}; - -export default reconnectTime; diff --git a/QuickStart/Web/CommonFeatures/src/features/rotate-coordinate.js b/QuickStart/Web/CommonFeatures/src/features/rotate-coordinate.js deleted file mode 100644 index 7fe5270..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/rotate-coordinate.js +++ /dev/null @@ -1,50 +0,0 @@ -const rotateCoordinate = (veGameSdkInstance) => { - let syncBtn = null; - let rotateCoordinateDataDropdown = null; - - const rotateCoordinate = async function () { - var value = $(this).text(); - if (value) { - try { - const degree = Number(value.replace("度", "")); - const res = await veGameSdkInstance.rotateCoordinate(degree); - $(".player-container").css("transform", `rotate(${degree}deg)`); - console.log("res", res); - console.log(`坐标已旋转${value}`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - rotateCoordinateDataDropdown = document.createElement("div"); - $(rotateCoordinateDataDropdown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", rotateCoordinate); - }, - stopSuccess() { - $(syncBtn).remove(); - syncBtn = null; - - $(rotateCoordinateDataDropdown).remove(); - rotateCoordinateDataDropdown = null; - }, - }; -}; - -export default rotateCoordinate; diff --git a/QuickStart/Web/CommonFeatures/src/features/session-mode.js b/QuickStart/Web/CommonFeatures/src/features/session-mode.js deleted file mode 100644 index bb42cde..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/session-mode.js +++ /dev/null @@ -1,50 +0,0 @@ -// 挂机模式 -import { veGameModeList } from "../constant.js"; -import { MODE } from "@volcengine/vegame"; - -const sessionMode = (veGameSdkInstance) => { - let sessionModeDataDropDown = null; - - const setSessionModeFn = async function () { - var value = $(this).text(); - if (value) { - try { - await veGameSdkInstance.setSessionMode( - veGameModeList.find((item) => item.label === value).value - ); - console.log(`切换模式成功,当前为${value}`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - // 手游才能设置挂机模式 - if (veGameSdkInstance.mode === MODE.CLOUD_PHONE_GAME) { - sessionModeDataDropDown = document.createElement("div"); - $(sessionModeDataDropDown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", setSessionModeFn); - } - }, - stopSuccess() { - $(sessionModeDataDropDown).remove(); - sessionModeDataDropDown = null; - }, - }; -}; - -export default sessionMode; diff --git a/QuickStart/Web/CommonFeatures/src/features/set-auto-recycle-time.js b/QuickStart/Web/CommonFeatures/src/features/set-auto-recycle-time.js deleted file mode 100644 index fe0512e..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/set-auto-recycle-time.js +++ /dev/null @@ -1,48 +0,0 @@ -const autoRecycle = (veGameSdkInstance) => { - let syncBtn = null; - let autoRecycleDataDropdown = null; - - const setAutoRecycleTime = async function () { - var value = $(this).text(); - if (value) { - try { - await veGameSdkInstance.setAutoRecycleTime( - Number(value.replace("s", "")) - ); - console.log(`已设置自动回收时长为${value}`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - autoRecycleDataDropdown = document.createElement("div"); - $(autoRecycleDataDropdown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", setAutoRecycleTime); - }, - stopSuccess() { - $(syncBtn).remove(); - syncBtn = null; - - $(autoRecycleDataDropdown).remove(); - autoRecycleDataDropdown = null; - }, - }; -}; - -export default autoRecycle; diff --git a/QuickStart/Web/CommonFeatures/src/features/set-custom-local-keyboard-input-id.js b/QuickStart/Web/CommonFeatures/src/features/set-custom-local-keyboard-input-id.js deleted file mode 100644 index 2f519a1..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/set-custom-local-keyboard-input-id.js +++ /dev/null @@ -1,37 +0,0 @@ -const setCustomLocalKeyboardInputId = (veGameSdkInstance) => { - let setCustomLocalKeyboardInputIdBtn = null; - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - - const setCustomLocalKeyboardInputId = async () => { - try { - await veGameSdkInstance.setCustomLocalKeyboardInputId( - "customLocalKeyboardInputId" - ); - console.log( - "已设置自定义本地键盘 Input 框ID为 customLocalKeyboardInputId" - ); - } catch (e) { - console.error(e); - } - }; - - return { - startSuccess() { - // demo 的 pc 场景才展示 设置自定义本地键盘 Input 框 - if (veGameSdkInstance.isPC) { - setCustomLocalKeyboardInputIdBtn = document.createElement("btn"); - $(setCustomLocalKeyboardInputIdBtn) - .text("设置自定义本地键盘 Input 框") - .addClass("btn btn-primary btn-sm") - .appendTo(".action-container") - .on("click", setCustomLocalKeyboardInputId); - } - }, - stopSuccess() { - $(setCustomLocalKeyboardInputIdBtn).remove(); - setCustomLocalKeyboardInputIdBtn = null; - }, - }; -}; - -export default setCustomLocalKeyboardInputId; diff --git a/QuickStart/Web/CommonFeatures/src/features/set-role.js b/QuickStart/Web/CommonFeatures/src/features/set-role.js deleted file mode 100644 index 3cbebf6..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/set-role.js +++ /dev/null @@ -1,55 +0,0 @@ -// 切换角色 -import { veGameRoleList } from "../constant.js"; -import { MODE } from "@volcengine/vegame"; - -const setRole = (veGameSdkInstance) => { - let setRoleDropDown = null; - - const setRoleFunc = async function () { - var value = $(this).text(); - if (value) { - try { - await veGameSdkInstance.changeRole({ - userId: "xxx", - role: veGameRoleList.find((item) => item.label === value).value, - }); - console.log(`切换角色成功,当前为${value}`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - // 手游才能设置挂机模式 - if (veGameSdkInstance.mode === MODE.CLOUD_PHONE_GAME) { - setRoleDropDown = document.createElement("div"); - $(setRoleDropDown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", setRoleFunc); - } - }, - stopSuccess() { - $(setRoleDropDown).remove(); - setRoleDropDown = null; - }, - }; -}; - -export default setRole; diff --git a/QuickStart/Web/CommonFeatures/src/features/set-touch-to-mouse.js b/QuickStart/Web/CommonFeatures/src/features/set-touch-to-mouse.js deleted file mode 100644 index 525d380..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/set-touch-to-mouse.js +++ /dev/null @@ -1,43 +0,0 @@ -// 单触点转鼠标消息 -const setTouchToMouse = (veGameSdkInstance) => { - let setTouchToMouseDropDown = null; - - const setTouchToMouseFunc = async function () { - var value = $(this).text(); - if (value) { - try { - await veGameSdkInstance.Mouse.setTouchToMouse(value === "开启"); - console.log(`单触点转鼠标消息${value}成功`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - // 手游才能设置挂机模式 - setTouchToMouseDropDown = document.createElement("div"); - $(setTouchToMouseDropDown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", setTouchToMouseFunc); - }, - stopSuccess() { - $(setTouchToMouseDropDown).remove(); - setTouchToMouseDropDown = null; - }, - }; -}; - -export default setTouchToMouse; diff --git a/QuickStart/Web/CommonFeatures/src/features/set-user-profile-path.js b/QuickStart/Web/CommonFeatures/src/features/set-user-profile-path.js deleted file mode 100644 index 0a20157..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/set-user-profile-path.js +++ /dev/null @@ -1,36 +0,0 @@ -// 设置存档 -const setUserProfilePath = (veGameSdkInstance) => { - let setUserProfilePathDropDown = null; - - const setUserProfilePathFunc = async function () { - var value = $(this).text(); - if (value) { - try { - // 实例代码:具体的path可自定义 - await veGameSdkInstance.setUserProfilePath(["/a/b/", "/c/d/"]); - console.log(`设置保存用户配置文件的路径成功`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - // 手游才能设置挂机模式 - setUserProfilePathDropDown = document.createElement("div"); - $(setUserProfilePathDropDown) - .text("设置保存用户配置文件的路径") - .addClass("btn btn-primary btn-sm") - .appendTo(".action-container") - .on("click", setUserProfilePathFunc); - }, - stopSuccess() { - $(setUserProfilePathDropDown).remove(); - setUserProfilePathDropDown = null; - }, - }; -}; - -export default setUserProfilePath; diff --git a/QuickStart/Web/CommonFeatures/src/features/switch-background.js b/QuickStart/Web/CommonFeatures/src/features/switch-background.js deleted file mode 100644 index 34a1fb6..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/switch-background.js +++ /dev/null @@ -1,45 +0,0 @@ -const switchBackground = (veGameSdkInstance) => { - let syncBtn = null; - let switchBackgroundDataDropDown = null; - - const switchBackgroundFn = async function () { - var value = $(this).text(); - if (value) { - try { - await veGameSdkInstance.switchBackground(value === "切后台"); - console.log(`客户端前后台切换成功,当前为${value}`); - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - switchBackgroundDataDropDown = document.createElement("div"); - $(switchBackgroundDataDropDown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", switchBackgroundFn); - }, - stopSuccess() { - $(syncBtn).remove(); - syncBtn = null; - - $(switchBackgroundDataDropDown).remove(); - switchBackgroundDataDropDown = null; - }, - }; -}; - -export default switchBackground; diff --git a/QuickStart/Web/CommonFeatures/src/features/sync-local-keyboard-close-status.js b/QuickStart/Web/CommonFeatures/src/features/sync-local-keyboard-close-status.js deleted file mode 100644 index 34399fe..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/sync-local-keyboard-close-status.js +++ /dev/null @@ -1,33 +0,0 @@ -const syncLocalKeyboardCloseStatus = (veGameSdkInstance) => { - let syncLocalKeyboardCloseStatusDataBtn = null; - - const syncLocalKeyboardCloseStatusFn = async () => { - try { - await veGameSdkInstance.syncLocalKeyboardCloseStatus(); - console.log("同步本地键盘隐藏/关闭状态到云端游戏成功"); - } catch (error) { - console.error(error); - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - // demo 的 pc 场景才展示 同步本地键盘隐藏/关闭状态到云端游戏 - if (veGameSdkInstance.isPC) { - syncLocalKeyboardCloseStatusDataBtn = document.createElement("btn"); - $(syncLocalKeyboardCloseStatusDataBtn) - .text("同步本地键盘隐藏/关闭状态到云端游戏") - .addClass("btn btn-primary btn-sm") - .appendTo(".action-container") - .on("click", syncLocalKeyboardCloseStatusFn); - } - }, - stopSuccess() { - $(syncLocalKeyboardCloseStatusDataBtn).remove(); - syncLocalKeyboardCloseStatusDataBtn = null; - }, - }; -}; - -export default syncLocalKeyboardCloseStatus; diff --git a/QuickStart/Web/CommonFeatures/src/features/update-video-scale.js b/QuickStart/Web/CommonFeatures/src/features/update-video-scale.js deleted file mode 100644 index 0708674..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/update-video-scale.js +++ /dev/null @@ -1,29 +0,0 @@ -const updateVideoScale = (veGameSdkInstance) => { - let updateVideoScaleDataBtn = null; - - const updateVideoScale = async () => { - try { - await veGameSdkInstance.updateVideoScale(); - console.log("更新画面放缩比成功"); - } catch (error) { - console.error(error); - } - }; - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - updateVideoScaleDataBtn = document.createElement("btn"); - $(updateVideoScaleDataBtn) - .text("更新画面放缩比") - .addClass("btn btn-primary btn-sm") - .appendTo(".action-container") - .on("click", updateVideoScale); - }, - stopSuccess() { - $(updateVideoScaleDataBtn).remove(); - updateVideoScaleDataBtn = null; - }, - }; -}; - -export default updateVideoScale; diff --git a/QuickStart/Web/CommonFeatures/src/features/virtual-input-suite.js b/QuickStart/Web/CommonFeatures/src/features/virtual-input-suite.js deleted file mode 100644 index ccf6868..0000000 --- a/QuickStart/Web/CommonFeatures/src/features/virtual-input-suite.js +++ /dev/null @@ -1,91 +0,0 @@ -// 参考文档:https://www.volcengine.com/docs/6512/1330725#exportkeysconfig -import { veGameVirtualInputSuiteList } from "../constant.js"; -import { MODE } from "@volcengine/vegame"; - -const virtualInputSuite = (veGameSdkInstance) => { - let virtualInputSuiteDropDown = null; - - let vis = null; - const virtualInputSuiteFunc = async function () { - var value = $(this).text(); - if (value) { - try { - switch (value) { - case "关闭触屏操作透传至游戏": - vis.enableTouch(false); - console.log(`${value}成功`); - break; - case "导出虚拟键鼠配置": - const config = await vis.exportKeysConfig(); - console.log(`导出虚拟键鼠配置成功,${JSON.stringify(config)}`); - break; - default: - vis[ - veGameVirtualInputSuiteList.find((item) => item.label === value) - .value - ]?.(); - console.log(`${value}成功`); - break; - } - } catch (error) { - console.error(error); - } - } - }; - - // 返回的 startSuccess 和 stopSuccess 方法会分别在成功启动云游戏和成功停止云游戏时调用 - return { - startSuccess() { - console.log("virtualInputSuite", veGameSdkInstance); - // 引入提供的 umd 文件,全局变量名为 veGameVirtualInputSuite - vis = new veGameVirtualInputSuite(veGameSdkInstance); - - // 从操控状态进入编辑状态时(调用 startEdit 方法),触发此事件回调。 - vis.on("start-edit", () => { - console.log("start-edit"); - }); - // 虚拟键鼠在编辑状态下,用户单击恢复默认时,触发此事件回调,此时虚拟键鼠恢复至进入编辑之前的 UI 配置。 - vis.on("restore-default", () => { - console.log("restore-default"); - }); - // 在编辑状态下,用户单击保存时,触发此事件回调,此时虚拟键鼠更新为新的 UI 配置。 - vis.on("save-config", (params) => { - const { config } = params; - console.log("save-config", config); - }); - // 虚拟键鼠从在编辑状态下退出至操作状态时,触发此事件。(用户点击恢复默认或保存都会触发) - vis.on("exit-edit", () => { - console.log("exit-edit"); - }); - - if (veGameSdkInstance.mode === MODE.CLOUD_PHONE_GAME) { - virtualInputSuiteDropDown = document.createElement("div"); - $(virtualInputSuiteDropDown) - .addClass("dropdown") - .html( - ` - ` - ) - .appendTo(".action-container") - .on("click", ".dropdown-item", virtualInputSuiteFunc); - } - }, - stopSuccess() { - $(virtualInputSuiteDropDown).remove(); - virtualInputSuiteDropDown = null; - vis.release(); - vis = null; - }, - }; -}; - -export default virtualInputSuite; diff --git a/QuickStart/Web/CommonFeatures/src/index.html b/QuickStart/Web/CommonFeatures/src/index.html deleted file mode 100644 index 68085ff..0000000 --- a/QuickStart/Web/CommonFeatures/src/index.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -