Skip to content

A lightweight yet powerful cross platform graphics library inspired by Processing

License

Notifications You must be signed in to change notification settings

librepaint/drawlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drawlite

A lightweight (17 KB minified) yet powerful cross platform graphics library inspired by Processing

Drawlite has a JavaScript implementation for drawing graphics in web browsers and a Dart implementation for drawing graphics natively. The Dart implementation relies on my dcanvas library which is a native implementation of HTML Canvas in Dart.

Examples

You can find example usage in demo.html in the javascript directory and demo.dart in the dart directory.

Quick Start Templates

JavaScript

let DL = Drawlite(canvas);
let { size, fill, rect, get } = DL;

size(400, 400);
DL.draw = function () {
    fill(255, 0, 0);
    rect(get.mouseX, get.mouseY, 100, 100);
};

Dart

import 'package:dcanvas/dcanvas.dart' show Canvas;
import '../drawlite/drawlite.dart'
    show Drawlite;
import '../drawlite/dl.dart';

void main() {
    var canvas = Canvas(400, 400);
    var dl = Drawlite(canvas);
    fill = dl.fill;
    rect = dl.rect;
    get = dl.get;
    
    fill(255, 0, 0);
    rect(get.mouseX, get.mouseY, 100, 100);
}

Documentation

View the documentation in the docs.md file.

About

A lightweight yet powerful cross platform graphics library inspired by Processing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published