siddhant-mantri commited on
Commit
2ad2653
·
verified ·
1 Parent(s): 4c4f918

Leaderboard: show the top 20 first, with a Show all button (and Show top 20 to fold it back)

Browse files
Files changed (3) hide show
  1. assets/leaderboard-controls.js +18 -2
  2. assets/paper.css +4 -0
  3. index.html +2 -2
assets/leaderboard-controls.js CHANGED
@@ -1,7 +1,23 @@
1
  const input=document.getElementById('model-search'),tables=[...document.querySelectorAll('table.board')],count=document.getElementById('ranking-count');
2
  // the two tabs rank different line-ups (Text-to-Scene re-run vs the paper's Image-to-Scene), so count the visible one
3
  const visible=()=>tables.find(t=>t.offsetParent!==null)||tables[0];
4
- function filter(){const q=input.value.trim().toLowerCase();for(const table of tables){let rank=0;for(const row of table.tBodies[0].rows){row.hidden=!row.dataset.search.includes(q);if(!row.hidden)row.cells[0].textContent=++rank;}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  const rows=[...visible().tBodies[0].rows],shown=rows.filter(r=>!r.hidden).length;count.textContent=q?shown+' of '+rows.length+' configurations':rows.length+' configurations';}
6
- input.addEventListener('input',filter);tables.forEach(t=>t.querySelectorAll('th[data-k]').forEach(th=>th.addEventListener('click',filter)));
7
  document.querySelectorAll('.seg[data-for=leaderboard] button').forEach(b=>b.addEventListener('click',()=>setTimeout(filter)));
 
 
1
  const input=document.getElementById('model-search'),tables=[...document.querySelectorAll('table.board')],count=document.getElementById('ranking-count');
2
  // the two tabs rank different line-ups (Text-to-Scene re-run vs the paper's Image-to-Scene), so count the visible one
3
  const visible=()=>tables.find(t=>t.offsetParent!==null)||tables[0];
4
+ // each table shows its top 20 rows at first; "Show all" opens the rest, "Show top 20" folds it back.
5
+ // While searching, every match is shown.
6
+ const PAGE=20,open_=new Map(tables.map(t=>[t,false])),more=new Map();
7
+ for(const table of tables){
8
+ const bar=document.createElement('div'),all=document.createElement('button'),top=document.createElement('button');
9
+ bar.className='board-more';all.type=top.type='button';top.textContent='Show top '+PAGE;
10
+ all.addEventListener('click',()=>{open_.set(table,true);filter();});
11
+ top.addEventListener('click',()=>{open_.set(table,false);filter();(table.closest('.board-wrap')||table).scrollIntoView({block:'nearest'});});
12
+ bar.append(all,top);(table.closest('.board-wrap')||table).after(bar);more.set(table,{bar,all,top});
13
+ }
14
+ function filter(){const q=input.value.trim().toLowerCase();
15
+ for(const table of tables){let rank=0;const lim=(q||open_.get(table))?Infinity:PAGE;
16
+ for(const row of table.tBodies[0].rows){const hit=row.dataset.search.includes(q);if(hit)row.cells[0].textContent=++rank;row.hidden=!hit||rank>lim;}
17
+ const {bar,all,top}=more.get(table);
18
+ all.hidden=!!q||open_.get(table)||rank<=PAGE;all.textContent='Show all '+rank;
19
+ top.hidden=!!q||!open_.get(table)||rank<=PAGE;bar.hidden=all.hidden&&top.hidden;}
20
  const rows=[...visible().tBodies[0].rows],shown=rows.filter(r=>!r.hidden).length;count.textContent=q?shown+' of '+rows.length+' configurations':rows.length+' configurations';}
21
+ input.addEventListener('input',filter);tables.forEach(t=>t.querySelectorAll('th[data-k]').forEach(th=>th.addEventListener('click',()=>setTimeout(filter))));
22
  document.querySelectorAll('.seg[data-for=leaderboard] button').forEach(b=>b.addEventListener('click',()=>setTimeout(filter)));
23
+ filter();
assets/paper.css CHANGED
@@ -198,3 +198,7 @@ footer a { color: rgba(255,255,255,.62); }
198
  .abstract-card { padding: 1.6rem; } .tk { padding: 1.4rem 1.2rem; } .card { padding: 1.3rem 1.1rem; }
199
  .case-grid { grid-template-columns: 1fr; } .hero-stats { gap: 1.6rem; }
200
  }
 
 
 
 
 
198
  .abstract-card { padding: 1.6rem; } .tk { padding: 1.4rem 1.2rem; } .card { padding: 1.3rem 1.1rem; }
199
  .case-grid { grid-template-columns: 1fr; } .hero-stats { gap: 1.6rem; }
200
  }
