Gathering detailed insights and metrics for @antv/g-plugin-css-select
Gathering detailed insights and metrics for @antv/g-plugin-css-select
Gathering detailed insights and metrics for @antv/g-plugin-css-select
Gathering detailed insights and metrics for @antv/g-plugin-css-select
💥 A flexible rendering engine for visualization.
npm install @antv/g-plugin-css-select
@antv/g@6.1.8
Published on 15 Nov 2024
@antv/g@6.1.4
Published on 01 Nov 2024
@antv/g-plugin-canvas-picker@2.0.11
Published on 14 Sept 2024
@antv/g-lite@2.0.9
Published on 30 Aug 2024
@antv/g-plugin-device-renderer@2.0.13
Published on 22 Aug 2024
@antv/react-g@2.0.13
Published on 22 Aug 2024
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,086 Stars
1,058 Commits
203 Forks
55 Watching
13 Branches
72 Contributors
Updated on 27 Nov 2024
Minified
Minified + Gzipped
TypeScript (63.33%)
JavaScript (30.45%)
HTML (4.54%)
GLSL (1.65%)
CSS (0.02%)
Cumulative downloads
Total Downloads
Last day
350%
9
Compared to previous day
Last week
-52.6%
139
Compared to previous week
Last month
51.3%
1,436
Compared to previous month
Last year
-51.7%
9,913
Compared to previous year
4
1
English | 简体中文
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.
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:
1# Install Core 2$ npm install @antv/g --save 3# Canvas Renderer 4$ npm install @antv/g-canvas --save 5# SVG Renderer 6$ npm install @antv/g-svg --save 7# WebGL Renderer 8$ npm install @antv/g-webgl --save
1<div id="container"></div>
1import { Circle, Canvas, CanvasEvent } from '@antv/g';
2import { Renderer as CanvasRenderer } from '@antv/g-canvas';
3// or
4// import { Renderer as WebGLRenderer } from '@antv/g-webgl';
5// import { Renderer as SVGRenderer } from '@antv/g-svg';
6
7// create a canvas
8const canvas = new Canvas({
9 container: 'container',
10 width: 500,
11 height: 500,
12 renderer: new CanvasRenderer(), // select a renderer
13});
14
15// create a circle
16const circle = new Circle({
17 style: {
18 cx: 100,
19 cy: 100,
20 r: 50,
21 fill: 'red',
22 stroke: 'blue',
23 lineWidth: 5,
24 },
25});
26
27canvas.addEventListener(CanvasEvent.READY, function () {
28 // append to canvas
29 canvas.appendChild(circle);
30
31 // add listener for `click` event
32 circle.addEventListener('click', function () {
33 this.style.fill = 'green';
34 });
35});
Start previewing demos:
1git clone git@github.com:antvis/g.git 2cd g 3pnpm install 4pnpm build 5pnpm dev
Start a dev-server on root dir, eg. http-server
:
1http-server -p 9090
Open api.html on localhost:9090/spec/api.html
.
Build and run test cases:
1pnpm build 2pnpm test
Preview our dev demos:
1pnpm build 2pnpm dev
This project follows the git-contributor spec, auto updated at Wed Jun 21 2023 13:21:24 GMT+0800
.
No vulnerabilities found.
No security vulnerabilities found.