Added canvas debug

This commit is contained in:
Richard Davey 2018-10-25 16:27:00 +01:00
parent 6505e6837a
commit 79bd0342ac

View file

@ -30,15 +30,19 @@ var SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercen
return;
}
src.plugin.skeletonRenderer.ctx = context;
var plugin = src.plugin;
var skeleton = src.skeleton;
var skeletonRenderer = plugin.skeletonRenderer;
skeletonRenderer.ctx = context;
context.save();
src.skeleton.updateWorldTransform();
// src.skeleton.updateWorldTransform();
src.plugin.skeletonRenderer.draw(src.skeleton);
skeletonRenderer.draw(skeleton);
if (src.renderDebug)
if (plugin.drawDebug || src.drawDebug)
{
context.strokeStyle = '#00ff00';
context.beginPath();