3dmeshviewer / stepfileviewer

A set of examples and demos for 3dmeshviewer component
https://3dmeshviewer.github.io/stepfileviewer/
39 stars 16 forks source link

Unable map textures to the .stp object #1

Open MrRaam opened 5 years ago

MrRaam commented 5 years ago

I was trying to see if we could add any standard material which has a texture. However, I couldn't see any texture applying after my approach. any dependencies?

else if (materialType == 'plastic') {
                           curMaterial = new THREE.MeshStandardMaterial({

                              map: new THREE.TextureLoader().load("../models/2.png"),

                          });
3dmeshviewer commented 4 years ago

We are preparing code for publishing with API description. By default is used material 'metalic' not 'plastic'. Thats why texture was not applied. We have prepared draft with UV coordinates for textures if you are interested, please let us know.

MrRaam commented 4 years ago

I did change the initialized parameters metalic to plastic and tried textures in both as standard material map: new THREE.TextureLoader().load("../models/2.png"), , but couldn't see the changes. kindly share the draft, would like to contribute from my end too., Also let me know if we had to add a texture what are the changes that have to be done.