src/StageClasses.js
/**
 * A background or foreground item.
 * 
 * @param layer the layer object from the resource file.
 * @returns {MatteItem}
 */
A background or foreground item.

@param layer the layer object from the resource file.
A background or foreground item . @param layer the layer object from the resource file .
function MatteItem(layer) {
	copy(layer, this);
	if (this.x === undefined) this.x = 0;
	if (this.y === undefined) this.y = 0;
	if (this.xvel === undefined) this.xvel = 0;
	if (this.yvel === undefined) this.yvel = 0;
	if (this.minh === undefined) this.minh = 0;
	if (this.minw === undefined) this.minw = 0;
	this.init();
}
function MatteItem ( layer ) { copy ( layer , this ) ; if ( this . x === undefined ) this . x = 0 ; if ( this . y === undefined ) this . y = 0 ; if ( this . xvel === undefined ) this . xvel = 0 ; if ( this . yvel === undefined ) this . yvel = 0 ; if ( this . minh === undefined ) this . minh = 0 ; if ( this . minw === undefined ) this . minw = 0 ; this . init ( ) ; }
A background or foreground item.
A background or foreground item .
// this.depth = layer.depth; // this.type = layer.type;