{"id":18938222,"url":"https://github.com/wechat-miniprogram/xr-frame-cli","last_synced_at":"2025-04-15T19:30:22.339Z","repository":{"id":45571416,"uuid":"501606674","full_name":"wechat-miniprogram/xr-frame-cli","owner":"wechat-miniprogram","description":"Tools for xr-frame in wechat miniprogram.","archived":false,"fork":false,"pushed_at":"2023-07-17T04:28:58.000Z","size":3583,"stargazers_count":50,"open_issues_count":5,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T01:06:12.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wechat-miniprogram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-09T10:29:07.000Z","updated_at":"2024-07-23T18:23:39.000Z","dependencies_parsed_at":"2022-08-04T17:45:32.517Z","dependency_job_id":null,"html_url":"https://github.com/wechat-miniprogram/xr-frame-cli","commit_stats":null,"previous_names":["dtysky/xr-frame-cli"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechat-miniprogram%2Fxr-frame-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechat-miniprogram%2Fxr-frame-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechat-miniprogram%2Fxr-frame-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechat-miniprogram%2Fxr-frame-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wechat-miniprogram","download_url":"https://codeload.github.com/wechat-miniprogram/xr-frame-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249138489,"owners_count":21218896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T12:13:45.061Z","updated_at":"2025-04-15T19:30:21.824Z","avatar_url":"https://github.com/wechat-miniprogram.png","language":"TypeScript","readme":"# xr-frame-cli\n\n## 注意\n\n此项目已废弃，请使用全新的可视化工具[XR-FRAME-TOOLKIT](https://github.com/dtysky/xr-frame-toolkit)替代！\n\n## 原始文档\n\n用于微信小程序内置的`xr-frame`系统的CLI，提供以下两个功能：\n\n1. 通过环境贴图，生成`xr-frame`专用的`env-data`，包含`skybox`、`diffuse sh`和`specular map`，支持打包成单二进制文件。\n2. 对`gltf`模型文件进行预处理，优化为`xr-frame`友好的数据结构，同时支持打包为`glb`，能大幅提升加载速度。\n\n## 使用\n\n首先安装：\n\n```sh\nnpm i xr-frame-cli -g\n```\n\n之后可以使用下列指令：\n\n### env-data\n\n运行：\n\n```sh\nxr-frame env-data -h\n```\n\n可以看到所有支持的操作。\n\n目前支持的输入格式为`['hdr', 'exr', 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'tiff']`，要求输入图片比例近似`2:1`。\n\n以`xr-frame env-data -i test/exr.exr`为例，原始图片和产物如下（`specular map`为`rgbd`编码）：\n\n![](./doc/env-data.jpg)\n\n\n### gltf\n\n运行：\n\n```sh\nxr-frame gltf -h\n```\n\n可以看到所有支持的操作。\n\n\u003e如果需要更进阶的优化，可以尝试使用[SeinJSUnityToolkit](https://github.com/hiloteam/SeinJSUnityToolkit)。注意如果要导出动画的话，不要勾选`Use SeinAnimator`。\n\n## 开发测试\n\n项目提供了一张图和一个模型用于开发测试。\n\n### env-data\n\n执行：\n\n```sh\nnpm run dev \u0026\u0026 xr-frame env-data -i test/exr.exr\n```\n\n输出将会在`test/exr`目录下。\n\n### gltf\n\n执行：\n\n```sh\nnpm run dev \u0026\u0026 xr-frame gltf -i test/gltf-sources/gltf/index.gltf -o test/gltf-dist\n```\n\n输出将会在`test/gltf-dist/gltf`目录下。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechat-miniprogram%2Fxr-frame-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwechat-miniprogram%2Fxr-frame-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechat-miniprogram%2Fxr-frame-cli/lists"}