Coder Social home page Coder Social logo

blocky's Introduction

Blocky: Client-side QR codes with <canvas> and CoffeScript!

Author: Zach McArtor
hackazach.net

(C) CopyRight Zach McArtor
Licensed under the MIT license:
http://www.opensource.org/licenses/mit-license.php

v1.0 17/6/2011

Dependencies:
	To use, you will need to include the awesome QR library from Kazuhiko Arasé
	http://www.d-project.com/qrcode/index.html
	The JS library after the 11/5/2011 update is included within this project.

Installation:
	The compiled javascript is included from the associated .coffee file.
	Include this in your page after qrcode.js (Kazuhiko's library)

Usage:

	All you need to do is make a new Blocky!

	<script type ="text/javascript">
		new Blocky('http://hackazach.net' ,'funfun', {cell_size:11, scriptheme:'watermelon'})
	</script>

Constructor Arguments:
	new Blocky( QR_code_message, id_of_container , config_object)

	A <canvas> element is appended to the container.

The config object takes the following values:

	cell_size: the size of the QR cells. Generally just think of it as the size of the QR code. Default 4.
	black: the color to use as 'black' in the QR code. pass as a quoted rgb value like "rgb(1,2,3)"
	white: just like black, only... white.
	error_level: the QR error level to use. Acceptable values: M , H , Q, L. Default H

Color schemes
	There are a couple pre-built color schemes for fun.
	try scheme names watermelon , wedding, arctic or spicy


Have fun!
_Zach






blocky's People

Contributors

zmcartor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

guniorobot

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.