trishul1979

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Issue solved. If we set width height of container the scale.x/scale.y property changes which was causing the issue. I separated code for this.
  2. Hi, I am creating a small game using pixi.js. I am struggling getting width height of container. The issue is the width/height of container reported through code is different and If I take the screen capture and see the size in photoshop its different and for this reason elements are not properly aligned. cards.js var GAME = GAME || {};var m_ref = null;GAME.Cards = function() { PIXI.Container.call(this); m_ref = this; this.visible = true; this._childs = new Array(); this.popup_sprite = new PIXI.Sprite(PIXI.utils.TextureCache["asset/ui/paper-186895_640.jpg"]); this._childs.push(this.popup_sprite); this.popup_sprite.anchor.x = this.popup_sprite.anchor.y = 0; this.popup_sprite.position.x = 0; this.popup_sprite.position.y = 0; this.addChild(this.popup_sprite); this.startDisplay();};GAME.Cards.constructor = GAME.Cards;GAME.Cards.prototype = Object.create(PIXI.Container.prototype);app.js _width = window.innerWidth || document.body.clientWidth;_height = window.innerHeight || document.body.clientHeight;cards_scene = new GAME.Cards();var _w = Math.round(_width * 0.7);alert("! : " + _w); // 869var _h = Math.round(_height * 0.8);cards_scene.width = _w;alert(cards_scene.width);// 869cards_scene.height = _h;If I check in photoshop the width of container is 956 whereas alert(cards_scene.width); reports 869. I am not using any resize code. If the width and height buggy or setting the width and height of Container is buggy.
  3. You can try CEF (https://bitbucket.org/chromiumembedded/cef)
  4. I do not want to create filter but display the animation how it is working here http://glslsandbox.com/e#28499.0 I did tried updating the GLSL code in the following file but it displays black http://pixijs.github.io/examples/_assets/basics/shader.frag
  5. Hi, I have just started learning pixi.js and have a query. I would like to play/run GLSL code within Pixi but unable to find any example code for this. for e.g. I would like to run similar code http://glslsandbox.com/e#28499.0 I did looked at few examples but did not understand how to include this http://pixijs.github.io/examples/index.html?s=basics&f=custom-filter.js&title=Custom%20Filter Many thanks for any help.