Open OliHas opened 6 years ago
So far I have not come across the ability to add custom data in a glTF (2) file (in the specification). If you know of a place where we could put for example the IfcProduct id, please let me know and I'll add it to the serializer.
I think this could help: GLTFLoader: Fixes to improve mesh name uniqueness.
I recommend to store the IfcProduct id here: primitive[].extras
This becomes in three.js: mesh[].userData
Hi! It is possible to pass data if this is inserted into the code "BinaryGltfSerializer2.java" at line 558:
ObjectNode extrasNode = OBJECT_MAPPER.createObjectNode();
nodeNode.set("extras", extrasNode);
extrasNode.put("IfcProductID", IfcProductID);
How do I find out the IfcProduct id? Thanks for your help!
Cool.
The ifcProduct.getOid() will give you the product oid.
Hi! For a researchproject I'm developping a small three.js viewer, in which BIM models from the BIMServer can be displayed. Now I would like to get the properties of an element directly in the three.js-viewer. Is there a way to access properties of a selected element? Something like a unique id, which is passed from the GltfSerializer? Thanks for your help!