Examples
Each example offers links to the different renderers / platforms on which it is available. For instance, the hello static example is available for web, local, and static. The web examples will open in a browser-based editor where they can also be executed while others will link to code snippets.
Basics
Hello static:A first hello world example available for all three renderers.
Hello interactive: A hello world example with minimumn interactivity.
Hello draw: The hello world example from the homepage.
Hello basics: Basics of styling and colors.
Hello stack: Saving (pushing) and loading (popping) styles.
Buffers
Buffer simple: Using simple buffers.
Buffer opaque: Using fast opaque buffers.
Data
Read CSV: Rendering a simple bar chart from a CSV file.
Read JSON: Drawing a simple bar chart from a JSON file.
Write CSV: Generating a CSV file from a sketch.
Write JSON: Generating a JSON file from a sketch.
Dialog
Simple dialogs: Simple dialogs like prompt and alert.
Geo
Geo transform: Drawing with map panning and zooming.
Geo polygon: Drawing a polygon defined by latitude and longitude points.
GeoJSON: Displaying GeoJSON on a map.
Images
Read image: Drawing an image into a sketch.
Write image: Writing a sketch to an image file.
Inputs
Keyboard: Example of taking keyboard input.
Mouse: Example of taking mouse input.
Shapes
Pixels: Drawing individual pixels.
Rectangles: Drawing rectangles and squares.
Ellipses: Drawing ellipses and circles.
Shapes: Drawing complex shapes with lines.
Curves: Drawing complex shapes with bezier curves.
System
Timing: Drawing in response to sketch running time.
Text
Text Fill / Stroke: Styling text different ways.
Text Horiz Align: Aligning text horizontally.
Text Vert Align: Aligning text vertically.
Transformations
Translate: Moving the origin by translating.
Scale: Zooming in and out by scaling.
Rotate: Rotating around the origin.
Combine transforms: Combining multiple transforms together.
Transform stack: Saving (pushing) and loading (popping) transforms.