las/laz colorDepth set default to auto or 16
LAS specification recommends 16 bits. You wrote this even in your documentation. https://xeokit.github.io/xeokit-sdk/docs/class/src/plugins/LASLoaderPlugin/LASLoaderPlugin.js~LASLoaderPlugin.html
when I try to set the parameter colorDepth, it will be ignored, so I had to change the default in the xeokit-sdk.es.js file.
PR would be welcome!
Hi, I tried to make a PR but then I realized it aimed at dist. I couldn't find the function mergeNestedFields in src. I would really like to support but also don't want to push anything wrong. Here is my suggestion to consider the las options:
function mergeNestedFields(mergedOptions, options) {
for (const key in options) {
if (key in options) {
const value = options[key];
if (Object.keys(DEFAULT_LAS_OPTIONS['las']).includes(key)){
mergedOptions['las'][key] = options[key];
} else {
if (isPureObject(value) && isPureObject(mergedOptions[key])) {
mergedOptions[key] = { ...mergedOptions[key],
...options[key]
};
} else {
mergedOptions[key] = options[key];
}
}
}
}
}
I also tried to simply add the DEFAULT_LAS_OPTIONS to the DEFAULT_LOADER_OPTIONS but this didn't work.
This should be fixed now by #959, released in xeokit-sdk v2.3.3