mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Spine Game Objects and Containers will now add themselves to the Camera render list, fixing issues where input didn't work if depth was used or they were overlapped with another interactive Game Object.
This commit is contained in:
parent
13fde9ce7a
commit
17ceb810e8
5 changed files with 10 additions and 0 deletions
|
@ -27,6 +27,8 @@ var SpineContainerCanvasRenderer = function (renderer, container, camera, parent
|
|||
return;
|
||||
}
|
||||
|
||||
camera.addToRenderList(container);
|
||||
|
||||
var transformMatrix = container.localTransform;
|
||||
|
||||
if (parentMatrix)
|
||||
|
|
|
@ -36,6 +36,8 @@ var SpineContainerWebGLRenderer = function (renderer, container, camera, parentM
|
|||
return;
|
||||
}
|
||||
|
||||
camera.addToRenderList(container);
|
||||
|
||||
var transformMatrix = container.localTransform;
|
||||
|
||||
if (parentMatrix)
|
||||
|
|
|
@ -34,6 +34,8 @@ var SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatri
|
|||
var spriteMatrix = renderer._tempMatrix2;
|
||||
var calcMatrix = renderer._tempMatrix3;
|
||||
|
||||
camera.addToRenderList(src);
|
||||
|
||||
spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));
|
||||
|
||||
camMatrix.copyFrom(camera.matrix);
|
||||
|
|
|
@ -48,6 +48,8 @@ var SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix,
|
|||
skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);
|
||||
}
|
||||
|
||||
camera.addToRenderList(src);
|
||||
|
||||
var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;
|
||||
|
||||
var viewportHeight = renderer.height;
|
||||
|
|
|
@ -51,6 +51,8 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix
|
|||
skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);
|
||||
}
|
||||
|
||||
camera.addToRenderList(src);
|
||||
|
||||
var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;
|
||||
|
||||
var viewportHeight = renderer.height;
|
||||
|
|
Loading…
Reference in a new issue