Skip to content
brianchirls edited this page Jan 16, 2012 · 11 revisions

Seriously

A Seriously object stores and manages a network of nodes to be used in a composition and is used to create new nodes. Create an instance by calling the constructor with or without new. As of now, there are no arguments.

var seriously = new Seriously();

or...

var seriously = Seriously();

effect(hook)

Create a new effect node

Parameters:

  • hook (string): identifier of type of effect to create. Throws error if effect is not found.

Returns:

A new Effect object

source(source, options)

Wraps an input source in a Source node object that can be connected to the network.

Parameters:

  • source: Identifies the object to be used as input source. Any of the following types:
    • DOMElement: <canvas>, <img> or <video> DOM element
    • string: CSS query string pointing to a <canvas>, <img> or <video> DOM element.
    • ImageData: An object returned by getImageData from a 2D canvas context
    • Array: An array of pixel components arranged as red, green, blue, alpha. Array length must be height x width x 4. width and height must be specified in options parameter, otherwise throws an error.
  • options: An object containing additional option fields. options is optional.
    • width: width of source image in pixels.
    • height: height of source image in pixels.
    • flip: boolean value specifying whether image should be flipped vertically. default is false Throws an error if source parameter is missing or of unknown type.

Returns:

A new Source object

effects (static)

plugin (static)

removePlugin (static)

Clone this wiki locally