GithubHelp home page GithubHelp logo

graphv's Introduction

Graphv

Overview

Port of the NanoVG C library to (mostly) pure OCaml. This library is still a work in progress, the documentation is not complete and there could be more examples. Some context flags are also not passed down to the backend renderer yet.

Docs

Docs can be found here. They are still a work in progress.

Playground

A client-side web playground can be found here. The compilation takes ~5s the first time, then it should be ~1-2s for recompiles.

Demo

A live web demo can be found here.

Performance varies quite a lot between browsers, Chrome tends to be the fastest. The demo supports mouse and touch events. Clicking/tapping will zoom the top-left widget, hovering the text will highlight rows, and two fingers on mobile will allow zooming/panning. Dragging a single finger on mobile will make the eyes follow the finger.

Screenshots

Screenshot of native GLES2 demo Screenshot of chrome web demo

Performance

Below is a table of eye-ball measurements of frame times across platforms compared with the native C implementation of NanoVG. All times are in millseconds (ms). Measurements were taken on a MacBook Pro Late 2013 laptop. The program being tested is the one shown in the screenshots above.

Platform OCaml NanoVG (GLES2) NanoVG JS
Linux Native 1.05 +/- 0.05 1.00 +/- 0.05 N/A
Linux Chrome 5.50 +/- 2 N/A 5.50 +/- 2
Linux Firefox 12.00 +/ 5 N/A 8.00 +/- 2

Licenses

Project is licensed under MIT. Fonts used in examples:

  • Roboto licensed under Apache license
  • Entypo licensed under CC BY-SA 4.0.
  • Noto Emoji licensed under SIL Open Font License, Version 1.1

graphv's People

Contributors

wlitwin avatar

Stargazers

Kevin avatar Brendan Zabarauskas avatar Stéphane Legrand avatar Kurt Snieckus avatar Second Datke avatar Bikal Lem avatar april avatar Andrey Popp avatar Ozan avatar Rizo I avatar Abigael avatar Amber Lee avatar ejmg avatar Evgeny avatar Maddison Hellstrom avatar jinho park avatar Hyeseong Kim avatar David Sancho avatar Sora Morimoto avatar Julien Sagot avatar Josh Lindsay avatar  avatar Lîm Tsú-thuàn avatar Alexey Nikolaev avatar Seb Mondet avatar Hezekiah M. Carty avatar Marcello Seri avatar Mika Illouz avatar

Watchers

James Cloos avatar  avatar Kurt Snieckus avatar Marcello Seri 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.