Coder Social home page Coder Social logo

isgasho / contrast_renderer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lichtso/contrast_renderer

0.0 0.0 0.0 758 KB

Contrast is a web-gpu based 2D render engine written in Rust.

Home Page: https://lichtso.github.io/contrast_renderer/

License: MIT License

Rust 100.00%

contrast_renderer's Introduction

actions Docs crates.io

Contrast Renderer

Contrast is a web-gpu based 2D renderer written in Rust. It renders planar vector graphics and can easily be integrated with other forward-rendering code. Filling uses implicit curves and is resolution-independent, while stroking uses parametric curves and is approximated via polygon tesselation. This way you can have non-diegetic, diegetic and spacial GUI elements on any flat plane:

  • As classic 2D menu overlay on top of the 3D scene.
  • As HUD fixed relative to the camera movement but occluded by the 3D scene.
  • As decals on walls or holograms hovering in the 3D scene.

To get started, checkout the showcase example.

Feature Roadmap

✓ Supported and implemented
◯ Rudimentary support
✗ Planned support, not implemented
  • Rendering
    • Anti Aliasing ◯
      • MSAA ✓
    • Custom (User Defined) Shaders ✓
    • Instancing ✓
    • Depth Test ✗
  • Filling
    • Paths
      • Polygons ✓
      • Bezier Curves
        • Integral (Normal)
          • Quadratic ✓
          • Cubic ✓
        • Rational (Weighted)
          • Quadratic ✓
          • Cubic ✓
    • Winding Fill Rules ✓
    • Nestable Clipping ✓
    • Nestable Group Opacity ✓
    • Custom (User Defined) Blending ✓
  • Stroking
    • Paths
      • Polygons ✓
      • Bezier Curves
        • Approximation
          • Uniformly Spaced Parameters ✓
          • Uniform Tangent Angle ✓
          • Uniform Arc Length ✗
        • Integral (Normal)
          • Quadratic ✓
          • Cubic ✓
        • Rational (Weighted)
          • Quadratic ✓
          • Cubic ✓
    • Stroke Width ✓
    • Stroke Offset ◯
    • Closed / Open ✓
    • Line Joins
      • (Clipped) Miter ✓
      • Bevel ✓
      • Round ✓
    • Line Caps (Square, Round, Out, In, Right, Left, Butt) ✓
    • Dashing
      • Phase Translation ✓
      • Repeating Gap Intervals ✓
      • Dynamically Adjustable (for Animations) ✓
  • Path Constructors
    • Polygon ✓
    • Bezier Curves
      • Integral (Normal)
        • Quadratic ✓
        • Cubic ✓
      • Rational (Weighted)
        • Quadratic ✓
        • Cubic ✓
    • Rect ✓
    • Rounded Rect ✓
    • Ellipse ✓
    • Circle ✓
    • Circle Arc ✓
    • [Optional] Font (TTF)
      • Glyph ✓
      • Text ◯
  • Graphical User Interface ✗

Dependencies

Dependencies of the Library

Dependencies of the Examples

contrast_renderer's People

Contributors

lichtso 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.