修复verlet报错

This commit is contained in:
yhh
2021-07-02 20:59:44 +08:00
parent 85bdd97d48
commit 13a001c258
11 changed files with 73 additions and 56 deletions

View File

@@ -4,7 +4,7 @@ module es {
constructor(renderOrder: number = 0, camera: ICamera = null) {
super(renderOrder, camera);
}
public render(scene: Scene): void {
if (!this.renderDirty)
return;
@@ -12,17 +12,17 @@ module es {
this.renderDirty = false;
let cam = this.camera ? this.camera : scene.camera;
this.beginRender(cam);
for (let i = 0; i < scene.renderableComponents.count; i ++) {
let renderable = scene.renderableComponents.get(i);
if (renderable.enabled && renderable.isVisibleFromCamera(scene.camera))
this.renderAfterStateCheck(renderable, cam);
}
if (this.shouldDebugRender && es.Core.debugRenderEndabled) {
this.debugRender(scene);
}
this.endRender();
}
}