Reference for Sketch2DWeb
Renderer for browsers. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Sketch2DWeb
Shape
Sound (future)
Style
System
Text
Transform
Purpose
Renderer which can run inside an HTML document display like a browser.
Snippet
Create a new web sketch three different ways.
sketch_minimum = sketchingpy.Sketch2DWeb(500, 500) sketch_custom_canvas = sketchingpy.Sketch2DWeb(500, 500, 'canvas-id') sketch_custom_loading = sketchingpy.Sketch2DWeb(500, 500, 'canvas-id', 'loading-id')
Parameters
- width: The horizontal size of the sketch in pixels.
- height: The vertical size of the sketch in pixels.
- target: Canvas element ID. Defaults to "sketch-canvas" if not given.
- loading: Loading message element ID. Defaults to "sketch-load-message" if not given.
Availability
Only available in browser.