mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 05:09:51 +02:00
Display textures size in MB
This commit is contained in:
parent
fe8b3b4d0d
commit
d61e4c5c11
2 changed files with 12 additions and 2 deletions
|
@ -59,7 +59,7 @@
|
||||||
<th id="entity-visible"><span class="glyph"></span><span class="sort-order"></span></th>
|
<th id="entity-visible"><span class="glyph"></span><span class="sort-order"></span></th>
|
||||||
<th id="entity-verticesCount">Verts<span class="sort-order"></span></th>
|
<th id="entity-verticesCount">Verts<span class="sort-order"></span></th>
|
||||||
<th id="entity-texturesCount">Texts<span class="sort-order"></span></th>
|
<th id="entity-texturesCount">Texts<span class="sort-order"></span></th>
|
||||||
<th id="entity-texturesSize">T Size<span class="sort-order"></span></th>
|
<th id="entity-texturesSize">Text MB<span class="sort-order"></span></th>
|
||||||
<th id="entity-hasTransparent"><span class="glyph"></span><span class="sort-order"></span></th>
|
<th id="entity-hasTransparent"><span class="glyph"></span><span class="sort-order"></span></th>
|
||||||
<th id="entity-drawCalls">Draws<span class="sort-order"></span></th>
|
<th id="entity-drawCalls">Draws<span class="sort-order"></span></th>
|
||||||
<th colspan="1" id="entity-hasScript"><span class="glyph">k</span><span class="sort-order"></span></th>
|
<th colspan="1" id="entity-hasScript"><span class="glyph">k</span><span class="sort-order"></span></th>
|
||||||
|
|
|
@ -132,6 +132,16 @@ function loaded() {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const BYTES_PER_MEGABYTE = 1024 * 1024;
|
||||||
|
|
||||||
|
function decimalMegabytes(number) {
|
||||||
|
if (number) {
|
||||||
|
return (number / BYTES_PER_MEGABYTE).toFixed(1);
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function addEntity(id, name, type, url, locked, visible, verticesCount, texturesCount, texturesSize, hasTransparent,
|
function addEntity(id, name, type, url, locked, visible, verticesCount, texturesCount, texturesSize, hasTransparent,
|
||||||
drawCalls, hasScript) {
|
drawCalls, hasScript) {
|
||||||
|
|
||||||
|
@ -141,7 +151,7 @@ function loaded() {
|
||||||
if (entities[id] === undefined) {
|
if (entities[id] === undefined) {
|
||||||
entityList.add([{
|
entityList.add([{
|
||||||
id: id, name: name, type: type, url: filename, locked: locked, visible: visible, verticesCount: verticesCount,
|
id: id, name: name, type: type, url: filename, locked: locked, visible: visible, verticesCount: verticesCount,
|
||||||
texturesCount: texturesCount, texturesSize: texturesSize, hasTransparent: hasTransparent,
|
texturesCount: texturesCount, texturesSize: decimalMegabytes(texturesSize), hasTransparent: hasTransparent,
|
||||||
drawCalls: drawCalls, hasScript: hasScript
|
drawCalls: drawCalls, hasScript: hasScript
|
||||||
}],
|
}],
|
||||||
function (items) {
|
function (items) {
|
||||||
|
|
Loading…
Reference in a new issue