# Welcome to the Scrawl-canvas code base

This documentation and demo test suite is for Scrawl-canvas version 8.19.0

### Library purpose

Scrawl-canvas is a JavaScript library for working with the HTML5 `<canvas>` element. The library:

- Defines a set of factory functions for creating a wide range of graphic artefacts and effects, which can be drawn on a `<canvas>` element.
- Includes an adaptable - yet easy to use - protocol for positioning, displaying and animating artefacts and effects across the canvas.
- Adds functionality to make `<canvas>` elements responsive, accessible, and interactive.
- Automatically discovers existing `<canvas>` elements in a web page, and can add new `<canvas>` elements to the web page.

### Links to documentation and tests

- SC Developer Runbook
- SC quick (typedoc) documentation
- SC Inline Documentation
- SC Demo Test suite

### Local server

The local server is supplied by Browser-sync and should be available on localhost port 3000 when running the command `yarn dev`. By default the server should open this page in a new tab in your preferred browser when it starts. Additional browsers can be spun up and pointed in the direction of this page, at which point many user actions in one browser - such as page navigation - will be mirrored in the other browsers. Updating and saving a watched file should hot reload the page across browsers.

The Browser-sync local server comes with a user interface, which can be accessed at localhost port 3001 if the need arises to adapt its configuration while it is running.

### Documentation

We use the following libraries for generating documentation:

- Showdown, for generating the Developer Runbook documentation from `.md` files.
- Docco, for generating the inline documentation from source code and demo `.js` files.
- Typedoc, for generating reference documentation from the `.d.ts` file.