Skip to content

游戏王 ​

从 yugioh-card 导入 YugiohCard。各字段可通过构造选项的 data 或 setData() 提供。

通常怪兽

示例数据 ​

json
{
  "language": "sc",
  "name": "青眼白龙",
  "cardLayout": "monster",
  "monsterFrame": "normal",
  "attribute": "light",
  "level": 8,
  "monsterTypeLine": "龙族/通常",
  "atk": 3000,
  "def": 2500,
  "cardText": "以高攻击力著称的传说之龙。任何对手都能将之粉碎,其破坏力不可估量。"
}

参数 ​

字段类型默认值说明与可选值
languageenum'sc'sc 简体中文、tc 繁体中文、jp 日文、kr 韩文、en 英文、astral 星光界文
textStylePresetenum''字体与文字排版预设。'' 使用语言默认样式,custom1 和 custom2 使用对应的自定义预设
namestring''卡名
nameColorstring''卡名颜色,空字符串用默认色
nameTextAlignenum'left'left 左对齐、center 居中、right 右对齐
applyNameGradientbooleanfalse启用卡名渐变
nameGradientColor1string'#999999'卡名渐变起始色
nameGradientColor2string'#ffffff'卡名渐变结束色
cardLayoutenum'monster'monster 怪兽、spell 魔法、trap 陷阱、pendulum 灵摆
attributeenum'dark'怪兽属性可选 dark 暗、light 光、earth 地、water 水、fire 炎、wind 风、divine 神、'' 隐藏属性
spellTrapIconenum'''' 无图标、equip 装备、field 场地、quick-play 速攻、ritual 仪式、continuous 永续、counter 反击
artworkstring''卡图 URL 或本地绝对路径
monsterFrameenum'normal'怪兽卡框可选 normal 通常、effect 效果、ritual 仪式、fusion 融合、synchro 同步、xyz 超量、link 连接、token 衍生物
pendulumFrameenum'normal-pendulum'灵摆版式的卡框可选 normal-pendulum 通常灵摆、effect-pendulum 效果灵摆、ritual-pendulum 仪式灵摆、fusion-pendulum 融合灵摆、synchro-pendulum 同步灵摆、xyz-pendulum 超量灵摆
levelnumber0怪兽等级
ranknumber0超量怪兽的阶级
pendulumScalenumber0灵摆刻度,两侧共用
pendulumEffectstring''灵摆效果文本
monsterTypeLinestring''怪兽的种族与类型行
showBattleStatsbooleantrue显示 ATK / DEF 或 ATK / LINK 栏的分隔线、标签和数值
atknumber0攻击力。-1 显示 ?,-2 显示 ∞
defnumber0守备力。-1 显示 ?,-2 显示 ∞
linkArrowsnumber[][]连接标记位置
cardTextstring''卡片正文,\n 分段
compressCardTextSegmentsnumber[][]指定段各压成一行,段号从 1 开始
cardTextAlignenum'justify'left 左对齐、center 居中、right 右对齐、justify 两端对齐
bodyTextFontSizeScalenumber1卡片正文、灵摆效果文本及其注音的字号倍率
bodyTextStrokeWidthnumber0卡片正文、灵摆效果文本、怪兽种族与类型行及其注音的描边宽度
cardNumberstring''收录编号
passwordstring''卡片密码,字符串保留前导零
copyrightLanguageenum'''' 隐藏版权标记、sc 简体中文、jp 日文、en 英文
cornerMarkenum'''' 无角标、laser1 全息纹样 1、laser2 全息纹样 2、laser3 全息纹样 3、laser4 纯色角标
rarityenum'''' 默认外观、dt DUEL TERMINAL 平行闪、ur 金闪稀有、gr 黄金稀有、hr 全息稀有、ser 银碎稀有、gser 黄金碎闪、pser 镜碎稀有
show20thAnniversaryMarkbooleanfalse显示 20 周年标记
roundCornersbooleantrue使用圆角
renderScalenumber1卡片原始尺寸的倍率

1 至 8 依次为上、右上、右、右下、下、左下、左、左上。LINK 数值等于有效方向去重后的数量,[1, 4, 6, 6] 显示 LINK-3。