Sprites Source

The Sprites library is plain JavaScript, one namespace per file. Every file that ships lives in this list, grouped to match the library reference. The file name opens its full source on its own page; the Docs link opens its reference page. The Standards column counts the standards violations a simple check finds in each file; the fundamental reactive helpers are exempt. The Tests column runs each file's tests in the page and shows how many pass, in green when they all pass; the count links to the file's own Testing section, where each test opens to show its source.

Reactive Framework

The reactive framework: values, calculations and two way fields, with the logic, object, array, grid, optional, maths and text helpers built on it.

FileDescriptionDocs
Sprites.jsThe one global object every file fills its own slice of.View
Sprites.Reactive.jsThe two phase reactive core: values, calculations and two way lenses.View
Sprites.Logic.jsBoolean logic over reactive values: Not, And, Or and Equals.View
Sprites.Object.jsReactive helpers over objects: read, construct, field views and copies.View
Sprites.Array.jsReactive helpers over lists: length, item, slice, resize and size binding.View
Sprites.Grid.jsThe Grid namespace and the Tiled block that cuts a large image into fixed tiles.View
Sprites.Grid.Two.jsReactive helpers over a two dimensional grid of cells in row order.View
Sprites.Grid.Three.jsReactive helpers over a three dimensional volume of cells, for voxels.View
Sprites.Optional.jsHelpers for values that may be absent, with a default when one is missing.View
Sprites.Maths.jsArithmetic over reactive values: sums, products and the rest, kept live.View
Sprites.Text.jsString operations over reactive values, for labels and parsed numbers.View
Sprites.Animate.jsTime based drivers: Counter steps a value on an interval, SetAfter writes once after a delay.View
Sprites.Browser.jsThe browser viewport width and height as reactive values.View

User Interface

The user interface framework on Sprites.Reactive: content, layout, buttons, input, a code editor, windows, overlays, DOM, images, scenes and touch.

FileDescriptionDocs
Sprites.Ui.jsThe interface layer over Sprites.Reactive: Root, Enabled and Disabled.View
Sprites.Ui.Content.jsContent parts: a paragraph, a title and a section.View
Sprites.Ui.Layout.jsLayout parts over the stylesheet classes: row, column, grid and stretch.View
Sprites.Ui.Button.jsButton parts whose click runs as a reverse phase lens.View
Sprites.Ui.Input.jsForm controls, each two way bound to a reactive value.View
Sprites.Ui.Code.jsA plain monospace code editor two way bound to a reactive string.View
Sprites.Ui.Window.jsWindows: modal panels and draggable, resizable floating panels.View
Sprites.Ui.Overlay.jsOverlays: content shown above a background at the top of an area.View
Sprites.Ui.Dom.jsDOM builders: elements, attributes, text, classes, styles and events.View
Sprites.Ui.Image.jsImage surfaces for the interface: a Bitmap canvas and a Vector SVG.View
Sprites.Ui.Scene.jsScene surfaces that hold a camera and draw over an image surface.View
Sprites.Ui.Touch.jsPointer input surfaces reporting over, down and position.View
Sprites.Ui.Loading.jsA loading boundary that shows a spinner while a value read inside is pending.View
Sprites.Ui.Scroll.jsScroll regions that clip content and scroll to the rest.View
Sprites.Keyboard.jsThe keyboard as reactive values: a key's pressed state through a shared driver.View

Desktop

The desktop environment: a full screen surface with a dock, hosting the editors and standalone tools as applications in floating windows.

FileDescriptionDocs
Sprites.Desktop.jsThe desktop shell: the grid surface, the dock, and the Application and Window parts.Not documented yet
Sprites.Desktop.Engine.jsThe desktop instance registry: open windows as a reactive array, keyed by media and id.Not documented yet
Sprites.Application.Calculator.jsA scientific and programming calculator built as a reactive stack machine: every key is a handler that composes a new state and Sets it, handling precedence and brackets one press at a time with no expression parser.Not documented yet
Sprites.Application.About.jsA standalone about application: one window of details about the Sprites desktop.Not documented yet
Sprites.Application.Asteroids.jsA standalone application: the asteroids.net game in a resizeable window.Not documented yet

Storage

The storage layer: the user's saved work kept in the browser, one store across every media type.

FileDescriptionDocs
Sprites.Store.jsA generic reactive store over IndexedDB: reads, writes, filters and counts through one driver, live across tabs.View
Sprites.Library.Store.jsThe media library over the store: fresh ids and the blank document envelope.View
Sprites.Library.Store.Meta.jsThe listing half: one light meta row per document, for listings and counts.View
Sprites.Library.Store.Media.jsA piece of media as one whole record, with its meta projection kept in step.View
Sprites.Library.Store.Refs.jsThe reference edges between documents: who uses a target, and what an owner holds.View

