0

i using TweenMax and pixi.js

codepen.io/nimaina/pen/aPERKO

how to remove black background?

1 Answer 1

1

Well the black background that you see is the default PIXI.Application setup.

Default width: 800

Default height: 600

Default backgroundColor: 0x000000 (black)

Basically there are two options, that I see, to avoid the black background.

Option 1: use exact dimensions for width and height

I see the dimensions of greensock.png are 538x173.

var app = new PIXI.Application( {
  view: document.querySelector("#canvas"),
  width: 538,
  height: 173
});

Option 2: set transparent:true and make the background transparent

var app = new PIXI.Application( {
  view: document.querySelector("#canvas"),
  transparent: true
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.