qart.js

Generate artistic QR code. ?

Github星跟踪图

Glance At

https://kciter.github.io/qart.js/

Installation

NPM

$ npm install qartjs

or clone this repository and copy qart.min.js to your project.

CDN

<script src="//cdnjs.cloudflare.com/ajax/libs/qartjs/1.0.2/qart.min.js"></script>

Usage

In the browser

<script src="../dist/qart.min.js"></script>
<script>
  // directly appending canvas to the document
  new QArt({
    value: value,
    imagePath: './example.png',
    filter: filter,
    size: 195
	}).make(document.getElementById('qart'));

	// using callback
	new QArt({
      value: value,
      imagePath: './example.png',
      filter: filter,
      size: 195
  	}).make(function (canvas) {
  	  document.getElementById('qart').appendChild(canvas)
  	});
</script>

With ES6

import QArt from 'qartjs';
const qart = new QArt({
  value: value,
  imagePath: './example.png',
  filter: filter,
  size: 195
});

// directly appending canvas to the document
qart.make(document.getElementById('qart'))

// using callback
qart.make((canvas) => {
  document.getElementById('qart').appendChild(canvas);
});

With React

This is a simple implementation of QArt as React Component. react-qart

With Angular.JS

There is a directive available for using qart.js in Angular.js: angular-qart

With Vue 2.x

There is a directive available for using qart.js in Vue.js 2.x : vue-qart

Options, Field, Type, Description, Default, -----, ----, -----------, -------, value, String, The data of the QR code., Required, imagePath, String, The path of the combined image., Required, filter, String, Define an image filter. threshold or color, threshold, size, Integer, Define an image size in pixels., 195, version, Integer, QRCode version (1 <= version <= 40), 10, background, CSSColor, Implement background if exist, undefinded, fillType, scale_to_fit/fill, Place image type(fill or scale to fit), scale_to_fit

Dependency

Inspire

TODO

  • Server-Side Rendering.
  • CLI Command.

If you like this open source, you can sponsor it. :smile:

Paypal me

LICENSE

GPLv3

主要指标

概览
名称与所有者kciter/qart.js
主编程语言JavaScript
编程语言JavaScript (语言数: 2)
平台
许可证GNU General Public License v3.0
所有者活动
创建于2017-01-25 12:10:14
推送于2023-09-02 10:50:29
最后一次提交2023-06-26 17:35:50
发布数4
最新版本名称1.2.0 (发布于 )
第一版名称1.0.1 (发布于 )
用户参与
星数3.2k
关注者数75
派生数177
提交数93
已启用问题?
问题数24
打开的问题数8
拉请求数15
打开的拉请求数0
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?