/artblocks-p5-starter

A collection of tools to kickstart an Art Blocks p5 project

Primary LanguageTypeScriptMIT LicenseMIT

Art Blocks P5 Starter Project

A set of tool configurations to kickstart an Art Blocks project utilizing the p5 library.

  • Defines separate development and staging/production environments
    • Art Blocks production/staging
      • Expects to be provided a token hash as a source of randomness
      • Expects p5 to be provided as a module in the window context
    • Development
      • Provides p5
      • Provides a pseudorandomly generated token hash
  • Produces JS bundles for an Art Blocks project's content and feature calculations

Combines configurations for these tools:

Building

Development

It is useful to have a hot reloading development environment where artists can see the outputs of there work. The webpack.dev.js configuration defines this environment.
Use yarn start to start the development environment.

The development environment injects p5 and pseudorandom number generators.

Production/Staging

Once an artist is ready to submit, they will want to build their project into a Javascript bundle that the Art Blocks systems can process. In a production/staging ArtBlocks environment, p5 will automatically be provided and a token hash will automatically be provided.

yarn build produces a bundle.js file at dist/bundle.js without minification
yarn build-min produces a bundle.js file at dist/bundle.js with minification

yarn build-features produces a calculateFeatures.js file at dist/calculateFeatures.js without minification
yarn build-features-min produces a calculateFeatures.js file at dist/calculateFeatures.js with minification\