Giter Club home page Giter Club logo

herocards's Introduction

Note: This project creates custom character cards(like Bang!) based on users' input. It's optimized for Chinese characters, and won't work for western languages out of box. (Might work for Japanese and Korean.) Therefore only Chinese instruction is provided here.

Please let me know if you want other language support.

英雄卡牌生成器

利用HTML+CSS+NodeJS+PhantomJS生成三国杀风格的人物卡牌。

上图中的头像经prisma处理,该项目不包含图片滤镜功能。如果有免费开源滤镜推荐,可以自己集成哦~

使用说明

npm install
node automation.js

把图片和描述人物的JSON文件放到./data/中,图片名字必须与JSON文件中的id相同。可接受图片格式为

  • png/PNG
  • jpg/jpeg/JPG/JPEG

例子

./data/中有zhangsanfeng.jsonzhangsanfeng.jpg。 其中JSON文件内容如下:

{
  "id": "zhangsanfeng",
  "clan": "武当",
  "blood_number": "4",
  "nickname": "一代宗师",
  "name": "张三丰",
  "skills_group": [
    {
      "title": "突袭",
      "description": "摸牌阶段,可以放弃摸牌,然后从至多两名(至少一名)角色的手牌里各抽取一张牌。"
    },
    {
      "title": "铁骑",
      "description": "当使用【杀】指定一名角色为目标后,可以进行判定,若结果为红色,此【杀】不可被闪避。"
    }
  ]
}

Note: skills_group可以省略,详情参考issue #1

FAQ

Q: 会制作一个GUI方便大家使用吗? A: 欢迎PR。

Q: 中文字体能够商用么? A: 可以。

Q: 可以修改主题吗? A: 可以在templates文件夹中建立自己的html template。

打印效果

WechatIMG1.jpg

License

MIT @CosmoX

herocards's People

Contributors

hackjutsu avatar

Watchers

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