Sprites JavaScript Library

Documentation for the Sprites JavaScript library. This provides all the functionality for creating the interactive tools on this site.

Introduction

Sprites uses a small custom reactive system, which allows for clean, composable components with two way data binding as the core mechanism for state management and event handling.

Contents

Prerequisites

What to know before you read the modules: the coding standards, how the reactive framework works, and how the editors are built.

Reactive Framework

The reactive core: values, calculations, two-way fields, reactive structure, and named context. With the logic, data, optional, maths and text helpers built on it.

User Interface

The user interface framework on top of Sprites.Reactive: the core, plus content, layout, button, input, window, overlay, DOM, image and touch parts.

Storage

The stored library: opening, listing, naming, duplicating and removing saved documents.

Graphics

The shared drawing primitives: colour, shapes on an image surface, and a scene projected from three dimensions.

Media

The editable resource types, one kind of art per category, each with its own editor and tools.