cesium-native icon indicating copy to clipboard operation
cesium-native copied to clipboard

Use Gltf extensions instead of extras for more custom behavior when processing mesh

Open baothientran opened this issue 4 years ago • 1 comments

Currently we use extras to embed some metadata for mesh and material processing, for example, Skirt metadata, water mask, etc. The problem with extras is that it uses json value for type erasure and requires safety check (e.g. ensure property name is there and property type is double, etc) to ensure that it conforms to the custom properties. It will be a lot harder if extras has some nested json into it. Extensions on the other hand use std::any for type erasure and use std::any_cast for type safety, so it requires less check and maybe a little bit faster. Nested object is also handled more elegantly. Beside embedding a custom metadata using type is a lot more self-documented than using json.

baothientran avatar May 04 '21 15:05 baothientran

CC #195

kring avatar May 04 '21 23:05 kring