Project template repo for generative art projects on the fx(hash) platform

Overview

fx(hash) x thi.ng project template

example project screenshot

About

This template repo provides a compact, ready-to-go scaffolding for generative art projects aimed at the fx(hash) NFT platform/marketplace.

The template evolved over time and has served as basis for some of the author's own NFT projects. The template is aimed at TypeScript (but can be easily adapted to plain JavaScript) and uses Vite as dev & build tool, ensuring an altogether great & speedy workflow with minimal fuzz.

(In the future, I'm aiming to provide an alternative version for more advanced hybrid projects using TypeScript, Zig and WebAssembly...)

Framework agnostic

Even though several packages from the thi.ng/umbrella ecosystem are used to provide various essential overarching functionality, the template is organized in such a way that the main parts are completely framework-agnostic. You should be able to easily plug in your own toolkit of choice, however I cannot guarantee to be able to provide support for this myself (though happy to accept PRs, also in terms of further docs, how-tos, guides etc.)

Example project

A tiny, fully documented throwaway example sketch is included, illustrating the following:

  • Overall project structure & build commands
  • FXhash related setup
  • Static & dynamic configuration and state (re)initialization/handling
  • FXhash PRNG wrapper & utilities
  • Canvas & SVG conversion/export/download
  • 2D geometry creation, transformation & drawing
  • Basic vector algebra example usage

The best way is to dive into the source code and start reading the various detailed comments to get a better overview of the broad concepts used...

thi.ng/umbrella packages used

Note: Most of these packages list here each have a much wider remit than utilized here in this small demo project scaffolding...

Depending on which parts of the template you'll be keeping for your own purposes, some of these packages can be safely removed. Feel free though to check out some of the other 165+ projects in the thi.ng/umbrella monorepo (NOT a framework!)...

Package Role in this template
@thi.ng/adapt-dpi Configure canvas for HDPI displays
@thi.ng/api Useful common & shared type definitions
@thi.ng/date Timestamp formatter for media downloads
@thi.ng/dl-asset Canvas & SVG export/download
@thi.ng/expose Conditionally expose vars during dev only
@thi.ng/geom 2D geometry swiss army knife & SVG conversion
@thi.ng/hiccup-canvas 2D canvas shape drawing
@thi.ng/pixel Canvas & context creation
@thi.ng/random-fxhash fxhash PRNG wrapper & utils
@thi.ng/resolve-map Graphbased config & state initialization
@thi.ng/transducers Iteration & data transformation
@thi.ng/vectors nD Vector algebra

Getting started

Please consult the GitHub documentation for how to get started with template repos. Once you got it cloned locally, proceed as follows:

# git clone ...

cd <path-where-you-cloned-this-tpl>

# download all dependencies (can also use npm)
yarn install

# start dev server & open in browser
yarn start

Building for production

Vite (the build tool used here) wraps Rollup to bundle all sources & referenced assets for production. Furthermore, all unused code will be removed and the template is configured to also minify the included HTML wrapper and CSS stylesheets.

# create production build
yarn build

# same as build, but also creates a ZIP file for FXHash upload
# ZIP file will be placed in /dist subdir
yarn bundle

# preview production build (for local testing)
yarn preview

Please consult the Vite docs for further information and configuration options...

IMPORTANT NOTE: Due to fxhash-website#246 the FXhash sandbox currently doesn't properly deal with ESM module scripts and cannot preview your project. However, the generated ZIP can be tested via the initial stage of the Mint Generative Token wizard on the FXhash website...

Support / feedback

If you find this template useful and would like to financially support my open source work, please consider taking part in the NFT fundraiser or a small donation via GitHub, Patreon, Tezos or, last but not least, via your next fx(hash) mint...

🙏 😍

License

This project is licensed under the MIT License. See LICENSE.txt

© 2022 Karsten Schmidt

You might also like...

Hash.js is a 0.5 KB script that lets you in a super simple way manipulate everything behind # in urls.

Hash.js - URL Hash Manipulation Hash.js is a 0.5 KB script that lets you in a super simple way manipulate everything behind # in urls. Tested in lates

Aug 1, 2022

This repo contains configurations for webpack, webhint, stylelint and eslint, it is a boiler-plate template and a starting point for coming projects.

Project Name Description the project. Built With Major languages Frameworks Technologies used Live Demo (if available) Experience a live Demo 🚀 Getti

Oct 20, 2022

React Gatsby static web tool for generative artists working on token based NFT artwork (ex: Artblocks)

React Gatsby static web tool for generative artists working on token based NFT artwork (ex: Artblocks)

token-art-tools React Gatsby static web tool for generative artists working on token/hash based NFT artwork (ex: Artblocks) https://ctrlshiftmake.gith

Dec 15, 2022

On-chain generative NFT collection

ETH Time ETH Time is a new NFT collection created to explore new ways of generating NFTs on-chain. It is inspired by existing projects such as Zora's

Feb 13, 2022

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file

Welcome to the Generative GIF Engine v2.0.4 đŸ€ [8 minute read] This python and node app generates layered-based gifs to create NFT gif art! It is fast

Jan 2, 2023

Cardinal generator encompasses serverless functions and smart contracts for rendering generative NFTs

Cardinal generator encompasses serverless functions and smart contracts for rendering generative NFTs

Cardinal Generator An open protocol for generative NFTs. Background Cardinal generator encompasses serverless functions and smart contracts for render

Dec 6, 2022

A peculiar little website that uses Eleventy + Netlify + Puppeteer to create generative poster designs

A peculiar little website that uses Eleventy + Netlify + Puppeteer to create generative poster designs

Garden — Generative Jamstack Posters "Garden" is an experiment in building creative, joyful online experiences using core web technologies. đŸ§± Buildin

Jun 13, 2022

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file

Welcome to the Generative Animated Engine v3.0.1 đŸ€ [8 minute read] This repo used to be called jalagar/Generative_Gif_Engine but because it now suppo

May 24, 2022

This is email scheduler made using MERN. This repo contains server code, client repo is linked in readme.

Email Scheduler Client This is an email scheduler server (client in different repository). It is made using node.js/express.js. Overview User can sign

Dec 3, 2022
Owner
thi.ng
Polyglot computational design tools (TypeScript, Clojure, ClojureScript, C)
thi.ng
Get a quick hash that uses the well-liked Bernstein "times 33" hash method and delivers a hex string.

short-hash-ts -> Get a quick hash that uses the well-liked Bernstein "times 33" hash method and delivers a hex string. Installation Install short-hash

Younis Rahman 3 Sep 4, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
This project displays the art collection using the Metropolitan Museum of Art API. For this project we used HTML, CSS, Javascript, Webpack and Jest.

Metropolitan Museum of Art This project displays the art collection using the Metropolitan Museum of Art API. For this project we used HTML, CSS, Java

David Vera Castillo 11 Dec 24, 2022
Build your own generative art NFT collection with 21 lines of JavaScript

Avatar Collection Build your own Generative Art NFT Collection in 1 minute. Quickstart Just run the following to get started: git clone https://github

rarepress 79 Dec 16, 2022
In game dev, generative art, and creative coding, sine is a ubiquitous function that is often used as a spring-like oscillator for a given parameter.

In game dev, generative art, and creative coding, sine is a ubiquitous function that is often used as a spring-like oscillator for a given parameter.

Mark Racette 3 Feb 22, 2022
NFT Art Generator made to create random unique art and their metadeta for NFTS.

Welcome to HashLips ?? All the code in these repos was created and explained by HashLips on the main YouTube channel. To find out more please visit: ?

Haadi Raja 2 Dec 11, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till mÀnniskor pÄ flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
BRIDGE is a collaborative project for fx(hash), conceived by Camille Roux.

BRIDGE collaborative project for fxhash BRIDGE is an experimental project for fxhash. Any artist can contribute. The main rule: draw the tiles at the

Camille Roux 11 Jul 22, 2022
Eth-explorers-extension - Chrome extension to open Ethereum addresses & transaction hash from any page on popular explorers + dashboards

eth-explorers-extension(s) This repository contains two folders with two extensions that work for address and transactions respectively. 1. eth-addres

Apoorv Lathey 71 Jan 6, 2023