Scripts run with access to three variables
composite (with short names
comp). These are slightly restricted Canvas 2d Rendering Context objects.
background are the remix layers, and can be modified.
composite is rendered combination all layers (what you see in the remix editor).
layers.clone(ctx)takes a context (like
foreground) and returns a read/write copy of it.
layers.temp(width, height)returns a context into a temporary layer. If you don't pass width and height they default to the size of the image currently being edited.
util.clear(ctx)clears the whole context. Shortcut for
ctx.clearRect(0,0, ctx.canvas.width, ctx.canvas.height)
Math.round, and has no access to the DOM, AJAX calls or other potentially unsafe or undesired functions.
Last edited by TimothyFitz,