Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

G

> 编程语言
Open source

A flexible rendering engine for visualization.

1.2K stars0 likes0 views
WebsiteGitHub

About

A flexible rendering engine for visualization.

English | 简体中文

G

As the underlying rendering engine of AntV, G is dedicated to provide consistent and high performance 2D / 3D graphics rendering capabilities for upper layer products, adapting all underlying rendering APIs (Canvas2D / SVG / WebGL / WebGPU / CanvasKit / Node.js) on the web side. In particular, it provides GPGPU support for algorithms suitable for parallel computing in graph scenarios.

✨ Features

Easy-to-use API。The graphics and event system is compatible with DOM Element & Event API, and the animation system is compatible with Web Animations API, which can be adapted to the existing ecosystem of Web side such as D3, Hammer.js gesture library, etc. at a very low cost.

Support multiple rendering environments。Support Canvas2D / SVG / WebGL / WebGPU / CanvasKit and runtime switching, and also server-side rendering.

High performance rendering and computing。WebGPU-based GPGPU support for parallelizable algorithms. webgpu-graph is a library of graph analysis algorithms using GPU acceleration.

Extensible plug-in mechanism and rich set of plug-ins:

  • Rendering Related
    • canvas-renderer Rendering 2D graphics based on Canvas2D.
    • svg-renderer Rendering 2D graphics based on SVG.
    • g-plugin-device-renderer Rendering 2D graphics based on GPUDevice.
    • html-renderer Rendering DOM with HTML.
    • g-plugin-3d Extended 3D capabilities.
    • g-plugin-rough-canvas-renderer Perform hand-drawn style rendering with rough.js and Canvs2D.
    • g-plugin-rough-svg-renderer Perform hand-drawn style rendering with rough.js and SVG.
    • canvaskit-renderer Rendering 2D graphics based on Skia.
  • Picking
    • canvas-picker Do picking with Canvas2D and mathematical calculations.
    • svg-picker Do picking with SVG and DOM API.
  • Interaction
    • dom-interaction Binds event listeners with DOM API.
    • g-plugin-control Provides camera interaction for 3D scenes.
    • g-plugin-dragndrop Provides Drag 'n' Drop based on PointerEvents.
  • Physics Engine
    • g-plugin-box2d Based on Box2D.
    • g-plugin-matterjs Based on matter.js.
    • g-plugin-physx Based on PhysX.
  • Layout Engine
    • g-plugin-yoga Provides Flex layout capabilities based on Yoga.
  • GPGPU
    • g-plugin-gpgpu Provides GPGPU capabilities based on WebGPU.
  • CSS Selector
    • g-plugin-css-select Supports for retrieval in the scene graph using CSS selectors.
  • A11y
    • g-plugin-a11y Provides accessibility features.

Install

# Install Core
$ npm install @antv/g --save
# Canvas Renderer
$ npm install @antv/g-canvas --save
# SVG Renderer
$ npm install @antv/g-svg --save
# WebGL Renderer
$ npm install @antv/g-webgl --save

Usage

…

⌨️ Development

Start previewing demos:

git clone [email protected]:antvis/g.git
cd g
pnpm install
pnpm build
pnpm dev

API Spec

Start a dev-server on root dir, eg. http-server:

http-server -p 9090

Open api.html on localhost:9090/spec/api.html.

Run test cases

Build and run test cases:

pnpm build
pnpm test

Run demos

Preview our dev demos:

pnpm build
pnpm dev

Inspired by

  • Sprite.js
  • Pixi.js
  • PlayCanvas
  • WebKit

Contributors

| dengfuping | xiaoiver | dxq613 | dependabot-preview[bot] | zhanba | afc163

| | :-: | :-: | :-: | :-: | :-: | :-: | | limichange | entronad | hustcc | tangying1027 | zengyue | simaQ | | lessmost | visiky | lxfu1 | ICMI | Deturium | Yanyan-Wang | | yiiiiiiqianyao | moayuisuda | elaine1234 | mxz96102 | DrugsZ | baizn | | terence55 | tyr1dev | budlion | luoxupan | ikxin | Leannechn |

dev-itsheng

This project follows the git-contributor spec, auto updated at Wed Jun 21 2023 13:21:24 GMT+0800.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript2d-graphicsantvantviscanvas

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言