Graphics

The shared graphics primitives: colour, shapes on an image surface, a scene projected from three dimensions, and the WebGL2 shader render driver.

FileDescriptionDocs
Sprites.Colour.jsColour values and components: pack, unpack, css, levels, a picker and a palette.View
Sprites.Image.jsThe backend independent image surface context.View
Sprites.Image.Draw.jsThe drawing commands placed inside an image surface.View
Sprites.Scene.jsA small three dimensional engine built on the reactive image model.View
Sprites.Scene.Draw.jsThe drawing commands placed inside a scene.View
Sprites.Shader.jsThe WebGL2 render driver that turns GLSL and inputs into a texture.View

Media

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

Sprite

The sprite editor over an integer pixel grid, with its drawing parts and tools.

FileDescriptionDocs
Sprites.Media.Sprite.jsThe sprite editor over an integer pixel grid, and its model.View
Sprites.Media.Sprite.Canvas.jsThe drawing surface that shows the pixel grid.View
Sprites.Media.Sprite.Draw.jsThe Draw tool: the brush that lays colour on the canvas.View
Sprites.Media.Sprite.File.jsThe File panel: import and export a sprite.View
Sprites.Media.Sprite.Frames.jsThe frames panel: the animation frames and their controls.View
Sprites.Media.Sprite.History.jsThe history panel: undo and redo.View
Sprites.Media.Sprite.Info.jsThe Info window: the mode and size controls.View
Sprites.Media.Sprite.Layers.jsThe layers panel: the stack of layers and their controls.View
Sprites.Media.Sprite.Move.jsThe Move tool: pan and zoom the view over the sprite.View
Sprites.Media.Sprite.Palette.jsThe colour palette window, its picker modals and slot helpers.View
Sprites.Media.Sprite.Select.jsThe Select tool: mark a region to move, rotate or clone.View
Sprites.Media.Sprite.Tool.jsThe tool selector, the Windows buttons and the Tools window.View

Image

The image editor over a high resolution bitmap, with layers, drawing parts and tools.

FileDescriptionDocs
Sprites.Media.Image.jsThe image editor over a high resolution tiled pixel grid, and its model.View
Sprites.Media.Image.Canvas.jsThe canvas view: a backdrop, the pixel surface and the brush cursor.View
Sprites.Media.Image.Cells.jsThe attribute image editor: a one bit mask over ink and paper cells.View
Sprites.Media.Image.Insert.jsThe Insert panel: stamp a saved sprite into the current layer.View
Sprites.Media.Image.Layers.jsThe layers panel: the stack of layers and their controls.View
Sprites.Media.Image.Tool.jsThe image editor's Tools window.View

Shader

The shader editor: a stack of GLSL layers rendered into an image through the WebGL2 driver, with its per-type parameters, code editor and tools.

FileDescriptionDocs
Sprites.Media.Shader.jsThe shader image editor: a stack of GLSL layers, and its model.View
Sprites.Media.Shader.Canvas.jsThe stage that chains the visible layers and draws the result.View
Sprites.Media.Shader.Parameter.jsThe control for one shader parameter.View
Sprites.Media.Shader.Params.jsA list of shader parameters and its Add button.View
Sprites.Media.Shader.Globals.jsThe Globals window: shared code added ahead of every layer.View
Sprites.Media.Shader.Layer.jsThe Layer window: the selected layer's name, code and parameters.View
Sprites.Media.Shader.Layers.jsThe Layers window: the stack of layers and their controls.View
Sprites.Media.Shader.Info.jsThe Info window: the image pixel size and layer count.View
Sprites.Media.Shader.Tool.jsThe shader editor's Tools window.View

Font

The font editor for bitmap glyphs, with its parts and tools.

FileDescriptionDocs
Sprites.Media.Font.jsThe font editor for bitmap glyphs, and its model.View
Sprites.Media.Font.Chars.jsThe characters panel: the glyphs laid out to pick one to edit.View
Sprites.Media.Font.Tool.jsThe font editor's Tools window and its Windows buttons.View

Text

The text screen editor: characters and ink and paper attributes over a grid of cells.

FileDescriptionDocs
Sprites.Media.Text.jsThe text screen editor: characters with ink and paper over a cell grid, and its model.View
Sprites.Media.Text.Tool.jsThe text editor's Tools window and colour palette.View

Map

The map editor for tile maps across the machines that support them.

FileDescriptionDocs
Sprites.Media.Map.jsThe map media: tile indices over a two dimensional grid.View

Sequencer

The tracker style sequencer that drives each platform's native sound channels, with its grid, keyboard, note and effect parts.

