Animated Example Authoring System

From PAWS Lab
Jump to: navigation, search

Animated Examples can be created using a tool called Jsvee transpiler from ACOS Content Server.

This tool transpiles the given Python code into form that Jsvee understands and can execute. Not all Python language features are supported. Arithmetical operations, assignments, while loops, for loops to iterate a list, functions, lists, dictionaries and simple classes are available. The only built-in functions available are: float, input, int, len, list.append and print. You will get an error if the code contains language features which are not available.

Here is a brief introduction of how to use this tool:

  1. Type some Python code.
  2. Transpile the code by pressing the button below.
  3. Check that the animation works.
  4. Copy the transpiled code in the textbox and save it as JSON file that is available online.
  5. The created animation can be launched with URL such as: http://acos.cs.hut.fi/html/jsvee/jsvee-python-json/transpiler?url=http://www.cs.hut.fi/~ttsirkia/transp/animation.json

In this case, animation.json contains the transpiled code.

You could change "html" in the URL by your specific requirement to support your launching mechanism but then you should be able to add that one extra GET parameter. Another option is to clone the server architecture from GitHub and inject the transpiled code to this file: https://github.com/acos-server/acos-jsvee-python/blob/master/static/JSVEE-content-min.js


Furthermore, we can create annotations for the animated examples using another tool called Annotation editor from ACOS Content Server.