Skip to content

Commit 3fd52ec

Browse files
committed
Added debug draw
1 parent c76b084 commit 3fd52ec

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/gameobjects/mesh/MeshWebGLRenderer.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,28 @@ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera
103103
}
104104

105105
pipeline.vertexCount += vertexCount;
106+
107+
/*
108+
pipeline.flush();
109+
110+
for (var i = 0; i < meshVerticesLength; i += 2)
111+
{
112+
var x = vertices[i + 0];
113+
var y = vertices[i + 1];
114+
115+
var tx = x * calcMatrix.a + y * calcMatrix.c + calcMatrix.e;
116+
var ty = x * calcMatrix.b + y * calcMatrix.d + calcMatrix.f;
117+
118+
if (camera.roundPixels)
119+
{
120+
tx = Math.round(tx);
121+
ty = Math.round(ty);
122+
}
123+
124+
pipeline.drawFillRect(tx, ty, 2, 2, 0x00ff00, 1);
125+
}
126+
*/
127+
106128
};
107129

108130
module.exports = MeshWebGLRenderer;

0 commit comments

Comments
 (0)