Spine Game Objects can now be rendered to Render Textures. Fix #5184

This commit is contained in:
Richard Davey 2020-08-25 14:11:37 +01:00
parent 2008035ca1
commit de0133e3cc
2 changed files with 11 additions and 0 deletions

View file

@ -124,6 +124,13 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent
skeleton.scaleY *= -1;
}
if (renderer.currentFramebuffer !== null)
{
skeleton.x = 0;
skeleton.y = calcMatrix.ty - (viewportHeight * src.scaleY);
skeleton.scaleY *= -1;
}
// Add autoUpdate option
skeleton.updateWorldTransform();

View file

@ -1219,6 +1219,10 @@ var WebGLRenderer = new Class({
gl.viewport(0, 0, this.width, this.height);
this.currentProgram = null;
this.currentVertexBuffer = null;
this.currentIndexBuffer = null;
this.setBlendMode(0, true);
this.resetTextures();