JayDawg Posted February 9, 2022 Share Posted February 9, 2022 Hello Friends, I am trying to create a responsive UI, one that can fit a phone screen portrait or landscape. I came across this library https://github.com/pixijs/pixi-ui/blob/master/README.md, but I can't get it to work because I am using Pixi V6? This is my code and I get alot of the following errors. Should I just use vanilla pixi instead? import * as PIXI from 'pixi.js'; import * as PUXI from 'puxi.js'; const app = new PIXI.Application({ }); const uxStage = new PUXI.Stage({ width: 512, height: 512, }); app.stage.addChild(uxStage); uxStage.addChild(new PUXI.Button({ text: "Hello world!" })); uxStage.addChild(new PUXI.Text({ value: "Click me!" }).setPadding(4, 6) // horizontal/vertical padding .setBackground(0xffaabb) // background color (can use a PIXI.Graphics too) .setBackgroundAlpha(.5) // alpha for background .setElevation(2) // drop-shadow on background! ); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.