mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
Update visual defaults
Somewhat more conventional visual presentation: + Use a neutral gray background a-la most other CAD/modelling software for better contrast with the geometry (which defaults to a bright yellow). This is done with the "skybox-environment" image in model-viewer, so add a new setting value in settings.ts for this (it can be overriden in the URL just like other settings) + But using a skybox will cause that image to be used for lighting too, which is clearly not desired. So fetch a nice professional HDRI image from Polyhaven for lighting. This is much better (more directional, higher contrast) than the default light environment anyway. + The checkerboard texture isn't really a good default. Use a 1x1 white pixel instead, essentially presenting the model materials unchanged. Also collect the default color in gltf.py out of the code and put it next to the texture for clarity. This should probably be wired through to a setting at some point. Signed-off-by: Andy Ross <andy@plausible.org>
This commit is contained in:
@@ -29,7 +29,11 @@ export async function settings() {
|
||||
panSensitivity: 1,
|
||||
exposure: 1,
|
||||
shadowIntensity: 0,
|
||||
background: '',
|
||||
// Nice low-res outdoor/high-contrast HDRI image (CC0 licensed) for lighting
|
||||
background: "https://dl.polyhaven.org/file/ph-assets/HDRIs/hdr/1k/qwantani_afternoon_1k.hdr",
|
||||
// Uniform (1x1 pixel) medium gray background for visibility
|
||||
skybox: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNsaFjwHwAFyQKh26fFAAAAAABJRU5ErkJggg==",
|
||||
|
||||
};
|
||||
|
||||
// Auto-override any settings from the URL
|
||||
|
||||
Reference in New Issue
Block a user