Thanks for the heads up, I just fixed it in the master branch.
If you were to define a model with multiple textures these can all be
attached to the same texCoords or you can also have different
texCoords for each texture.
In the first case you would just have something like:
new O3D.Model({
textures: ['textureName1', 'textureName2'],
texCoords: [float, float, float, float, ....]
});
In the second case you would have something like:
new O3D.Model({
textures: ['textureName1', 'textureName2'],
texCoords: {
'textureName1': [float, float, float, float, ....],
'textureName2': [float, float, float, ...]
}
});
You'll have to write your own custom shaders to use more than one
texture per object though, it should be easy though. You can just base
them of the default shaders here:
https://github.com/philogb/philogl/blob/master/src/shaders.js#L14
The only difference is that you can add a new texCoord:
attribute vec2 texCoord2;
and a new sampler:
uniform sampler2D sampler2;
that will correspond to textureName2.
Please let me know if you have any other questions :)
Nicolas.
--
Nicolas Garcia Belmonte - http://philogb.github.com/
I actually currently working on this, but unfortunately this is not
supported by the framework yet.
Three.js has good support for this though:
http://github.com/mrdoob/three.js
You can find a spec for the model to be used with the framework to
load more complex models:
https://github.com/mrdoob/three.js/wiki/JSON-Model-format-2.0
I hope this helps, and sorry about that!
--