Giter Club home page Giter Club logo

art-qrcode-min's Introduction

Art-QRCode-min

说明

  • 这版先做一个纯js合成艺术二维码的缩减版,暂时只能通过输入文字生成,后续会实现一个前后端分离的项目,实现更复杂的功能.

  • 目前暂时只设计了三款二维码,后续可能会依次上传,稍后会附上设计规范,可以自行设计上传。  

  • 查看demo请戳:http://www.duhonghui.top/artqrcode/#/

  • 生成代码是基于QRcode.js进行封装的,利用canvas实现艺术图案填充,vue全家桶构建...


素材尺寸以及命名规范

image  

图中单位尺寸为 50px ,黑字为该素材在下面的代码中的命名。  

注:灰色浅底为辅助展示,实际裁剪时并没有灰色底,裁剪图片一律为png格式的透明底。


合成二维码核心代码

 
/**
 * 组件中引入
 * import QRcode from 'core.js';
 * let qrcode = new QRCode.QRCode(DOMElement, {Options配置});
 */   
 
// 组件中引入配置
let qrcode = new QRCode.QRCode(document.getElementById("qrcode"), {
        /**
         * text:二维码的信息
         */
        text: self.text,
        /**
         * width,height 是二维码区域的长宽
         * bgWidth,bgHeight 是整张背景图片的长宽
         * top,left 是二维码距离整图的坐标距离
         */
        width: self.UIscource.position.width,
        height: self.UIscource.position.height,
        bgWidth: self.UIscource.position.bgWidth,
        bgheight: self.UIscource.position.bgHeight,
        top: self.UIscource.position.top,
        left: self.UIscource.position.left,
        /**
         * 对应每种情况的填充图案
         * 切记需要等图片加载完毕(可以使用 promis.all)再执行绘制的代码,否则会报错
         */
        border: self.UIscource.border,
        eye: self.UIscource.eye,
        row4: self.UIscource.row4,
        row3: self.UIscource.row3,
        row2col3:self.UIscource.row2col3,
        row3col2:self.UIscource.row3col2,
        single: self.UIscource.single,
        row2col2: self.UIscource.row2col2,
        corner:self.UIscource.corner
      });

功能

选择二维码样式   输入链接或者文字   点击生成艺术二维码
导出高清图片


待优化

识别图片二维码   海报编辑改字模板
二维码名片设计
. . .


效果展示

界面

image  

生成艺术二维码示例:

image


最后

  • 欢迎issues,wechat👇

image

art-qrcode-min's People

Contributors

252860883 avatar

Watchers

James Cloos avatar  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.