{"id":19014236,"url":"https://github.com/spritejs/sprite-vue","last_synced_at":"2025-04-23T00:42:47.946Z","repository":{"id":87731687,"uuid":"145981419","full_name":"spritejs/sprite-vue","owner":"spritejs","description":"SpriteJS for Vue.js.","archived":false,"fork":false,"pushed_at":"2019-12-26T10:35:49.000Z","size":4001,"stargazers_count":61,"open_issues_count":3,"forks_count":12,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-23T00:42:41.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/spritejs.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":"2018-08-24T11:07:20.000Z","updated_at":"2024-10-25T00:42:40.000Z","dependencies_parsed_at":"2023-04-11T04:35:06.507Z","dependency_job_id":null,"html_url":"https://github.com/spritejs/sprite-vue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spritejs%2Fsprite-vue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spritejs%2Fsprite-vue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spritejs%2Fsprite-vue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spritejs%2Fsprite-vue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spritejs","download_url":"https://codeload.github.com/spritejs/sprite-vue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250348891,"owners_count":21415907,"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-08T19:28:27.426Z","updated_at":"2025-04-23T00:42:47.927Z","avatar_url":"https://github.com/spritejs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sprite-vue\n\n\u003e Vue.js 支持 SpriteJS 的 Runtime\n\n- [文档](http://vue.spritejs.org) \n- [Live DEMO](https://codepen.io/collection/nVbpGo/)\n\n## 直接使用\n\n[例子](https://code.h5jun.com/najo/edit?js,output)\n\n```html\n\u003cscript src=\"https://unpkg.com/spritejs/dist/spritejs.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/sprite-vue/dist/sprite-vue.min.js\"\u003e\u003c/script\u003e\n\u003cdiv id=\"app\"\u003e\u003c/div\u003e\n\u003cscript\u003e\nconst { Vue } = spritevue;\n\nnew Vue({\n  el: '#app',\n  data() {\n    return {\n      viewport: [600, 600],\n    }\n  },\n  template: `\u003cdiv\u003e\n  \u003cscene id=\"container\" :viewport=viewport\u003e\n    \u003clayer id=\"fglayer\"\u003e\n      \u003csprite :pos=\"[100, 100]\" :size=\"[50, 50]\"\n        bgcolor=\"red\"\u003e\u003c/sprite\u003e\n    \u003c/layer\u003e\n  \u003c/scene\u003e\n\u003c/div\u003e`,\n});\n\u003c/script\u003e\n```\n\n## 项目里安装和使用\n\n用 vue-cli 创建任意项目，将对应的 vue 模块替换成 sprite-vue 模块，在使用方式上稍作修改：\n\n```js\nimport Vue from 'vue';\n```\n\n修改为\n\n```js\nimport { Vue, spritejs } from 'sprite-vue'\n```\n\nEnjoy~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspritejs%2Fsprite-vue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspritejs%2Fsprite-vue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspritejs%2Fsprite-vue/lists"}