Jonny Shaw Posted September 25, 2017 Share Posted September 25, 2017 Hi all, just polishing off another pixi based game. Another one for mobile, so looking now to see if we can scale back some of the effects when using canvas for the lower end devices. I'll be dropping out particle effects, and a lot of the animations as it's rendering a bit slow atm, but one issue I've come across is with spine meshes. To save load time I've designed some assets to be flipped, but have noticed the mesh wireframes are visible on all those that are flipped. eg. grave.scale.set(-1,1); This is only visible on canvas (webGL is perfectly fine). Anyone know if there is a quick fix for this, or reckon I will have to duplicate the spine elements and flip the assets? (Last resort really) Thanks in advance! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 25, 2017 Share Posted September 25, 2017 Yes, That's known issue. https://github.com/pixijs/pixi.js/blob/dev/src/mesh/canvas/CanvasMeshRenderer.js#L121 You can override it: PIXI.mesh.CanvasMeshRenderer.prototype._renderDrawTriangle = function() { ... } You can try to reverse the order of points if orientation is wrong. If you fail, I will fix it myself, because that's the fourth time this month people want flipped meshes on canvas2d. Jonny Shaw 1 Quote Link to comment Share on other sites More sharing options...
Jonny Shaw Posted September 27, 2017 Author Share Posted September 27, 2017 On 9/25/2017 at 2:37 PM, ivan.popelyshev said: Yes, That's known issue. https://github.com/pixijs/pixi.js/blob/dev/src/mesh/canvas/CanvasMeshRenderer.js#L121 You can override it: PIXI.mesh.CanvasMeshRenderer.prototype._renderDrawTriangle = function() { ... } You can try to reverse the order of points if orientation is wrong. If you fail, I will fix it myself, because that's the fourth time this month people want flipped meshes on canvas2d. That's brilliant thanks @ivan.popelyshev will take a look at this later today 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.