All Projects → alibaba → Gcanvas

alibaba / Gcanvas

Licence: apache-2.0
A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎) https://alibaba.github.io/GCanvas

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
Objective-C++
1391 projects

Projects that are alternatives of or similar to Gcanvas

Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-91.09%)
Mutual labels:  graphics, webgl, 2d, canvas
Plutovg
Tiny 2D vector graphics library in C
Stars: ✭ 141 (-91.73%)
Mutual labels:  graphics, 2d, canvas
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+501.29%)
Mutual labels:  opengl, graphics, webgl
Picasso
Picasso is a high quality 2D vector graphic rendering library. It support path , matrix , gradient , pattern , image and truetype font.
Stars: ✭ 205 (-87.98%)
Mutual labels:  graphics, 2d, canvas
Magnum
Lightweight and modular C++11 graphics middleware for games and data visualization
Stars: ✭ 3,728 (+118.65%)
Mutual labels:  opengl, graphics, webgl
Filament
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
Stars: ✭ 13,215 (+675.07%)
Mutual labels:  opengl, graphics, webgl
Mesh.js
A graphics system born for visualization 😘.
Stars: ✭ 156 (-90.85%)
Mutual labels:  graphics, webgl, canvas
Hilo3d
Hilo3d, a WebGL Rendering Engine.
Stars: ✭ 123 (-92.79%)
Mutual labels:  graphics, webgl, canvas
Ofelia
A real-time cross-platform creative coding tool for multimedia development
Stars: ✭ 269 (-84.22%)
Mutual labels:  opengl, graphics, webgl
Webgl Plot
A high-Performance real-time 2D plotting library based on native WebGL
Stars: ✭ 200 (-88.27%)
Mutual labels:  opengl, webgl, 2d
Spritejs
A cross platform high-performance graphics system.
Stars: ✭ 4,712 (+176.36%)
Mutual labels:  webgl, 2d, canvas
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+586.1%)
Mutual labels:  opengl, graphics, webgl
Fe Daily Record
📚前端书籍汇集点 + 每日好文推荐 + 公开课学习资料 + 各种大会资料
Stars: ✭ 94 (-94.49%)
Mutual labels:  webgl, canvas
Mini3d
3D Software Renderer in 700 Lines !!
Stars: ✭ 1,320 (-22.58%)
Mutual labels:  opengl, graphics
Herebedragons
A basic 3D scene implemented with various engines, frameworks or APIs.
Stars: ✭ 1,616 (-5.22%)
Mutual labels:  opengl, webgl
Tinyraycaster
486 lines of C++: old-school FPS in a weekend
Stars: ✭ 1,383 (-18.89%)
Mutual labels:  opengl, graphics
Physics3d
A 3D physics engine
Stars: ✭ 101 (-94.08%)
Mutual labels:  opengl, graphics
Bgrabitmap
📜 BGRABitmap graphics library made with Lazarus (Free Pascal).
Stars: ✭ 112 (-93.43%)
Mutual labels:  opengl, graphics
Knowledge
文档着重构建一个完整的「前端技术架构图谱」,方便 F2E(Front End Engineering又称FEE、F2E) 学习与进阶。
Stars: ✭ 1,620 (-4.99%)
Mutual labels:  webgl, canvas
Crossshader
⚔️ A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.
Stars: ✭ 113 (-93.37%)
Mutual labels:  opengl, webgl

GCanvas

GCanvas 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.

Supported operating systems are Android 4.0+ (API 14) and iOS 8.0+.

Distribution

GCanvas

  • iOS GCanvas CocoaPods Version

  • Android com.taobao.gcanvas:core:1.1.0(publishing)

GCanvas NPM Package

Features

  • Cross-platform, support popular iOS and Android.
  • High performance, accelerate graphic draw by OpenGL ES.
  • Provide JavaScript runtime, such as Weex and ReactNative. convenient to use JavaScript API like HTML canvas.
  • Scalable Architecture, easy to implement a GCanvas bridge by yourself following the guide Custom Native Bridge .
  • Small size.

Introduction

See the Introduction to GCanvas for a detailed introduction to GCanvas.

Getting Started

We will continue to maintain the C++ core engine. And will no further update and support WeexReactNative and JS bridge.

Node

Follow Node Guide, use GCanvas in Node.js.

JavaScript

Try our Playground. GCanvas 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 and WebGL APIs.

Documentation

Check Documentation for more information.

Examples

We take Weex as example, code snippet of context 2d using GCanvas.

import { enable, WeexBridge, Image as GImage } from "@gcanvas/core";

var gcanvas = enable(this.$refs.canvas_holder, {bridge: WeexBridge});
var ctx = gcanvas.getContext("2d");
//rect
ctx.fillStyle = 'red';
ctx.fillRect(0, 0, 100, 100);

//rect
ctx.fillStyle = 'black';
ctx.fillRect(100, 100, 100, 100);
ctx.fillRect(25, 210, 700, 5);

//circle
ctx.arc(450, 200, 100, 0, Math.PI * 2, true);
ctx.fill();

var image = new GImage();
image.src = 'https://gw.alicdn.com/tfs/TB1KwRTlh6I8KJjy0FgXXXXzVXa-225-75.png';
image.onload = function(){
  ctx.drawImage(image, 100, 300);
};

Built With

  • Freetype - Used for font rendering on Android

Changelog

New Changelog record in CHANGELOG for details.

Open Issues

If 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.

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

Authors

GCanvas Open Source Team

License

This project is licensed under the Apache LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].