🧪 Version 0.3.1 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for Sketch2D

Automatic backend selection renderer. This is part of the reference section.

Purpose

Renderer which tries to determine the right "backend" based on the environment.

Snippet

Create a new sketch three different ways.
sketch_minimum = sketchingpy.Sketch2D(500, 500)
sketch_with_target = sketchingpy.Sketch2D(500, 500, 'example')
sketch_with_load = sketchingpy.Sketch2D(500, 500, 'example', 'loading')

Parameters

  • width: The horizontal size of the sketch in pixels.
  • height: The vertical size of the sketch in pixels.
  • target: Interpreted as a title for app (desktop / pygame) and interpreted as the canvas ID for web. Ignored for static renderer.
  • loading: Interpreted as the element ID of the loading indicator or message for web. Ignored on others.

Availability

Available for all platforms.

See also