These are chat archives for pixijs/pixi.js

Apr 2017
Apr 27 2017 11:00

Hello team!
I was wondering...using pixijs 4.5.1, immediately after adding a child (width: 256px, height: 256px) to a PIXI.Container, shouldn't the container reflect in its dimensions the sum of its content?
I get width: 0, height: 0;

// sprite is a PIXI.Sprite with defined dimensions...
console.log(sprite.width); // output: 256
console.log(sprite.height); // output: 256
let container = PIXI.Container();
console.log(container.width); // output: 0
console.log(container.height); // output: 0

I can imagine that for any reason the containers dimensions are not instantly updated after adding a child to it... any methods i can call to update its dimensions manually?

Apr 27 2017 11:08
yep, it seems that invisible objects (read !sprite.visible) don't add to the calculation of a containers bounds. Thanks!
Christopher Pietsch
Apr 27 2017 12:10
Hey there, I am trying to import the compressedTextures from the pixi.js package but it looks like it is undefined
import { Container, WebGLRenderer, Texture, Sprite, loaders, BaseTexture, CompressedTextures } from 'pixi.js'
basically I am trying to get the example running in es6 / webpack
Christopher Pietsch
Apr 27 2017 12:23
has anyone an idea how to get the dds example running in an es6 / webpack / babel env ?
Christopher Pietsch
Apr 27 2017 12:39
looks a bit like you have to import it on your own: