npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

subscapes

v1.0.3

Published

:wrench: Tooling for the [Subscapes](https://artblocks.io/project/53) generative art project by Matt DesLauriers.

Downloads

16

Readme

Subscapes

:wrench: Tooling for the Subscapes generative art project by Matt DesLauriers.

Pictured above: #378, #72, #75, #220, #363, #103

About Subscapes

Subscapes is a generative art project where the core rendering code is immutably secured & hosted on the Ethereum mainnet blockchain. The program accepts a unique hash as a seed, and outputs the corresponding artwork using a determinstic generative algorithm.

A total of 650 unique iterations of this project were minted by collectors on ArtBlocks.io, and will continue to be available for re-sale in the secondary market on OpenSea. These 650 editions make up the entire collection available for tokenized ownership, and no more editions will be minted or sold in the future.

The ethos of ArtBlocks is 1/1 of X, as each minted output is limited and unique among the infinite array of possibilities.

Hacking & Experimentation

I'm releasing some of the code & tools here to encourage printing, hacking, and experimentation with the Subscapes program, for non-commercial explorations within the community and collectors. The code here allows users to programmatically run the software to generate high resolution outputs, as well as render new iterations beyond the 650 ArtBlocks-minted editions.

For example: since the Subscapes code is renderer-agnostic (it can run in browser or Node.js), it could be adapted to different display mediums, galleries, and engines (web frontends, e-ink screens, WebGL, mechanical pen plotters, 3D printing, etc).

CLI Tool

The CLI tool for subscapes allows users to render a specific iteration of Susbcapes from a hash or ArtBlocks mint number. These can be output as PNG, JPG, or SVG format with a specific width and height size.

Installation with Node.js and npm:

npm install subscapes --global

On first run, the tool will fetch the code from Ethereum. Subsequent runs are cached for convenience.

Examples:

# render Subscapes #32 (minted) as 512x512
subscapes -i 32 -w 512

# render an output from a specific hash
subscapes -i 0xd6a58b3f39ac40bc4160bb7153eb1d27f32d0588c29004e19d0a69cfa0d491d8

# render #300 as SVG with a specific filename
subscapes -i 300 --format svg --name 300.svg

# render a purely random Subscapes, beyond the 650 minted set
subscapes

Details:

Usage:
subscapes [options]

Options:
  --id, -i          input hash as 0xXXXX, or mint id number 0..649 (optional)
  --dir, -d         output directory (defaults to cwd)
  --name, -n        file name (defaults to hash)
  --format, -f      file format: png, svg, jpg (default png)
  --resolution, -r  sets the raycast resolution (default 42)
  --width, -w       output width in pixels (default 2048)
  --height, -h      output height in pixels (default 2048)
  --no-log          disables logging
  --no-cache        forces a new fetch from blockchain and disables cache

If only one dimension (width or height) is set, the other dimension will use the same, to produce a square ratio.

Resolution

The algorithm raycasts against the topology to remove lines that are behind peaks/mountain ranges, but to improve this user experience for the online (Live) artwork, I have kept the number of subdivisions low (42). You can increase the resolution (-r flag) to 60-100 during rendering to get higher quality outputs, but the rendering time will also increase exponentially.

subscapes -i 335 -r 80

See #335 before and after, for example:

Programmatic API (Node.js/JavaScript)

Work in progress.

Web/Frontend Tools

Work in progress.

Archival Limited-Edition Signed Prints

I am still considering how best to approach bespoke, archival, and signed prints of Subscapes. This may be suitable for collectors who plan to archive and display/exhibit the minted works long-term, and wish to own an artist-certified physical artefact. Keep an eye on my Twitter or the #subscapes discord channel for details.

Source Code & License

The code in this repository is Open Source MIT, see LICENSE.md for details. This includes a small set of generic math/vector/color/etc utilities used by the Subscapes algorithm in src/.

The resulting PNG/JPG/SVG files produced from the Subscapes algorithm (such as the images that can be downloaded from ArtBlocks) are licensed under CC BY-NC 4.0.

Neither of these licenses covers the code for the Subscapes generative algorithm (which is hosted on the blockchain and not present in this repository). I've chosen not to release this yet code yet, to help maintain my artistic IP over the project and ensure that no third-parties can claim distribution rights over newly tokenized iterations. However, I may decide to publish all of the Subscapes code at a later point, granting a non-commercial license for educational use.