GithubHelp home page GithubHelp logo

bastireiss / graffiti-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from speranskydanil/graffiti-js

0.0 1.0 0.0 1.27 MB

graffiti-js is a JavaScript library which uses canvas for drawing.

License: Other

CSS 8.52% JavaScript 91.48%

graffiti-js's Introduction

graffiti-js

graffiti-js is a JavaScript library which uses canvas for drawing. It consists of two parts: core and example of it's usage.

Graffiti-Core

Graffiti-Core is a base for graffiti application. It provides drawing and JavaScript API.

<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="js/graffiti-core.js"></script>

<div id="graffiti"></div>
// Initialization

gc = new GraffitiCore({
  selector: '#graffiti',

  width: 600,
  height: 300,

  brush: {
    width: 40,
    color: 'rgba(200, 200, 50, 0.75)'
  }
});

// API

gc.prev();
gc.next();
gc.clear();
alert(gc.data());
gc.setBrush({ 
  width: 40, 
  color: 'rgba(200, 200, 50, 0.75)'
});

screen

Graffiti-App

Graffiti-App is an example of using the core.

<link rel="stylesheet" href="css/graffiti-app.css">

<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="js/graffiti-core.js"></script>
<script src="js/graffiti-app.js"></script>

<div class="ga"></div>
new GraffitiApp({
  selector: '.ga',

  width: 600,
  height: 300,

  brush: {
    width: 40,
    color: 'rgba(200, 200, 50, 0.75)'
  }
});

screen

Author (Speransky Danil): Personal Page | LinkedIn | GitHub | StackOverflow

graffiti-js's People

Contributors

speranskydanil avatar

Watchers

 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.