Ninjadoodle Posted October 1, 2018 Share Posted October 1, 2018 Hi @enpu Just wanted to point out a couple of possible issues with WebGL. Polygons don't seem to show and neither do tiled backgrounds. Everything works fine in canvas. My Triangle Class ... game.createClass('ShapeTriangle', { init: function(x, y, w, h, rot, color) { this.spriteLine = new game.Graphics(); this.spriteLine.lineColor = '#000000'; this.spriteLine.lineWidth = 2; this.spriteLine.fillAlpha = 0; this.spriteLine.drawPolygon([0, h, w, h, 0, 0]); this.spriteLine.anchor.set(w/2, h/2); this.spriteLine.position.set(x, y); this.spriteLine.rotation = rot * Math.PI; this.spriteLine.addTo(game.scene.robotContainer); this.spriteFill = new game.Graphics(); this.spriteFill.fillColor = color; this.spriteFill.drawPolygon([0, h, w, h, 0, 0]); this.spriteFill.anchor.set(w/2, h/2); this.spriteFill.position.set(x, y); this.spriteFill.rotation = rot * Math.PI; this.spriteFill.addTo(game.scene.robotContainer); } }); My Tiled Bg Class ... game.createClass('Bg', { init: function(image) { this.sprite = new game.TilingSprite(image, game.system.width, game.system.height); this.sprite.anchorCenter(); this.sprite.position.set(game.system.originalWidth / 2, game.system.originalHeight / 2); this.sprite.addTo(game.scene.bg); } }); Quote Link to comment Share on other sites More sharing options...
enpu Posted October 1, 2018 Share Posted October 1, 2018 Noted and added to roadmap, thanks! Ninjadoodle 1 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.