An error occurred while fetching folder content.
GLTFExporter: Preventing to write `null` for `attenuationDistance`. (#29035)
Cold5tar authored
* Fix GLTFExporter.js by checking if attenuation distance is set

Having no attenuation distance set in the project/code, defaults to infitity. This property then cannot be set in GLTF file and automatically sets to NULL. NULL property cannot be read by various softwares, for example - Blender 4 - > onwards.

By adding check if distance is !== infinity we either send that parameter if its set, or don't send it if its default.

* Update GLTFExporter.js

Clean up.

---------
Co-authored-by: default avatarMichael Herzog <michael.herzog@human-interactive.org>
02c15807
Name Last commit Last update