debugRender 新增camera参数来修正渲染位置

This commit is contained in:
yhh
2020-08-28 18:04:50 +08:00
parent a3c53116e1
commit 7a308f76b6
27 changed files with 236 additions and 192 deletions

View File

@@ -38,7 +38,7 @@ module es {
/**
* 只有在没有碰撞器时才呈现边界。总是在原点上渲染一个正方形。
*/
debugRender();
debugRender(camera: Camera);
}
/**

View File

@@ -31,7 +31,7 @@ module es {
let renderable = scene.renderableComponents.buffer[i];
if (!this.excludedRenderLayers.contains(renderable.renderLayer) && renderable.enabled &&
renderable.isVisibleFromCamera(cam))
renderable.debugRender();
renderable.debugRender(cam);
}
super.debugRender(scene, cam);

View File

@@ -89,7 +89,7 @@ module es {
for (let i = 0; i < scene.entities.count; i ++){
let entity = scene.entities.buffer[i];
if (entity.enabled)
entity.debugRender();
entity.debugRender(cam);
}
}
}

View File

@@ -34,7 +34,7 @@ module es {
for (let j = 0; j < renderables.length; j ++){
let entity = renderables[j];
if (entity.enabled)
entity.debugRender();
entity.debugRender(cam);
}
}
}