2021-09-19_145832.jpg2021-09-19_105146.jpg

    1. var app = new PIXI.Application(500,800);
    2. document.body.appendChild(app.view);
    3. var bg = new PIXI.Sprite.fromImage("res/lianxi/findFace/bg.png");
    4. app.stage.addChild(bg);
    5. //文本样式
    6. var style = {
    7. font : '20px 微软雅黑',
    8. fill : '#F7EDCA',
    9. stroke : '#4a1850',
    10. strokeThickness : 3,
    11. dropShadow : true,
    12. dropShadowColor : '#000000',
    13. dropShadowAngle : Math.PI / 6,
    14. dropShadowDistance : 2
    15. };
    16. //创建文本
    17. var timeTxt = new PIXI.Text("点击头像抖屏",style);
    18. app.stage.addChild(timeTxt);
    19. timeTxt.x = 180;
    20. timeTxt.y = 30;
    21. //头像
    22. var headPic = new PIXI.Sprite.fromImage("res/lianxi/findFace/1.png");
    23. headPic.x = 250;
    24. headPic.y = 350;
    25. headPic.anchor.set(0.5, 0.5);
    26. app.stage.addChild(headPic);