API Documentation

This document contains the API (Application Programming Interface) documentation for Pyjsdl library in the Pyjsdl-ts package. Documentation for the Python objects defined by the project is divided into separate pages for each package, module, and class. The API documentation also includes two pages containing information about the project as a whole: a trees page, and an index page.

Pyjsdl module is modelled on Pygame/SDL commands that wraps JavaScript functionality including HTML5 canvas. The module permits scripts coded in Python/Pygame to compile to JavaScript using the Transcrypt compiler, allowing deployment of JavaScript applications without extensive editing of the script. To use the Pyjsdl module, place the pyjsdl folder in the script folder or on its path. Import pyjsdl into the Python script, or use the statement 'import pyjsdl as pygame' to maintain the Pygame commands. Use the statement 'pyjsdl.setup(run, images)' to pass 'run' function to browser that will be executed in a time-based manner and 'images' list to preload images.