Closed jothikannan closed 5 years ago
See the TGALoader
example: https://threejs.org/examples/webgl_loader_texture_tga.html
Also check out the other loaders in the source code and examples.
ok am requesting a feature to use TGALoader combined with the OBJMTLLoder, that would be better if we use Wavefront OBJ models with the tga as materials
is supported now?@jothikannan
You should be able to load TGA textures with MTLLoader
like so:
const manager = new THREE.LoadingManager();
manager.addHandler( /\.tga$/i, new THREE.TGALoader() );
const loader = new THREE.MTLLoader( manager );
// now load your MTL/OBJ files
manager.addHandler( /.tga$/i, new THREE.TGALoader() );
@Mugen87 I believe there is currently only one example of using .addHandler
. Perhaps the docs can be made more descriptive -- or we can add an example of the use case you mentioned.
... or add the above line to the existing example and comment it out.
I believe there is currently only one example of using .addHandler.
That's correct. It's the OBJ/MTL example which adds DDSLoader
in this way.
Perhaps the docs can be made more descriptive
TBH, I think the description is already quite good. Do you have any idea how to improve it?
... or add the above line to the existing example and comment it out.
Done!
Do you have any idea how to improve it?
Not really, but this line seems to be a bit contradictory:
Note: The following methods are designed to be called internally by loaders. You shouldn't call them directly.
Oh, I was not aware of this note! Let's reorganize this doc page.
Do you have any idea how to improve it?
Registers a loader with the given regular expression.
@Mugen87 Without a pattern to follow, I would have no idea what that means or what the expression should look like.
If it is hard to explain, then a code snippet can be used... or a reference to an example, if we want to go that route.
am loading a model with the OBJMTLLoder. and am using .tga materials, the model is loaded as black.
three.js doesn't support .tga materials, what are the materials is supported by the three.js., can anyone tell me??