Hello community,
I would like to load a GLTF on a map using its orignal symbology.
Following this documentation (https://developers.arcgis.com/javascript/latest/visualization/3d-visualization/visualizing-points-3d...), I am able to convert a GLTF into a single geometry and add it to a map.
But the symology of the loaded geometry is not the same as the original.
Original (expected)
| Loaded |
|
|
What I do is to add the geometry without specifying any symbology. Maybe it is incorrect?
Mesh.createFromGLTF(location, "https://developers.arcgis.com/javascript/latest//sample-code/geometry-mesh-elevation/live/pine_tree.glb")
.then(function (geometry) {
geometry.scale(1, { origin: location });
geometry.rotate(-90, 0, 0);
const graphic = new Graphic({geometry});
view.graphics.add(graphic);
})
.catch(console.error);
As you can see in my sample code (https://codepen.io/blecuona/pen/ZEVxXxN), colors are automatically modified.
I am doing something wrong? Is there any solution to my problem?
Thanks for your help.