{"id":18938201,"url":"https://github.com/wechat-miniprogram/threejs-miniprogram","last_synced_at":"2025-04-08T11:07:21.971Z","repository":{"id":37664721,"uuid":"206480104","full_name":"wechat-miniprogram/threejs-miniprogram","owner":"wechat-miniprogram","description":"WeChat MiniProgram adapted version of Three.js","archived":false,"fork":false,"pushed_at":"2023-05-22T06:53:21.000Z","size":1116,"stargazers_count":734,"open_issues_count":40,"forks_count":238,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-01T10:07:36.424Z","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":"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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-05T05:16:33.000Z","updated_at":"2025-03-29T02:33:27.000Z","dependencies_parsed_at":"2024-06-19T14:34:14.256Z","dependency_job_id":"f08de32d-072e-4412-983c-39e2f8633414","html_url":"https://github.com/wechat-miniprogram/threejs-miniprogram","commit_stats":{"total_commits":18,"total_committers":5,"mean_commits":3.6,"dds":"0.38888888888888884","last_synced_commit":"5c4964e43e8fd69a433483c30e8efeac5879e560"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechat-miniprogram%2Fthreejs-miniprogram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechat-miniprogram%2Fthreejs-miniprogram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechat-miniprogram%2Fthreejs-miniprogram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechat-miniprogram%2Fthreejs-miniprogram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wechat-miniprogram","download_url":"https://codeload.github.com/wechat-miniprogram/threejs-miniprogram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247829490,"owners_count":21002995,"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:42.475Z","updated_at":"2025-04-08T11:07:21.950Z","avatar_url":"https://github.com/wechat-miniprogram.png","language":"JavaScript","readme":"# threejs-miniprogram\nThree.js 小程序 WebGL 的适配版本。\n\n## 使用\n\n可参考 example 目录下的示例项目或参照以下流程：\n\n1. 通过 npm 安装\n\n   ```\n   npm install --save threejs-miniprogram\n   ```\n安装完成之后在微信开发者工具中点击构建 npm。\n\n2. 导入小程序适配版本的 Three.js\n\n```javascript\nimport {createScopedThreejs} from 'threejs-miniprogram'\n\nPage({\n  onReady() {\n    wx.createSelectorQuery()\n      .select('#webgl')\n      .node()\n      .exec((res) =\u003e {\n        const canvas = res[0].node\n        // 创建一个与 canvas 绑定的 three.js\n        const THREE = createScopedThreejs(canvas)\n        // 传递并使用 THREE 变量\n      })\n  }\n})\n```\n\n## 说明\n\n- 本项目当前使用的 Three.js 版本号为 0.108.0，如要更新 threejs 版本可发 PR 修改或 fork 后自行修改。\n- 该适配版本的 THREE 不在全局环境中，如使用 Three.js 的其他配套类库，需要自行传入 THREE 到类库中。\n- 如在使用过程中发现有适配问题，可通过 issue 反馈或发 PR 修复。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechat-miniprogram%2Fthreejs-miniprogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwechat-miniprogram%2Fthreejs-miniprogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechat-miniprogram%2Fthreejs-miniprogram/lists"}