troika VS nanovg

Compare troika vs nanovg and see what are their differences.

troika

A JavaScript framework for interactive 3D and 2D visualizations (by protectwise)

nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations. (by Const-me)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
troika nanovg
3 2
1,514 27
2.2% -
6.3 0.0
24 days ago almost 5 years ago
JavaScript C
MIT License zlib License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

troika

Posts with mentions or reviews of troika. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-09-07.
  • Frameworks/libraries/tools used to create these fancy animated 3d websites
    4 projects | /r/webdev | 7 Sep 2021
    troika (specifically troika-three-text)
  • Fastest possible text updates with or without React
    1 project | /r/reactjs | 28 Mar 2021
    Text is relatively hard to render with WebGL and browsers have a limit, of usually 16 framebuffers that you can use for WebGL contexts. Our charts are written for a WebGL target so we don't want to use up that precious resource for text rendering. In our specific use case we usually have a large degree of control over the browser so we can configure it, but if the target is web we don't have that control. Grabbing a WebGL context also takes a significant period of time, usually a hundred milliseconds or more on my computer, and not displaying data in that time isn't a great user experience.
  • 2D Graphics on Modern GPU (2019)
    10 projects | news.ycombinator.com | 15 Mar 2021
    There's a great WebGL library for doing that on the web using any .ttf, .otf, or .woff font - https://github.com/protectwise/troika/tree/master/packages/t...

nanovg

Posts with mentions or reviews of nanovg. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-08-11.
  • So you want to write a GUI framework
    13 projects | news.ycombinator.com | 11 Aug 2021
    BGFX is a general-purpose 3D graphics engine, not a GUI nor vector graphics framework.

    Nanovg is an awesome vector graphics library, but has limitations. (1) no ClearType, I fixed in my fork: https://github.com/Const-me/nanovg (2) The only way to get AA is hardware MSAA, unfortunately many popular platforms like Raspberry Pi don’t have good enough hardware to do it fast enough. Nanogui is built on top of Nanovg, shares the limitations.

    I agree with the OP that Cairo and Skia are the only viable ones for Linux.

    It’s sad because Windows has Direct2D for decades now (introduced in Vista), and unlike 2006, now in 2021 Linux actually has all the lower-level pieces to implement a comparable equivalent. Here’s a proof of concept: https://github.com/Const-me/Vrmac#vector-graphics-engine

  • 2D Graphics on Modern GPU (2019)
    10 projects | news.ycombinator.com | 15 Mar 2021
    > in your words, that "the quality is not good"

    Oh, you were asking why I said so? Because I have clicked the “notes document” link in the article, the OP used the same tiger test image as me, and that document has a couple of screenshots. And these were the only screenshots I have found. Compare them to screenshots of the same vector image rendered by my library, and you’ll see why I noted about the quality.

    > Vrmacs draws paths by decomposing them into triangles, rendering them with the GPU rasterizer, and antialiasing edges using screen-space derivatives in the fragment shader.

    More or less, but (a) not always, thin lines are different. (b) that’s a high-level overview but there’re many important details on the lower levels. For instance, “screen-space derivatives of what?” is an interesting question, critically important for correct and uniform stroke widths. The meshes I’m building are rotation-agnostic, and to some extent (but not completely) they are resolution-agnostic too.

    > and it is perfectly capable of rendering high-quality small text on the GPU

    It is, but the performance overhead is massive, compared to GPU rasterizer rendering these triangles. For real-world vector graphics that doesn’t have too much stuff per pixel that complexity is not needed because triangle meshes are good enough already.

    > it looks like it occupies a sweet spot similar to NanoVG

    They’re similarities, I have copy-pasted a few text-related things from my fork of NanoVG: https://github.com/Const-me/nanovg/ However, Vrmac delivers much higher quality of 2D vector graphics (VAA, circular arcs, thin strokes, etc), is much faster (meshes are typically reused across frames), and is more compatible (GL support on Windows or OSX is not good, you want D3D or Metal respectively).

What are some alternatives?

When comparing troika and nanovg you can also consider the following projects:

msdfgen - Multi-channel signed distance field generator

vello - An experimental GPU compute-centric 2D renderer.

portfolio-3d - 3D portfolio

bgfx - Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.

libGDX - Desktop/Android/HTML5/iOS Java game development framework

three.js - JavaScript 3D Library.

jeelizFaceFilter - Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).

ds_cinder - An application framework built on Cinder

webxr-handtracking - 👐 WebXR hand tracking examples

nanovg - Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.