These are chat archives for pixijs/pixi.js

29th
Oct 2015
priestnot
@priestnot
Oct 29 2015 17:00
Hello I am starting with pixi.js and I have a question about it
I am trying to put a video on the background and then put some textures on top of it
I already made the video apear but it is not scaling with the video resolution ratio
Is there a way to implement this with me making the necessary manual caclulation
CragVFX
@CragVFX
Oct 29 2015 17:29
DisplayPixelRatio
?
priestnot
@priestnot
Oct 29 2015 17:36
I do not find anythin by that name in the documentation
I have created a renderer with the size of the window.
I have created a stage
I have created a texture with the video
the DisplayPixelRatio is to be used in the renderer, stage or texture?
CragVFX
@CragVFX
Oct 29 2015 17:46
in the renderer like:
var renderer = autoDetectRenderer(width, height, {transparent: true, resolution: window.displayPixelRatio});
I had the same issue with resolution and that ^ fixed it completely for me
priestnot
@priestnot
Oct 29 2015 17:48
ok I will try it
thanks
priestnot
@priestnot
Oct 29 2015 18:07
that did no work
Let me check another thing and I will be back with some news
priestnot
@priestnot
Oct 29 2015 18:21
I think i did not explayn my self correctly.
What I intend to do is: to maintain the video ratio (example 16:9) for the avaiable renderer (or stage) size.
For example add the black bars above and below the video.
CragVFX
@CragVFX
Oct 29 2015 18:21
gotcha
priestnot
@priestnot
Oct 29 2015 18:27
The code that you mentioned did not work
any other ideias?
CragVFX
@CragVFX
Oct 29 2015 18:28
why dont you scale the container
and not the video