Skip to content

Commit fdde5af

Browse files
committed
Minor tweaks.
1 parent af29b95 commit fdde5af

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

javascript/JsPolyHaven/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
}
5757

5858
#materialPreview {
59-
max-height: 400px;
60-
object-fit: contain;
59+
max-height: 480px;
60+
object-fit: cover;
6161
}
6262

6363
.map-badge {
@@ -190,11 +190,13 @@ <h5 class="modal-title" id="materialModalLabel">Material Details</h5>
190190
<div class="row-sm p-0 m-0 g-0">
191191
<!-- Viewer -->
192192
<div class="col-sm p-0 m-0 g-0">
193+
<div class="container-fluid p-0 m-0 g-0" id="viewerContainer">
193194
<iframe id="viewer" src="" class="p-0"
194195
style="width: 100%; height: 480px; overflow: auto; border: none; display:none;"
195196
frameborder="0" allowfullscreen>
196197
</iframe>
197198
</div>
199+
</div>
198200
</div>
199201
</div>
200202
</div>
@@ -203,7 +205,7 @@ <h5 class="modal-title" id="materialModalLabel">Material Details</h5>
203205
<i class="bi bi-eye me-2"></i>Show Content
204206
</button>
205207
</div>
206-
<div id="contentPreview" class="mt-1" style="display:none;">
208+
<div id="contentPreview" class="container mt-1" style="display:none;">
207209
<div class="mt-2 mb-2">
208210
<b>Textures</b>
209211
<div id="textureGallery" class="row g-2"></div>

javascript/JsPolyHaven/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ async function loadMaterialContent(materialId) {
388388
const createTextureCard = (textureName, textureUrl) =>
389389
{
390390
const card = document.createElement('div');
391-
card.className = 'col-6 col-md-4 col-lg-3 mb-3';
391+
card.className = 'col-sm-3 col-md-3 col-lg-3 mb-2';
392392

393393
// If textureURL ends with exr replace with png for preview
394394
if (textureUrl.toLowerCase().endsWith('.exr')) {

0 commit comments

Comments
 (0)