Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harshkhandeparkar/svg-real-renderer
A Real-Time 2D PoC SVG Graph Renderer
https://github.com/harshkhandeparkar/svg-real-renderer
Last synced: 19 days ago
JSON representation
A Real-Time 2D PoC SVG Graph Renderer
- Host: GitHub
- URL: https://github.com/harshkhandeparkar/svg-real-renderer
- Owner: harshkhandeparkar
- License: mit
- Created: 2021-03-01T05:08:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-30T11:52:09.000Z (about 3 years ago)
- Last Synced: 2024-10-10T18:54:45.025Z (about 1 month ago)
- Language: HTML
- Homepage: https://harshkhandeparkar.github.io/svg-real-renderer
- Size: 1.32 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![NPM](https://nodei.co/npm/svg-real-renderer.png)](https://npmjs.org/package/svg-real-renderer)
# SVG Real Renderer
A Real Time 2D Graphical Rendering Engine Made With [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG).### Table of Contents
- [Usage](#usage)
- [Example](https://harshkhandeparkar.github.io/svg-real-renderer)
- [API](#api)
- [License](LICENSE)### 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.```html
<!-- Real Renderer Dist-->
```
R
RealRenderer can be used under the namespace `SVGRealRenderer` from any javascript file that is loaded after the two dist files.```js
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.```js
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](#real-renderers). In the browser, the library exports these under the global namespace variable `SVGRealRenderer`.Read the API [markdown docs](docs/docs.md) or [HTML docs](https://harshkhandeparkar.github.io/svg-real-renderer/example/docs).