201
+ .board-more { display: flex; justify-content: center; gap: .5rem; margin-top: .75rem; }
202
+ .board-more[hidden], .board-more button[hidden] { display: none; }
203
+ .board-more button { border: 1px solid var(--border); background: #fff; padding: .45rem 1.1rem; border-radius: 999px; font: 600 .84rem Inter, sans-serif; color: var(--text-h); cursor: pointer; box-shadow: var(--shadow-sm); }
204
+ .board-more button:hover { color: var(--primary-dark); border-color: var(--primary-dark); }
index.html CHANGED
@@ -4,7 +4,7 @@
4
  <meta charset="utf-8"/><meta content="width=device-width,initial-scale=1" name="viewport"/>
5
  <title>Code4Scene: Benchmarking Coding Agents for Constructing 3D Scenes</title><meta content="A benchmark that scores the engine-native 3D scenes coding agents build in Unreal Engine from open-ended descriptions." name="description"/>
6
  <link href="assets/simworld-mark.png?v=20261017logo" rel="icon" sizes="192x192" type="image/png"/><link href="assets/simworld-mark.png?v=20261017logo" rel="apple-touch-icon"/>
7
- <link href="assets/paper.css?v=5427505a" rel="stylesheet"/>
8
  <style>
9
  :root{--c4s-a:#5a67d8;--c4s-b:#d97706;--c4s-hot:#dc4a2d;--c4s-ok:#10A37F;--c4s-g1:#8b93a7;--c4s-g2:#aab1c2;--c4s-g3:#cdd2de;--c4s-seq:#5a67d8;--c4s-unit:#e3e7f0}
10
  svg.ch{width:100%;height:auto;display:block;font-family:Inter,system-ui,sans-serif;overflow:visible}
@@ -68,5 +68,5 @@ svg.ch .dim{opacity:.42}svg.ch g.row:hover{opacity:1}svg.ch .hot{fill:var(--c4s-
68
  <a href="https://simworld.org/" rel="noopener" target="_blank">SimWorld Home</a></p>
69
  <p style="margin-top:.5rem;font-size:.75rem;color:rgba(255,255,255,.25)">Part of the SimWorld project.</p></footer>
70
  <script src="assets/paper.js?v=20261016t2s"></script>
71
- <script defer="" src="assets/leaderboard-bars.js?v=20261017c4s"></script><script src="data/site.js?v=20261017c4s"></script><script src="assets/pareto.js?v=20261017c4s" type="module"></script><script src="assets/scene-cards.js?v=20261004harborlive" type="module"></script><script src="assets/task-tabs.js?v=20261001c" type="module"></script><script src="assets/leaderboard-controls.js?v=20261016t2s" type="module"></script><script src="assets/takeaway-bars.js?v=20261016t2s" type="module"></script><script src="assets/compare-player.js?v=20261016t2s" type="module"></script><script data-explore-include="" defer="" src="assets/explore/gallery-links.js?v=20261019explore1"></script>
72
  </body></html>
 
4
  <meta charset="utf-8"/><meta content="width=device-width,initial-scale=1" name="viewport"/>
5
  <title>Code4Scene: Benchmarking Coding Agents for Constructing 3D Scenes</title><meta content="A benchmark that scores the engine-native 3D scenes coding agents build in Unreal Engine from open-ended descriptions." name="description"/>
6
  <link href="assets/simworld-mark.png?v=20261017logo" rel="icon" sizes="192x192" type="image/png"/><link href="assets/simworld-mark.png?v=20261017logo" rel="apple-touch-icon"/>
7
+ <link href="assets/paper.css?v=20261119all" rel="stylesheet"/>
8
  <style>
9
  :root{--c4s-a:#5a67d8;--c4s-b:#d97706;--c4s-hot:#dc4a2d;--c4s-ok:#10A37F;--c4s-g1:#8b93a7;--c4s-g2:#aab1c2;--c4s-g3:#cdd2de;--c4s-seq:#5a67d8;--c4s-unit:#e3e7f0}
10
  svg.ch{width:100%;height:auto;display:block;font-family:Inter,system-ui,sans-serif;overflow:visible}
 
68
  <a href="https://simworld.org/" rel="noopener" target="_blank">SimWorld Home</a></p>
69
  <p style="margin-top:.5rem;font-size:.75rem;color:rgba(255,255,255,.25)">Part of the SimWorld project.</p></footer>
70
  <script src="assets/paper.js?v=20261016t2s"></script>
71
+ <script defer="" src="assets/leaderboard-bars.js?v=20261017c4s"></script><script src="data/site.js?v=20261017c4s"></script><script src="assets/pareto.js?v=20261017c4s" type="module"></script><script src="assets/scene-cards.js?v=20261004harborlive" type="module"></script><script src="assets/task-tabs.js?v=20261001c" type="module"></script><script src="assets/leaderboard-controls.js?v=20261119all" type="module"></script><script src="assets/takeaway-bars.js?v=20261016t2s" type="module"></script><script src="assets/compare-player.js?v=20261016t2s" type="module"></script><script data-explore-include="" defer="" src="assets/explore/gallery-links.js?v=20261019explore1"></script>
72
  </body></html>