Replies: 2 comments 2 replies
-
Two things that might be helpful — (1) The document root can only have one packet, but a packet can have multiple properties. For example: packet = xmpExtension.createPacket()
.setContext({geo: 'https://kieranfarr.com'})
.setProperty('geo:version', '0.1')
.setProperty('geo:longitude', metadata.longitude)
.setProperty('geo:latitude', metadata.latitude);
root.setExtension('KHR_xmp_json_ld', packet); (2) Additional packets may be added to other objects within the document, such as nodes or scenes. So for example, two nodes could have different lat/lng properties, via two different packets. The root is just one of the possible places to attach a packet. |
Beta Was this translation helpful? Give feedback.
-
You're right! I had tried that earlier but assumed that Babylon Sandbox would enumerate all the values without scrolling down to the bottom. Now I see all the values are in there: I'm surprised nobody has created a geo metadata schema? Should I throw one together? It's very basic |
Beta Was this translation helpful? Give feedback.
-
I am trying to add geospatial data to an exported glb file. I was able to follow the example here and export one property. How do I export more than one property? When I try a naive approach of setting more than one packet, only the last packet values are applied to the output GLB. I must be missing something simple?
https://gltf-transform.dev/modules/extensions/classes/KHRXMP
Snippet from my naive approach:
only longitude shows up, not version
Beta Was this translation helpful? Give feedback.
All reactions