Starting with a sketch
Start quickly with minimal fuss.
Blank sketch (Github Codespaces)
- Uses Typescript
- NPM & bundler for adding additional packages
Blank sketch (Codepen)
-
Create a folder for your sketch, open the folder in VS Code
-
Create a basic HTML file named
index.html
, for example:<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>hello</title><script type="importmap">{ "imports": { "@ixfx/": "https://unpkg.com/@ixfx/" } } </script></head><body><script src="script.js" type="module"></script></body></html>Note the
<script>
tag after the title. This is an import map and important to have. -
Create a Javascript file, saving as
script.js
, for exampleimport * as Random from '@ixfx/random';console.log(`Hello ${Random.float()}`); -
Serve the folder using Five/Live-Server extension in VS Code.