Do we have any examples of rendering a .drc model with materials using THREE.js?
- Dominant language
- C++
- Stars
- 7.5k
- Forks
- 1.1k
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
I've looked and haven't found a working example of rendering a .drc model with materials with THREE.js. Ive used the the `mtl-loader` and `drc-loader` to load my model, however, associating the material with the model has been a challenge. For example:
```js
// Bluebird promise API
return new Promise.props({
material: new Promise((res) => {
_mtlLoader.setPath(path);
_mtlLoader.load(mtl, (material) => {
material.preload();
res(material)
});
}),
model: new Promise((res) => {
_drcLoader.load(`${path}${drc}`, (geometry) => {
res(geometry);
});
})
});
```
When I receive the `model` (i.e. `BufferGeometry`) and `material` (i.e. THREE.MTLLoader.MaterialCreator) which comprises `4` materials, I am not able to render the model with the following:
```js
const mesh = new THREE.Mesh(model, material);
this._scene.add(mesh);
```
Contributor guide
Assessment
This issue has not been assessed yet.