scratch-flash/3d_render_src/SpriteStamp.as

45 lines
1.3 KiB
ActionScript
Raw Normal View History

2014-05-12 12:24:39 -04:00
/*
* Scratch Project Editor and Player
* Copyright (C) 2014 Massachusetts Institute of Technology
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package {
import flash.display.BitmapData;
2014-05-12 12:24:39 -04:00
public class SpriteStamp extends BitmapData {
private var fx:Object;
public function SpriteStamp(width:int, height:int, fx:Object) {
super(width, height, true, 0x00ffffff);
effects = fx;
}
public function set effects(o:Object):void {
fx = null;
if(o) {
fx = {};
for(var prop:String in o)
fx[prop] = o[prop];
}
}
2014-05-12 12:24:39 -04:00
public function get effects():Object {
return fx;
}
}
}