{"id":27884662,"url":"https://github.com/code-jio/sharpgltf","last_synced_at":"2025-05-05T06:38:40.875Z","repository":{"id":228728878,"uuid":"774762152","full_name":"Code-jio/sharpGLTF","owner":"Code-jio","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-23T16:45:35.000Z","size":125336,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T16:53:27.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Code-jio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-20T06:14:01.000Z","updated_at":"2025-04-23T16:45:38.000Z","dependencies_parsed_at":"2024-06-24T05:45:28.587Z","dependency_job_id":"7230dcf4-aa7b-4c0d-9d21-e6743ea5df17","html_url":"https://github.com/Code-jio/sharpGLTF","commit_stats":null,"previous_names":["code-jio/sharpgltf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-jio%2FsharpGLTF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-jio%2FsharpGLTF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-jio%2FsharpGLTF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-jio%2FsharpGLTF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-jio","download_url":"https://codeload.github.com/Code-jio/sharpGLTF/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252454997,"owners_count":21750508,"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":"2025-05-05T06:38:39.861Z","updated_at":"2025-05-05T06:38:40.861Z","avatar_url":"https://github.com/Code-jio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sharpGLTF 优化工具\n\n## 项目概述\n基于微内核架构的WebGL引擎优化套件，专注于GLTF模型资产的运行时性能优化。通过模块化设计实现：\n- 🗜️ 多级LOD模型压缩\n- 🖼️ ASTC/Basis通用纹理优化\n- 🖥️ 跨平台渲染管线适配\n\n## 功能特性\n### 核心模块\n| 模块 | 功能描述 | 技术指标 |\n|------|----------|---------|\n| MeshOptimizer | 顶点/索引缓存优化 | 提升30%+渲染性能 |\n| TextureProcessor | 智能纹理转码 | 减少50%+显存占用 |\n| GLTFValidator | 资产合规性校验 | 符合glTF 2.0规范 |\n\n## 环境要求\n```bash\n# 验证Node.js版本\nnode -v # 要求 ≥16.18.1\n\n# 安装依赖\nnpm install sharp@0.32.6 @gltf-utils/gltf-optimize@2.4.0\n```\n\n## 使用指南\n### 目录结构\n```\ninput/\n  scene.gltf\n  textures/\noutput/\n```\n\n### 优化参数\n```javascript\nconst optimizer = require('./index.js');\n\noptimizer.run({\n  input: \"./input\",\n  output: \"./output\",\n  quality: 3, // 1-5级压缩\n  texture: {\n    format: \"ktx2\",\n    quality: 85\n  }\n});\n```\n\n## 性能基准\n| 测试场景 | 原始大小 | 优化后 | 提升率 |\n|---------|---------|-------|-------|\n| 工业厂房 | 218MB | 94MB | 56.8% |\n| 角色动画 | 157MB | 68MB | 56.7% |\n\n## 命令行接口\n```\nUsage: node main.js [options]\n\nOptions:\n  -i, --input \u003cpath\u003e    指定输入目录（必需）\n  -o, --output \u003cpath\u003e   指定输出目录（默认：./output）\n  -q, --quality \u003c1-5\u003e  设置压缩等级（默认：3）\n  -f, --format \u003cktx2/png\u003e 纹理输出格式（默认：ktx2）\n```\n\n## 优化流程图\n```mermaid\ngraph TD\n  A[输入GLTF] --\u003e B{格式校验}\n  B --\u003e|通过| C[顶点缓存优化]\n  C --\u003e D[网格量化]\n  D --\u003e E[纹理转码]\n  E --\u003e F[生成报告]\n  B --\u003e|失败| G[错误处理]\n```\n\n\u003e 📌 使用sharp处理图片时请确保Node.js版本为16.18.1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-jio%2Fsharpgltf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-jio%2Fsharpgltf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-jio%2Fsharpgltf/lists"}