processing-1.0.0.1: Web graphic applications with Processing.

Safe HaskellNone

Graphics.Web.Processing.Html

Description

Once created, processing scripts can be included in HTML canvas. To be able to reproduce the animation, you must import the processing.js library, downloadable from http://processingjs.org/download (do not import it from the original link, download it and use your own copy). To import processing.js, use a script tag.

 <script src="processing.js"></script>

See importScript.

Note from the author: I didn't manage to run a processing animation locally, so you may have the same issue. Once I uploaded them to my server, they worked just fine.

Synopsis

Documentation

procCanvasSource

Arguments

:: FilePath

File path to the script.

-> Html 

Create a canvas element which contain a Processing animation. The output is of the following form:

 <canvas data-processing-sources="specified path"></canvas>

importScriptSource

Arguments

:: FilePath

Location of the processing.js script.

-> Html 

Create the following HTML element:

 <script src="specified path"></script>

Use it to import the processing.js script, inside the head tag.

defaultHtmlSource

Arguments

:: FilePath

Where to find the processing.js module.

-> FilePath

File name for the Processing script (with .pde extension).

-> Text

Html title.

-> Html

Html output.

Default template for visualizing Processing scripts in HTML.

writeHtmlSource

Arguments

:: FilePath

Where to find the processing.js module.

-> FilePath

Where to write the Processing script (with .pde extension).

-> Text

Html title.

-> FilePath

Where to write the HTML file (with .html extension).

-> ProcScript

Processing script.

-> IO () 

Write a Processing script and the HTML default template for it to files, using renderFile and defaultHtml.