FileDescriptionDocs
Sprites.Media.Sequencer.jsThe tracker sequencer editor, its document factory and layout.View
Sprites.Media.Sequencer.Effect.jsThe per cell effects and their editors.View
Sprites.Media.Sequencer.File.jsThe File window: import and export a tune.View
Sprites.Media.Sequencer.Grid.jsThe block table: a column per channel and a row per beat.View
Sprites.Media.Sequencer.Info.jsThe Info window: tempo, beats per bar and bars per block.View
Sprites.Media.Sequencer.Keyboard.jsThe piano keyboard that sets a note into the selected cell.View
Sprites.Media.Sequencer.Note.jsThe Note window: edit the selected cell's note and effects.View
Sprites.Media.Sequencer.Transport.jsThe Transport window: play and stop the tune.View
Sprites.Media.Sequencer.Tune.jsThe tune: the arrangement of block slots and its editor strip.View

Binary

The binary data editor: a raw byte buffer with its editing tools.

FileDescriptionDocs
Sprites.Media.Binary.jsThe binary media: a run of raw bytes, drawn as a hex editor.View
Sprites.Media.Binary.Tool.jsThe binary editor's Tools window: the tool selector and the Windows buttons.View
Sprites.Media.Binary.Tool.Move.jsThe binary editor's Move tool window: the start address and a Reset button.View
Sprites.Media.Binary.Tool.Draw.jsThe binary editor's Draw tool window and its byte and bit palettes.View
Sprites.Media.Binary.Tool.Type.jsThe binary editor's Type tool window: the entry granularity and caret readout.View
Sprites.Media.Binary.Tool.Select.jsThe binary editor's Select tool window: the marked range and a Clear button.View
Sprites.Media.Binary.Tool.View.jsThe binary editor's View panel: the bytes per line and the hex or binary choice.View
Sprites.Media.Binary.Tool.Info.jsThe binary editor's Info panel: the byte length and count.View

Across the media

The shared media list module: the live listing every media page shows, the inline picker a caller fills a selection from, and the windows that wrap them.

FileDescriptionDocs
Sprites.Media.List.jsThe one media list module: the paged Browser, the inline Picker, the shared cells and controls, and the Rename, Delete and Picker windows.View

Platforms

The platform packs, one for each machine, holding its colours, sizes, sprite modes and sound channels.

Commodore 64

The Commodore 64: hardware sprites, a fixed palette, redefinable characters, text and its SID sequencer.

FileDescriptionDocs
Sprites.Platform.C64.jsThe Commodore 64 platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.C64.Sprite.jsThe C64 sprite pack: colour slots, modes and default size.View
Sprites.Platform.C64.Image.jsThe C64 image pack: colour slots, modes and default size.View
Sprites.Platform.C64.Font.jsThe C64 font pack: character sets, slots and modes.View
Sprites.Platform.C64.Text.jsThe C64 text pack: default size, palette and modes.View
Sprites.Platform.C64.Sequencer.jsThe C64 sequencer pack: its SID channels, note range and per channel capabilities.View

BBC Micro

The BBC Micro: its display modes, palette, sprites, images, fonts and sound.

FileDescriptionDocs
Sprites.Platform.BBC.jsThe BBC Micro platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.BBC.Sprite.jsThe BBC sprite pack: colour slots, modes and default size.View
Sprites.Platform.BBC.Image.jsThe BBC image pack: colour slots, modes and default size.View
Sprites.Platform.BBC.Font.jsThe BBC font pack: character sets, slots and modes.View
Sprites.Platform.BBC.Sequencer.jsThe BBC sequencer pack: its sound channels, note range and per channel capabilities.View

ZX Spectrum

The ZX Spectrum: attribute colour cells, sprites, images, fonts, text and beeper sound.

FileDescriptionDocs
Sprites.Platform.Spectrum.jsThe ZX Spectrum platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.Spectrum.Sprite.jsThe Spectrum sprite pack: colour slots, modes and default size.View
Sprites.Platform.Spectrum.Image.jsThe Spectrum image pack: colour slots, modes and default size.View
Sprites.Platform.Spectrum.Font.jsThe Spectrum font pack: character sets, slots and modes.View
Sprites.Platform.Spectrum.Text.jsThe Spectrum text pack: default size, palette and modes.View
Sprites.Platform.Spectrum.Sequencer.jsThe Spectrum sequencer pack: its beeper channels, note range and per channel capabilities.View

Nintendo Entertainment System

The Nintendo Entertainment System: background tiles, sprites, fonts, maps and sound.

FileDescriptionDocs
Sprites.Platform.NES.jsThe NES platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.NES.Sprite.jsThe NES sprite pack: colour slots, modes and default size.View
Sprites.Platform.NES.Font.jsThe NES font pack: character sets, slots and modes.View
Sprites.Platform.NES.Map.jsThe NES map pack: tile configuration.View
Sprites.Platform.NES.Sequencer.jsThe NES sequencer pack: its sound channels, note range and per channel capabilities.View

