{"id":20302387,"url":"https://github.com/mrminfive/wxapp-sketchpad","last_synced_at":"2026-07-27T08:32:00.156Z","repository":{"id":94737058,"uuid":"136112114","full_name":"Mrminfive/wxapp-sketchpad","owner":"Mrminfive","description":":art: 微信小程序快速绘画工具【已废弃】","archived":false,"fork":false,"pushed_at":"2018-08-07T09:31:55.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-22T21:53:56.035Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mrminfive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-06-05T03:03:55.000Z","updated_at":"2018-08-07T09:31:56.000Z","dependencies_parsed_at":"2023-05-12T16:00:48.399Z","dependency_job_id":null,"html_url":"https://github.com/Mrminfive/wxapp-sketchpad","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mrminfive/wxapp-sketchpad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Fwxapp-sketchpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Fwxapp-sketchpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Fwxapp-sketchpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Fwxapp-sketchpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mrminfive","download_url":"https://codeload.github.com/Mrminfive/wxapp-sketchpad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Fwxapp-sketchpad/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35945273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-27T02:00:06.776Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-14T16:31:09.156Z","updated_at":"2026-07-27T08:32:00.113Z","avatar_url":"https://github.com/Mrminfive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wxapp-sketchpad\n\n微信小程序快速绘画工具\n\n## 使用方式：\n\n``` html\n\u003ccanvas\n    id=\"m-canvas\"\n    canvas-id=\"m-canvas\"\n    style=\"{{width ? 'width: ' + width + ';' : ''}}{{height ? 'height: ' + height + ';' : ''}}\"\u003e\u003c/canvas\u003e\n```\n\n``` js\n\nimport {\n    Scene,\n    Element,\n    Label,\n    Background\n} from 'sketchpad';\n\nPage({\n    data: {\n        width: null,\n        height: null\n    },\n\n    render() {\n        this.canvasScene = new Scene('m-canvas', {\n            context: this,\n            original: [750, 1334],\n            initRect: rect =\u003e {\n                this.setData({\n                    width: rect.width + 'px',\n                    height: rect.height + 'px'\n                });\n            }\n        });\n\n        wx.showLoading();\n\n        this.canvasScene\n            .append(new Background({\n                color: '#dddddd',\n                image: 'http://img3.redocn.com/tupian/20150106/aixinxiangkuang_3797284.jpg'\n            }))\n            .append(new Label({\n                text: '这是我的内容啊这是我的',\n                color: '#aad375',\n                fontSize: 28,\n                maxWidth: '100%',\n                zIndex: 2\n            }))\n            .append(new Element({\n                left: 100,\n                top: 100,\n                width: '50%',\n                height: 180 * 1.3,\n                text: '这是自定义节点啊',\n                fontSize: 60,\n                border: '10px red',\n                color: 'blue',\n                backgroundColor: '#dddddd',\n                backgroundImage: 'http://img.zcool.cn/community/01ca8c573c04b832f8757cb97b2444.jpg@1280w_1l_2o_100sh.jpg',\n                textAlign: 'center',\n                textVerticalAlign: 'middle',\n                padding: [10, 20, 10, 20]\n            }))\n            .draw()\n            .then(() =\u003e {\n                wx.hideLoading();\n            });\n    }\n})\n```\n\n## 预览\n\n``` shell\ngit clone 当前项目\nnpm install \u0026\u0026 npm run dev\n// 使用微信开发者工具打开 `example` 文件夹\n```\n\n具体 api 接口参见源码注释\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrminfive%2Fwxapp-sketchpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrminfive%2Fwxapp-sketchpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrminfive%2Fwxapp-sketchpad/lists"}