-
Notifications
You must be signed in to change notification settings - Fork 8
creating sketches
In addition to standard code editor features, netnet's editor also has a few extra features aimed at making it easier for beginners and artists to experiment with code, these include realtime editing, friendly error messages, built in references and tidy code. netnet also provides a few different options for saving or sharing your work which fall under two categories, what we call sketches (this page) (quick single page works) and projects (works which include other files/assets and are hosted on GitHub)
In netnet parlance, a "sketch" is a piece of Internet art consisting of only a single HTML file. Of course, this does not mean that sketches can only be written in HTML. Because HTML is a "polyglot" language, you can also use <style>
and <script>
elements to import and/or write CSS and JavaScript code directly into the same HTML file (not to mention other languages like SVG, MathML, GLSL, etc).
There are a few of different ways to "save" and "share" a sketch:
- In the my sketch section of the Functions Menu you'll also find the option to saveSketch() which stores the current state of the sketch locally in your browser so that netnet can "remember" where you left off the next time you return to the site. You can also find that function using the search bar or use the shortcut key CMD+S (on Mac) or CTRL+S (on Windows and Linux).
- You can click downloadCode() in the my sketch section of the Functions Menu in order to download a copy of your sketch as an HTML file to save locally on your computer. Inversely, you can click uploadCode() to open a locally saved HTML file in netnet's editor (like everything in netnet, both of these functions can be found using netnet's Search Bar)
- To share a netnet sketch directly in the studio you can click shareSketch() in the my sketch section of the Functions Menu (or find it in the Search Bar) to ask netnet to generate a URL (link) for your sketch as it appears in that moment. We don't save anything you do on netnet on our servers by default (see the Data Privacy section), to learn more about creating and sharing annotated sketchs and code demos/examples refer to our Code Examples documentation.