Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Filters extend barryvan.tp.filter.Base. The "frame" method is their primary interaction with the canvas.
There is no implementation distinction between pre- and post-filters. For each frame, the processing order is pre-filters, then performers, then post-filters.
Measures the average framerate of the performance. It does so by storing the time the first frame is rendered, counting the number of times the "frame" function is called, and dividing the frame count by the total time elapsed. The result is then displayed in an HTML element.
element The HTML element into which the FPS should be drawn. Note that the contents of the element will be entirely overwritten every time this value is updated!
Draws a static grid (or rather, grid intersections) to the screen. This can be useful as a source for noise in other filters, or for lining things up during development of a performance.
colour The colour of the dots.
spacing The number of pixels between each dot. Currently, only square grids are supported.
size The size of the rendered intersection.
The Pick filter replaces each pixel in the canvas with a pixel taken from its neighbours (wrapping horizontally). This can make changes on the canvas appear to explode or bubble away.
probability The likelihood that a pixel will be fuzzed.
skip The number of pixels to skip between processed pixels. In other words, if you have pixels A B C, a "skip" value of 2 would process pixels A and C, whilst a "skip" value of 1 would process all three.
fuzz The "distance" at which pixels may be swapped. A fuzz value of 1 means that only the eight surrounding pixels are available; a fuzz value of 2 makes the twenty-two neighbouring pixels candidates, and so on.