256art 中文文档教程
256ART
使生成艺术家可以在 NodeJS 环境中轻松访问 256ART 作品中的数据。
npm install --save 256art
const TwoFiveSix = require("256art");
Examples
获取一件的
let json = TwoFiveSix.getJsonFromId(1);
元数据 获取一件的 base64 格式的元数据
let base64 = TwoFiveSix.getBase64JsonFromId(1);
通过将一块中的每种颜色的十六进制值转换为十进制值来获取所有块颜色作为种子
let seedsFromColors = TwoFiveSix.getDecimalFromHexForAllColorsForId(1);
获取一件的所有块颜色(十六进制)
let blockColors = TwoFiveSix.getBlockColorsForId(1);
获取一件的背景颜色(十六进制)
let bgColor = TwoFiveSix.getBackgroundColorForId(1);
获取一件的边框颜色(十六进制)
let borderColor = TwoFiveSix.getBorderColorForId(1);
获取一件的块总数
let totalBlocks = TwoFiveSix.getTotalBlocksForId(1);
256ART
Gives generative artists easy access to data in 256ART pieces in a NodeJS environment.
npm install --save 256art
const TwoFiveSix = require("256art");
Examples
Get metadata for one piece
let json = TwoFiveSix.getJsonFromId(1);
Get metadata in base64 format for one piece
let base64 = TwoFiveSix.getBase64JsonFromId(1);
Get all block colors as seeds by converting hex to decimal value from each color in a piece
let seedsFromColors = TwoFiveSix.getDecimalFromHexForAllColorsForId(1);
Get all block colors for one piece (hex)
let blockColors = TwoFiveSix.getBlockColorsForId(1);
Get background color for one piece (hex)
let bgColor = TwoFiveSix.getBackgroundColorForId(1);
Get border color for one piece (hex)
let borderColor = TwoFiveSix.getBorderColorForId(1);
Get total amount of blocks for one piece
let totalBlocks = TwoFiveSix.getTotalBlocksForId(1);
更多