Sfoglia il codice sorgente

changed h2d.filter.Filter.filter to smooth (same as Sprite)

ncannasse 8 anni fa
parent
commit
341ff6da38
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      h2d/filter/Blur.hx
  2. 1 1
      h2d/filter/Filter.hx

+ 2 - 2
h2d/filter/Blur.hx

@@ -21,7 +21,7 @@ class Blur extends Filter {
 
 	public function new( quality = 1, passes = 1, sigma = 1. ) {
 		super();
-		filter = true;
+		smooth = true;
 		pass = new h3d.pass.Blur(quality, passes, sigma);
 	}
 
@@ -38,7 +38,7 @@ class Blur extends Filter {
 
 	override function draw( ctx : RenderContext, t : h2d.Tile ) {
 		var tex = ctx.textures.allocTarget("blurTmp", ctx, t.width, t.height, false);
-		tex.filter = filter ? Linear : Nearest;
+		tex.filter = smooth ? Linear : Nearest;
 		pass.apply(t.getTexture(), tex);
 		return t;
 	}

+ 1 - 1
h2d/filter/Filter.hx

@@ -4,7 +4,7 @@ class Filter {
 
 	public var autoBounds = true;
 	public var boundsExtend : Float = 0.;
-	public var filter = false;
+	public var smooth = false;
 
 	function new() {
 	}