{"id":13511485,"url":"https://github.com/alibaba/GCanvas","last_synced_at":"2025-03-30T20:33:22.532Z","repository":{"id":37270292,"uuid":"122935708","full_name":"alibaba/GCanvas","owner":"alibaba","description":"A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎) https://alibaba.github.io/GCanvas","archived":false,"fork":false,"pushed_at":"2023-03-06T16:35:47.000Z","size":92530,"stargazers_count":1883,"open_issues_count":43,"forks_count":208,"subscribers_count":76,"default_branch":"master","last_synced_at":"2024-10-29T17:54:21.069Z","etag":null,"topics":["2d","canvas","graphics","opengl","webgl"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alibaba.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":"docs/Contributing.md","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}},"created_at":"2018-02-26T08:10:58.000Z","updated_at":"2024-10-26T03:04:45.000Z","dependencies_parsed_at":"2024-01-16T12:01:30.548Z","dependency_job_id":null,"html_url":"https://github.com/alibaba/GCanvas","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2FGCanvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2FGCanvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2FGCanvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alibaba%2FGCanvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alibaba","download_url":"https://codeload.github.com/alibaba/GCanvas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222581265,"owners_count":17006322,"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":["2d","canvas","graphics","opengl","webgl"],"created_at":"2024-08-01T03:00:51.606Z","updated_at":"2024-11-01T13:31:05.139Z","avatar_url":"https://github.com/alibaba.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# [GCanvas](https://alibaba.github.io/GCanvas/)\n\nGCanvas is a cross-platform rendering engine for mobile devices developed by Alibaba. It is written with C++ based on OpenGL ES, so it can provide high performance 2D/WebGL rendering capabilities for JavaScript runtime. It also  has browser-like canvas APIs, so it's very convenient and flexiable for use, especially for web developers.\n\nSupported operating systems are Android 4.0+ (API 14) and iOS 8.0+.\n\n- [Getting Started](#getting-started)\n- [Documentation](#documentation)\n- [Examples](#examples)\n- [Built With](#build-with)\n- [Opening Issues](#opening-issues)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Distribution\n###  GCanvas\n\n* iOS  [GCanvas](https://cocoapods.org/pods/GCanvas)   [![CocoaPods Version](https://badge.fury.io/co/GCanvas.svg)](https://badge.fury.io/co/GCanvas)\n\n* Android  com.taobao.gcanvas:core:1.1.0(publishing)\n\n### GCanvas NPM Package\n* [@gcanvas/core](https://www.npmjs.com/package/@gcanvas/core)   [![npm version](https://badge.fury.io/js/%40gcanvas%2Fcore.svg)](https://www.npmjs.com/package/@gcanvas/core)\n\n## Features\n- Cross-platform, support popular iOS and Android.\n- High performance, accelerate graphic draw by OpenGL ES.\n- Provide JavaScript runtime,  such as [Weex](https://github.com/apache/incubator-weex) and [ReactNative](https://github.com/facebook/react-native/).  convenient to use JavaScript API like HTML canvas.\n- Scalable Architecture, easy to implement a GCanvas bridge by yourself following the guide [Custom Native Bridge](https://alibaba.github.io/GCanvas/docs/Custom%20Bridge.html) .\n- Small size.\n\n## Introduction\n\nSee the  [Introduction to GCanvas](https://alibaba.github.io/GCanvas/docs/Developer's%20Guide.html) for a detailed  introduction to GCanvas.\n\n## Getting Started\n\nWe will continue to maintain the C++ `core` engine. And will no further update and support `Weex`、 `ReactNative` and `JS bridge`.\n\n### Node\nFollow [Node Guide](./node/README.md),  use GCanvas in Node.js.  \n\n### JavaScript\nTry our [Playground](https://alibaba.github.io/GCanvas/playground.html).\nGCanvas has browser-like canvas APIs, so almost all of the APIs are exactly same as HTML5 canvas. At this moment, we have already supported 90% of 2D APIs and 99% of WebGL APIs. You can find out those informations in [2D  APIs](https://alibaba.github.io/GCanvas/docs/Graphics%202D.html) and [WebGL APIs](https://alibaba.github.io/GCanvas/docs/WebGL.html).\n\n## Documentation\nCheck [Documentation](https://alibaba.github.io/GCanvas/docs/Introduction.html) for more information.\n\n## Examples\nWe take [Weex](https://github.com/apache/incubator-weex) as example, code snippet of context 2d using `GCanvas`.\n```javascript\nimport { enable, WeexBridge, Image as GImage } from \"@gcanvas/core\";\n\nvar gcanvas = enable(this.$refs.canvas_holder, {bridge: WeexBridge});\nvar ctx = gcanvas.getContext(\"2d\");\n//rect\nctx.fillStyle = 'red';\nctx.fillRect(0, 0, 100, 100);\n\n//rect\nctx.fillStyle = 'black';\nctx.fillRect(100, 100, 100, 100);\nctx.fillRect(25, 210, 700, 5);\n\n//circle\nctx.arc(450, 200, 100, 0, Math.PI * 2, true);\nctx.fill();\n\nvar image = new GImage();\nimage.src = 'https://gw.alicdn.com/tfs/TB1KwRTlh6I8KJjy0FgXXXXzVXa-225-75.png';\nimage.onload = function(){\n  ctx.drawImage(image, 100, 300);\n};\n```\n\n## Built With\n\n* [Freetype](https://www.freetype.org/) - Used for font rendering on Android\n\n\n## Changelog\n\nNew Changelog record in [CHANGELOG](./docs/Changelog.md) for details.\n\n## Open Issues\nIf you encounter a bug with GCanvas we would like to hear about it. Search the [existing issues]() and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of GCanvas  and OS you’re using. Please include a stack trace and reduced repro case when appropriate, too.\n\n## Contributing\n\nPlease read [CONTRIBUTING](./docs/Contributing.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Authors\n\nGCanvas Open Source Team\n\n## License\n\nThis project is licensed under the Apache [LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2FGCanvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falibaba%2FGCanvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falibaba%2FGCanvas/lists"}