BaGL.dart: Basic Graphics Library for Dart.

WIP: expect changes to public interfaces, missing features and bugs. Please feel free to open issues on missing functionality and changes to public interfaces.

BaGL is a low-level abstraction on top of WebGL. It aims to provide a simpler, safer and more declarative drawing alternative to plain WebGL. BaGL was inspired by Glium and Elm WebGL.

Usage

Examples

Some basic examples are available in the example folder:

  • Triangle: the "hello world" of the graphics world, drawing a single triangle.

  • Animated triangle: demonstrates an animation loop with a triangle whose size oscillates.

  • Textured triangle: demonstrates texturing with a 2D texture from a separate png file.

  • Cube: demonstrates drawing a 3D mesh.

  • Animated Cube: demonstrates an animation loop with a 3D mesh.

  • Textured Cube: demonstrates texturing a 3D mesh with a 2D texture from a separate png file.

Documentation

API documentation is available here.

Libraries

bagl

BaGL: Basic Graphics Library for dart.

geometry_primitives

Primitives for describing vertex geometry.

index_geometry

Data structures for describing geometry with vertex data and index data.

math

Math helpers and data structures for 2D and 3D graphics.

matrix_list

Matrix lists as typed data views on byte buffers.

rendering

Data structures for rendering and customizing the rendering pipeline.

texture

Data structures for texturing.

vertex

Defines the basic vertex data structure.

vertex_data

Data structures for viewing and managing buffered vertex data.