Skip to content
cjcliffe edited this page Oct 15, 2011 · 4 revisions

CubicVR.PJSTexture

The PJSTexture class provides an adapter for Processing.js sketches making it possible to use PJS for generating or animating textures. A PJSTexture can be used in place of a Texture where needed. Note that framerate and size properties of the sketch will be bypassed with the width and height and update() calls you provide.

Constructor:

PJSTexture( pjs, width, height )

Parameters:

  • pjs : The path to a Processing.js sketch, either relative or absolute.
  • width : The width of the texture.
  • height : The height of the texture.

Methods:

update()

Render the next frame of the Processing.js sketch to the texture.

Returns:

none


For additional methods see the parent class Texture.

Clone this wiki locally