topical media & game development
#graphic-flex-image-effects-07-source-aether-effects-shaders-WrapToSphereEffect.ax
#graphic-flex-image-effects-07-source-aether-effects-shaders-WrapToSphereEffect.ax
[swf]
[flash]
flex
package aether.effects.shaders {
import flash.geom.Point;
public class @ax-graphic-flex-image-effects-07-source-aether-effects-shaders-WrapToSphereEffect extends ShaderEffect {
public static var shaderClass:String = "WrapToSphereKernel";
public static var shaderFile:String = "wrapToSphere.pbj";
private var _radius:uint;
private var _textureWidth:uint;
private var _textureHeight:uint;
public function @ax-graphic-flex-image-effects-07-source-aether-effects-shaders-WrapToSphereEffect(
radius:uint=256,
textureWidth:uint=512,
textureHeight:uint=512,
blendMode:String=null,
alpha:Number=1
) {
_shaderClass = shaderClass;
_shaderFile = shaderFile;
this.textureWidth = textureWidth;
this.textureHeight = textureHeight;
this.radius = radius;
init(blendMode, alpha);
}
override protected function configureShader(data:Object):void {
data.radius.value = [radius];
data.textureWidth.value = [textureWidth];
data.textureHeight.value = [textureHeight];
}
public function set textureWidth(width:uint):void {
_textureWidth = width;
}
public function set textureHeight(height:uint):void {
_textureHeight = height;
}
public function set radius(radius:uint):void {
_radius = radius;
}
}
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.