harshkhandeparkar / svg-real-renderer

A Real-Time 2D PoC SVG Graph Renderer

Home Page:https://harshkhandeparkar.github.io/svg-real-renderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM

SVG Real Renderer

A Real Time 2D Graphical Rendering Engine Made With SVG.

Table of Contents

Usage

RealRenderer can only be used in the browser through a svg element. The library can be directly used in the browser with the included dist files or can be compiled using a packager like webpack or a framework like react.

Dist Files

The browserified and minified dist files can be found in the /dist directory on github or in the npm package.

Browser Usage

Including the dist for SVG Real Renderer in a script tag.

<script src="path/to/svg-real-renderer-browser.min.js"> <!-- Real Renderer Dist-->

R RealRenderer can be used under the namespace SVGRealRenderer from any javascript file that is loaded after the two dist files.

const renderer = SVGRealRenderer;
const LineGraph = new renderer.LineGraph(options); // For example

Node Usage

svg-real-renderer packages need to be installed via npm or yarn.

const DrawBoard = (new require('svg-real-renderer').RealDrawBoard()).attach(document.getElementById('svg-id'), [400, 500]) // DrawBoard is an example.

NOTE: It works with typescript

API

The library exports some util functions(listed below) as well as some Real Renderers. In the browser, the library exports these under the global namespace variable SVGRealRenderer.

Read the API markdown docs or HTML docs.

About

A Real-Time 2D PoC SVG Graph Renderer

https://harshkhandeparkar.github.io/svg-real-renderer

License:MIT License


Languages

Language:HTML 82.0%Language:TypeScript 9.2%Language:CSS 7.7%Language:JavaScript 1.0%