1.0.0 • Published 1 year ago

@sooshisan/hyperglyph-js v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Hyperglyph-js library

Javascript code for prototyping with hyperglyph outputs.

Usage

import { Keypair } from "@solana/web3.js";
import { buildSvg, generate, toEncodedSvg } from "../";

const renderMode = 'dark';

// optionally: define args to generate hyperglyph; defaults are shown below
const args: HyperglyphArgs = {
    dimensions: {
        height: 64,
        width: 64,
    },
    seedLength: 8,
    generatorClass: 0
};

const data = generate(Keypair.generate().publicKey.toBase58(), args);
const svg = buildSvg(data, renderMode, args);

// optional: encode to a base64 data string
const encodedSvg = toEncodedSvg(svg, 'base64');

Getting started

Run the following:

  • Install pacakges yarn
  • Build the code yarn build
  • Run the code yarn start
  • Check output/ folder
1.0.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago