donmccurdy / three-gltf-viewer

Drag-and-drop preview for glTF 2.0 models in WebGL using three.js.
https://gltf-viewer.donmccurdy.com/
MIT License
2.09k stars 534 forks source link

URL Option for Environment #298

Closed effofexx closed 2 years ago

effofexx commented 2 years ago

Is there a URL parameter to define which environment is used upon loading the model?

Being able to pass the URL for a model is a great feature, but some models just don't look best in the Venice environment, so I'm wondering if I can set environment to "None" via a URL option.

donmccurdy commented 2 years ago

Hi! Not currently I'm afraid. There is a parameter, preset=assetgenerator, that opts into a different IBL. I could perhaps be open to another option like preset=punctual that disables IBL. You may find https://modelviewer.dev/ to be a more configurable choice for real customization here. :)

effofexx commented 2 years ago

Thank you for bringing preset=assetgenerator to my attention! This is actually just what I had in mind when I posed the question.

Also thank you for telling me about https://modelviewer.dev/. I somehow hadn't come across that before, and I'm sure it'll keep me busy for a good while :)