There is a sample here: http://amegas.github.io/gera/custom.geometry
It shows the rotating swords, which are represented as the custom loaded geometry which is mapped with the UV-texture.
As I can see this sample uses only a part of the texture with ignoring other parts of image. I want to load other models using the the sample from github, but the last attempt was unsuccessful. The result is shown here:
I rather don't understand how to solve my problem. As I have learned the information about the library which is used in sample. I must prepare some vertex/texture coordinates for rendering the custom 3D model. Also I thought to try to use some other WebGL drawing mode ( TRIANGLES, TRIANGLE_STRIP, TRIANGLE_FAN and etc.. ), because the library from sample provides an optional way to set the custom draw mode for each mesh:
var mesh = new Gera.Mesh({
geometry: new Gera.Geometry({
type: Gera.Geometry.Type.Custom,
vertices: object3d.jsonModel.vertices,
indices: object3d.jsonModel.indices,
uvCoordinates: object3d.jsonModel.uvCoordinates
}),
material: new Gera.Material( object3d.texture ),
drawMode: Gera.Renderer.DrawMode.TriangleStrip
});
But also no success. I'm thinking that I've prepared the model of cat not correctly. I've used obj2json mesh file converter
from other github project. The result is shown above.
What should I do to solve my problem?