Rasterization API defines interface for making snapshots from HTML elements.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FPSMeter = document.createElement("div"); | |
FPSMeter.id = "fpsLabel"; | |
FPSMeter.style.fontSize = "24px"; | |
FPSMeter.style.position = "absolute"; | |
FPSMeter.style.right = "0"; | |
FPSMeter.style.top = "0"; | |
FPSMeter.style.backgroundColor = "#000"; | |
FPSMeter.style.color = "#fff"; | |
FPSMeter.style.zIndex = "99999"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO check for instanced, should we exclude them from count? | |
// TODO check for invisible | |
let verticesCounted = 0; | |
let indicesCounted = 0; | |
export function totalVertices(scene: Scene): { vertices: number; indices: number; } { | |
verticesCounted = 0; | |
scene.meshes.forEach((mesh) => { | |
if (mesh) { |