23 Star 228 Fork 41

Yami / cardjs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
yami 提交于 2022-02-12 19:53 . feat: node和浏览器端分开打包

ygo-card

中文

This is a javascript SDK for rendering YU-GI-OH card. Import ygo-card in your website, you can easily paint the standard YU-GI-OH cards!

DOCUMENT


Usage

$ yarn add ygo-card

# or

$ npm i ygo-card -D --save
import { Card } from 'ygo-card';

const canvas = document.getElementById('card');
const data = {
  name: 'Ghost Ogre & Snow Rabbit',
  _id: '59438930',
  type: 'monster',
  type2: 'effect',
  type3: 'tuner',
  attribute: 'light',
  level: 3,
  race: 'Psychic',
  desc: 'When a monster on the field activates its effect, or when a Spell/Trap that is already face-up on the field activates its effect (Quick Effect): You can send this card from your hand or field to the GY; destroy that card on the field. You can only use this effect of "Ghost Ogre & Snow Rabbit" once per turn',
  attack: 0,
  defend: 1800,
};

const card = new Card({ data, canvas, moldPath: './dist/mold'});
card.render();

Document

DOCUMENT


DEMO

🔗 DIY ONLINE #yami

🔗 Render Deck PDF #msk86


JavaScript
1
https://gitee.com/ymssx/cardjs.git
git@gitee.com:ymssx/cardjs.git
ymssx
cardjs
cardjs
master

搜索帮助