pixijs webgl模式实现刮刮卡的方法 反向遮罩

pixijs webgl模式实现刮刮卡的方法

    const app = new PIXI.Application({ width: 750, height: 1206, antialias: true});
  

 
   


     var guanbi = PIXI.Sprite.from('/moban/images/closebtn1.png');
    guanbi.width = 222;
    guanbi.height = 222;
    guanbi.name = 'guanbi1';
   
        app.stage.addChild(guanbi);
    var guanbi = PIXI.Sprite.from('/caitongxiaonian/images/closebtn1.png');
    guanbi.width = 222;
    guanbi.height = 222;
    guanbi.x=72;
    guanbi.y=72;
    guanbi.blendMode = PIXI.BLEND_MODES.XOR;
    guanbi.name = 'guanbi2';    
    app.stage.addChild(guanbi);

 document.body.appendChild(app.view);

 

posted @ 2021-02-11 10:10  newmiracle宇宙  阅读(484)  评论(0编辑  收藏  举报