修复transition层级问题

This commit is contained in:
yhh
2020-06-23 16:18:14 +08:00
parent 795bfab1aa
commit 7399b9f5ca
16 changed files with 723 additions and 93 deletions

View File

@@ -5,6 +5,7 @@ class PostProcessor {
public shape: egret.Shape;
constructor(effect: egret.CustomFilter = null){
this.enable = true;
this.effect = effect;
}
@@ -18,12 +19,10 @@ class PostProcessor {
this.drawFullscreenQuad(source, this.effect);
}
public onSceneBackBufferSizeChanged(newWidth: number, newHeight: number){}
protected drawFullscreenQuad(texture: egret.DisplayObject, effect: egret.CustomFilter = null){
this.shape.graphics.clear();
this.shape.graphics.beginFill(0x000000, 1);
this.shape.graphics.drawRect(0, 0, texture.width, texture.height);
this.shape.graphics.endFill();
this.shape.filters = [effect];
texture.filters = [effect];
}
public unload(){
@@ -31,7 +30,7 @@ class PostProcessor {
this.effect = null;
}
this.scene = null;
this.scene.removeChild(this.shape);
this.scene = null;
}
}