Super Nintendo

The Super Nintendo: layered tiles, sprites, fonts, maps and sound.

FileDescriptionDocs
Sprites.Platform.SNES.jsThe Super Nintendo platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.SNES.Sprite.jsThe SNES sprite pack: colour slots, modes and default size.View
Sprites.Platform.SNES.Font.jsThe SNES font pack: character sets, slots and modes.View
Sprites.Platform.SNES.Map.jsThe SNES map pack: tile configuration.View
Sprites.Platform.SNES.Sequencer.jsThe SNES sequencer pack: its sound channels, note range and per channel capabilities.View

Game Boy

The Game Boy: four shade tiles, sprites, fonts, maps and sound.

FileDescriptionDocs
Sprites.Platform.GameBoy.jsThe Game Boy platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.GameBoy.Sprite.jsThe Game Boy sprite pack: colour slots, modes and default size.View
Sprites.Platform.GameBoy.Font.jsThe Game Boy font pack: character sets, slots and modes.View
Sprites.Platform.GameBoy.Map.jsThe Game Boy map pack: tile configuration.View
Sprites.Platform.GameBoy.Sequencer.jsThe Game Boy sequencer pack: its sound channels, note range and per channel capabilities.View

Game Boy Color

The Game Boy Color: colour tiles, sprites, fonts and maps.

FileDescriptionDocs
Sprites.Platform.GameBoyColor.jsThe Game Boy Color platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.GameBoyColor.Sprite.jsThe Game Boy Color sprite pack: colour slots, modes and default size.View
Sprites.Platform.GameBoyColor.Font.jsThe Game Boy Color font pack: character sets, slots and modes.View
Sprites.Platform.GameBoyColor.Map.jsThe Game Boy Color map pack: tile configuration.View

Commodore Amiga

The Commodore Amiga: bitplane graphics, sprites, images, fonts and sound.

FileDescriptionDocs
Sprites.Platform.Amiga.jsThe Commodore Amiga platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.Amiga.Sprite.jsThe Amiga sprite pack: colour slots, modes and default size.View
Sprites.Platform.Amiga.Image.jsThe Amiga image pack: colour slots, modes and default size.View
Sprites.Platform.Amiga.Font.jsThe Amiga font pack: character sets, slots and modes.View
Sprites.Platform.Amiga.Sequencer.jsThe Amiga sequencer pack: its sound channels, note range and per channel capabilities.View

Oric

The Oric: attribute colour, sprites, images, fonts, text and sound.

FileDescriptionDocs
Sprites.Platform.Oric.jsThe Oric platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.Oric.Sprite.jsThe Oric sprite pack: colour slots, modes and default size.View
Sprites.Platform.Oric.Image.jsThe Oric image pack: colour slots, modes and default size.View
Sprites.Platform.Oric.Font.jsThe Oric font pack: character sets, slots and modes.View
Sprites.Platform.Oric.Text.jsThe Oric text pack: default size, palette and modes.View
Sprites.Platform.Oric.Sequencer.jsThe Oric sequencer pack: its sound channels, note range and per channel capabilities.View

Teletext

The Teletext: its mosaic fonts and attribute text screens.

FileDescriptionDocs
Sprites.Platform.Teletext.jsThe Teletext platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.Teletext.Font.jsThe Teletext font pack: character sets, slots and modes.View
Sprites.Platform.Teletext.Text.jsThe Teletext text pack: default size, palette and modes.View

VGA

The VGA: 256 colours, sprites, images, fonts and text.

FileDescriptionDocs
Sprites.Platform.VGA.jsThe VGA platform core: name, palette and channel bits, read by its media packs.View
Sprites.Platform.VGA.Sprite.jsThe VGA sprite pack: colour slots, modes and default size.View
Sprites.Platform.VGA.Image.jsThe VGA image pack: colour slots, modes and default size.View
Sprites.Platform.VGA.Font.jsThe VGA font pack: character sets, slots and modes.View
Sprites.Platform.VGA.Text.jsThe VGA text pack: default size, palette and modes.View

PC

The PC: its internal speaker sequencer.

FileDescriptionDocs
Sprites.Platform.PC.Sequencer.jsThe PC sequencer pack: its internal speaker channel, note range and capabilities.View

MIDI

The MIDI: the MIDI output sequencer pack.

FileDescriptionDocs
Sprites.Platform.MIDI.Sequencer.jsThe MIDI sequencer pack: its output channels, note range and per channel capabilities.View

MOD

The MOD: the module tracker sequencer pack.

FileDescriptionDocs
Sprites.Platform.MOD.Sequencer.jsThe MOD sequencer pack: its module voices, note range and per channel capabilities.View