mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
Main light can now be moved, intensity can be regulated and update environment image for model viewer
This commit is contained in:
@@ -30,7 +30,8 @@ export async function settings() {
|
||||
exposure: 1,
|
||||
shadowIntensity: 0,
|
||||
// Nice low-res outdoor/high-contrast HDRI image (CC0 licensed) for lighting
|
||||
background: new URL('../../assets/qwantani_afternoon_1k.hdr', import.meta.url).href,
|
||||
environment: new URL('../../assets/qwantani_afternoon_1k_hdr.jpg', import.meta.url).href,
|
||||
environmentIntensity: 1.0,
|
||||
// Uniform (1x1 pixel) medium gray background for visibility (following dark/light mode)
|
||||
skybox: (window.matchMedia("(prefers-color-scheme: dark)").matches ?
|
||||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEU4ODiyn42XAAAACklEQVQI" +
|
||||
@@ -38,6 +39,7 @@ export async function settings() {
|
||||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEW6urpaLVq8AAAACklEQVQI" +
|
||||
"12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=="),
|
||||
};
|
||||
// settings.skybox = settings.background = ''; // Disable both skybox and background
|
||||
|
||||
// Auto-override any settings from the URL
|
||||
const url = new URL(window.location.href);
|
||||
|
||||
Reference in New Issue
Block a user