The netnet-standard-library.js nn.min.js is a browser-based JavaScript library designed to aid creative coders working on internet art and web design projects. It serves as the core utility library for netnet.studio, functioning both as a tool-kit for creating interactive and generative work within the platform and as a tool for building netnet.studio itself. The library is intentionally approachable for beginners, featuring helpful error messages and friendly documentation, yet expressive enough to support complex creative work.
Add a single <script> tag to your HTML, there's no build step, no package
manager, no dependencies. The global nn object is then available everywhere
on the page.
<script src="https://cdn.jsdelivr.net/gh/netizenorg/netnet-standard-library@1.0.1/build/nn.min.js"></script>
⚠ NOTE: This is the original pre-stable version of the library. Its API is a little bit different from what's documented here, if you're starting a new project, use 1.0.1 instead. This URL is provided for anyone with existing sketches built on the older version.
Here's a basic example on netnet.studio.
There are many amazing creative coding libraries that extend the capabilities of the Web's creative APIs, often providing frameworks for expressing higher-level concepts, like how A-Frame's Entity-Component-System adds game design principles to WebGL and WebXR, or how Tone.js brings music synthesis and DAW (Digital Audio Workstation) concepts to the Web Audio API. While the nn library can be used on its own, it's really designed to work alongside these other frameworks. For example, you could use D3.js to generate data visualizations, then apply nn's color theory methods to ensure the chart colors follow harmonious color schemes and meet WCAG AA accessibility standards. Similarly, you could use nn's music theory utilities to generate scales and chords, then pass them to Tone.js for playback. You can see this in action in our demos gallery.
Below you'll find introductions to the basic concepts and patterns in the library. The full API (all of the properties and methods inside of the global nn object) is documented with explanations and examples in the docs page.
↓