{"id":23647876,"url":"https://github.com/binzume/aframe-vrm","last_synced_at":"2025-04-09T07:07:34.279Z","repository":{"id":48140378,"uuid":"211655803","full_name":"binzume/aframe-vrm","owner":"binzume","description":"VRM components for A-Frame","archived":false,"fork":false,"pushed_at":"2025-02-10T18:39:09.000Z","size":44068,"stargazers_count":53,"open_issues_count":7,"forks_count":20,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-02T06:07:01.826Z","etag":null,"topics":["aframe","vr","vrm","webvr"],"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/binzume.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":"2019-09-29T11:57:43.000Z","updated_at":"2025-01-02T09:29:56.000Z","dependencies_parsed_at":"2022-09-19T08:01:58.026Z","dependency_job_id":null,"html_url":"https://github.com/binzume/aframe-vrm","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binzume%2Faframe-vrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binzume%2Faframe-vrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binzume%2Faframe-vrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binzume%2Faframe-vrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binzume","download_url":"https://codeload.github.com/binzume/aframe-vrm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994121,"owners_count":21030050,"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":["aframe","vr","vrm","webvr"],"created_at":"2024-12-28T14:49:09.039Z","updated_at":"2025-04-09T07:07:34.259Z","avatar_url":"https://github.com/binzume.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VRM Components for A-Frame\n\n[A-Frame](https://aframe.io/) で [VRM](https://vrm.dev/) のモデルを動かすコンポーネントです.\n\n## Features\n\n- Animation\n- BlendShape (Morph)\n- Physics (using CANNON.js)\n\n## Demo\n\n- [Live DEMO](https://binzume.github.io/aframe-vrm/demo/)\n- [Live DEMO(Physics)](https://binzume.github.io/aframe-vrm/demo/physics.html) (using [aframe-physics-system](https://github.com/n5ro/aframe-physics-system))\n- VRM/GLB,BVH/VMDファイルをブラウザにドラッグ＆ドロップするとプレビューできます(アップロードはされません)\n- WebVRはOculus Questでテストしています\n\n![AliciaSolid](./demo/alicia1.gif)\n\n## Usage\n\n```html\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cscript src=\"https://cdn.jsdelivr.net/gh/aframevr/aframe@v1.0.4/dist/aframe-master.min.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"https://binzume.github.io/aframe-vrm/dist/aframe-vrm.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody style=\"background-color: black; color:white;\"\u003e\n  \u003ca-scene\u003e\n    \u003ca-entity vrm=\"src:assets/AliciaSolid/AliciaSolid.vrm;blink:true\" vrm-anim=\"\" rotation=\"0 180 0\"\u003e\u003c/a-entity\u003e\n    \u003ca-camera position=\"0 1.6 2\"\u003e\u003c/a-camera\u003e\n  \u003c/a-scene\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nnpm: [@binzume/aframe-vrm](https://www.npmjs.com/package/@binzume/aframe-vrm)\n\n## Components\n\n- vrm: Load vrm model\n- vrm-bvh: Play BVH/VMD animation\n- vrm-poser: pose editor for VR\n- vrm-skeleton: display skeleton\n- vrm-mimic: TODO\n\n### vrm\n\nAttributes:\n\n| name          | type     | default | desc |\n| ------------- | -------- | ------- | ---- |\n| src           | string   | None    | VRM model URL |\n| blink         | boolean  | false   | Auto blink |\n| blinkInterval | number   | 5       | Auto blink interval |\n| lookAt        | selector | None    | look at target element |\n| firstPerson   | boolean  | false   | Hide head meshes |\n\nProperties:\n\navatar : VRMAvatar\n\nEvents:\n\n| name         | event.detail | desc |\n| ------------ | ------------ | ---- |\n| model-loaded | {format:'vrm', model: Object3D, avatar: VRMAvatar} | Loaded event |\n| model-error  | {format:'vrm', src: URL, cause: object} | Error event |\n\nCompatible with gltf-model component: https://aframe.io/docs/1.0.0/components/gltf-model.html\n\n### vrm-poser\n\nPose editor.\n\nAttributes:\n\n| name              | type    | default | desc        |\n| ----------------- | ------- | ------- | ----------- |\n| color             | color   | green   | box color   |\n| enableConstraints | boolean | true    | Enable bone constraints |\n\n### vrm-anim\n\nPlay bvh/vmd animation.\n\nAttributes:\n\n| name        | type     | default | desc |\n| ----------- | -------- | ------- | ---- |\n| src         | string   | ''      | BVH file url |\n| format      | string   | ''      | `vmd` or `bvh` (default: auto detect) |\n| convertBone | boolean  | true    | Convert bone name |\n\nsrcを空にすると待機アニメーションが再生されます(テスト用)．\n\n## Building aframe-vrm\n\n```sh\ncd aframe-vrm\nnpm install\nnpm run lint\nnpm run build\n```\n\n### VRMAvatar API\n\nSee: [avatar.ts](src/vrm/avatar.ts)\n\n```js\nimport {VRMLoader} from \"./dist/aframe-vrm.module.js\"\n\nconst scene = new THREE.Scene();\nconst avatar = await new VRMLoader().load(\"test.vrm\");\nscene.add(avatar.model);\n```\n\nProperty:\n\n- VRMAvatar.model : THREE.Object3D\n- VRMAvatar.mixer : THREE.AnimationMixer\n- VRMAvatar.lookAtTarget : THREE.Object3D\n- VRMAvatar.bones : VRM bones\n- VRMAvatar.blendShapes : blend shapes\n- VRMAvatar.meta : VRM meta data\n\nMethods:\n\n- VRMAvatar.update(timeDelta)\n- VRMAvatar.dispose() : Dispose VRM avatar.\n\n- VRMAvatar.setBlendShapeWeight(name, value) : Set blend shape weight for name.\n- VRMAvatar.getBlendShapeWeight(name) : Returns blend shape values.\n- VRMAvatar.resetBlendShape() : Reset all blend shapes.\n- VRMAvatar.resetPose() : T-Pose\n- VRMAvatar.startBlink(intervalSec)\n- VRMAvatar.stopBlink()\n- VRMAvatar.setFirstPerson(firstPerson)\n\n- VRMAvatar.modules.physics.attach(world : CANNON.World) : Start physics.\n- VRMAvatar.modules.physics.detach() : Stop physics.\n\n# TODO\n\n- Use https://github.com/pixiv/three-vrm\n\n# License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinzume%2Faframe-vrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinzume%2Faframe-vrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinzume%2Faframe-vrm/lists"}