{"id":20008093,"url":"https://github.com/stack-stark/ngx-live2d","last_synced_at":"2025-03-02T01:28:51.143Z","repository":{"id":219148067,"uuid":"747593775","full_name":"stack-stark/ngx-live2d","owner":"stack-stark","description":"基于live2d.js 构建的支持angular17版本的 live2d 库","archived":false,"fork":false,"pushed_at":"2024-03-29T03:40:50.000Z","size":161,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"feature-basic","last_synced_at":"2024-04-26T01:20:57.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/stack-stark.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}},"created_at":"2024-01-24T08:51:10.000Z","updated_at":"2024-04-03T01:19:25.000Z","dependencies_parsed_at":"2024-11-13T07:08:28.440Z","dependency_job_id":"50671024-fa0a-4658-91ee-446a01416f31","html_url":"https://github.com/stack-stark/ngx-live2d","commit_stats":null,"previous_names":["stack-stark/ngx-live2d"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-stark%2Fngx-live2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-stark%2Fngx-live2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-stark%2Fngx-live2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stack-stark%2Fngx-live2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stack-stark","download_url":"https://codeload.github.com/stack-stark/ngx-live2d/tar.gz/refs/heads/feature-basic","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241446511,"owners_count":19964182,"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-13T07:08:24.699Z","updated_at":"2025-03-02T01:28:51.123Z","avatar_url":"https://github.com/stack-stark.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# about\n\n基于 live2d.js 构建的 angular17 版本的 live2d 库\n\n# Install\n\n```bash\nnpm install --save ngx-live2d\n#or\nyarn add ngx-live2d\n#or\npnpm add ngx-live2d\n```\n\n# Usage\n\n```js\nimport { Component, signal } from \"@angular/core\";\nimport { NgxLive2dComponent, POSITION, ASSETS_TYPE, BUILTIN_MODEL } from \"ngx-live2d\";\n@Component({\n  selector: \"app-home\",\n  standalone: true,\n  imports: [NgxLive2dComponent],\n  templateUrl: \"./home.component.html\",\n  styleUrl: \"./home.component.less\",\n})\nexport class HomeComponent {\n  /**\n   * 模型位置 默认POSITION.BOTTOM_RIGTH 右下角\n   */\n  position = signal(POSITION.BOTTOM_RIGTH);\n  /**\n   * 配置\n   * @assetsType 资源类型，ASSETS_TYPE.INTERIOR 内置 ASSETS_TYPE.EXTERNAL 外部资源\n   * @assets 资源名称或链接\n   */\n  configuration = signal({\n    assetsType: ASSETS_TYPE.INTERIOR,\n    assets: BUILTIN_MODEL.EPSILON2,\n  });\n\n  /**\n   * 模型单击事件\n   */\n  modelClickRun() {\n    console.log(\"modelClickRun\");\n  }\n}\n```\n\n```html\n\u003cdiv class=\"page\"\u003e\n  \u003cngx-live2d [position]=\"position()\" [configuration]=\"configuration()\" (OnModelClick)=\"modelClickRun()\" /\u003e\n\u003c/div\u003e\n```\n\n# API\n\n| 参数          | 类型     | 默认值       | 说明                                                                                     |\n| ------------- | -------- | ------------ | ---------------------------------------------------------------------------------------- |\n| POSITION      | enum     | BOTTOM_RIGTH | 模型展示位置。TOP_LEFT 左上角，BOTTOM_LEFT 左下角，TOP_RIGTH 右上角，BOTTOM_RIGTH 右下角 |\n| ASSETS_TYPE   | enum     | INTERIOR     | 资源类型。INTERIOR 内部资源，EXTERNAL 外部资源                                           |\n| BUILTIN_MODEL | enum     | EPSILON2     | 内置资源名称。有 Z16，EPSILON2，IZUMI，KOHARU，SHIZUKU，MIKU，HIJIKI，TORORO             |\n| OnModelClick  | Function | -            | 模型单击事件。                                                                           |\n\n# BUILTIN_MODEL\n\n| 名称     | 预览                                      |\n| -------- | ----------------------------------------- |\n| Z16      | https://ngx-live2d.async.cn?name=Z16      |\n| EPSILON2 | https://ngx-live2d.async.cn?name=EPSILON2 |\n| IZUMI    | https://ngx-live2d.async.cn?name=IZUMI    |\n| KOHARU   | https://ngx-live2d.async.cn?name=KOHARU   |\n| SHIZUKU  | https://ngx-live2d.async.cn?name=SHIZUKU  |\n| MIKU     | https://ngx-live2d.async.cn?name=MIKU     |\n| HIJIKI   | https://ngx-live2d.async.cn?name=HIJIKI   |\n| TORORO   | https://ngx-live2d.async.cn?name=TORORO   |\n\n# bugs\n\nhttps://github.com/stack-stark/ngx-live2d/issues\n\n# 预览\n\nhttps://ngx-live2d.asnyc.cn\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstack-stark%2Fngx-live2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstack-stark%2Fngx-live2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstack-stark%2Fngx-live2d/lists"}