[LayaAir3]Laya3.3废弃了filters,如何设置sprite滤镜,添加PostProcess2D,再给Process添加ColorEffect2D也不生效

已邀请:

layabox

赞同来自:

麻烦传个DEMO,看一下你是怎么用的。

编号9527

赞同来自:

private testFilter(){
    let spirit = new Laya.Sprite();
    this.displayObject.addChild(spirit);
    spirit.x = 360;
    spirit.y = 640;
    const url = "lang/zh-cn/spine/hero/zhujue_attack/zhujue_attack.skel"
    Laya.loader.load(url).then(()=>{
        let spine = spirit.addComponent(Laya.Spine2DRenderNode)
        spine.source = url;
        spine.skinName = "default";
        spine.play("idle", true);
        spirit.postProcess = new Laya.PostProcess2D();
        spirit.postProcess.addEffect(new Laya.GrayscaleEffect2D())
    })
}
代码就是这样,沙盒环境开发没办法上传demo与截图,其实这个是照着uicomment类中的gray函数写的

要回复问题请先

商务合作
商务合作