Giter Site home page Giter Site logo

pearlwang1106 / g Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antvis/g

0.0 1.0 0.0 37.56 MB

A powerful rendering engine implemented with Canvas2D / SVG / WebGL / WebGPU.

Home Page: https://g-next.antv.vision

JavaScript 10.20% TypeScript 79.46% HTML 6.94% GLSL 1.60% PEG.js 1.71% CSS 0.01% Rust 0.07%

g's Introduction

English | 简体中文

G

npm package npm downloads npm package npm downloads Percentage of issues still open

  • A powerful rendering engine for AntV implemented with Canvas2D / SVG / WebGL / WebGPU.

✨ Features

  • Powerful and scalable rendering capability with built-in basic Graphics.
  • Excellent rendering performance and supports visualization scenarios with large amounts of data.
  • Complete simulation of browser DOM events, and no difference from native events.
  • Smooth animation implementation and rich configuration interfaces.
  • While providing Canvas and SVG version of implementation, and both of API basic consistent.

📦 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

<div id="container"></div>
import { Circle, Canvas } from '@antv/g';
import { Renderer as CanvasRenderer } from '@antv/g-canvas';
// or
// import { Renderer as WebGLRenderer } from '@antv/g-webgl';
// import { Renderer as SVGRenderer } from '@antv/g-svg';

// create a canvas
const canvas = new Canvas({
    container: 'container',
    width: 500,
    height: 500,
    renderer: new CanvasRenderer(), // select a renderer
});

// create a circle
const circle = new Circle({
    style: {
        x: 100,
        y: 100,
        r: 50,
        fill: 'red',
        stroke: 'blue',
        lineWidth: 5,
    },
});

// append to canvas
canvas.appendChild(circle);

⌨️ Development

Start previewing site:

$ git clone [email protected]:antvis/g.git
$ cd g
$ yarn install
$ yarn start

API Spec

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

$ http-server -p 9090

Open api.html on localhost:9090/dev-docs/api.html.

Run test cases

Build and run test cases:

$ yarn build
$ yarn test

Contributors


dengfuping


xiaoiver


dxq613


dependabot-preview[bot]


afc163


zhanba


limichange


entronad


hustcc


simaQ


zqlu


Deturium


Yanyan-Wang


elaine1234


visiky


baizn


terence55


budlion


luoxupan


Leannechn

This project follows the git-contributor spec, auto updated at Tue Dec 07 2021 10:00:16 GMT+0800.

g's People

Contributors

dengfuping avatar xiaoiver avatar dxq613 avatar dependabot-preview[bot] avatar afc163 avatar zhanba avatar limichange avatar entronad avatar hustcc avatar simaq avatar lessmost avatar deturium avatar lxfu1 avatar yanyan-wang avatar elaine1234 avatar visiky avatar baizn avatar terence55 avatar budlion avatar luoxupan avatar leannechn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.