Texture Looping via uv-coordinates


Im new to the JMonkeyEngine and actually trying to create a custom Mesh.

At the moment it is a simple Cube, i want to loop the Texture on it by using huge uv-coordinate numbers.
for example:
uv[0] = new Vector2f(0,0);
uv[1] = new Vector2f(3,0);
uv[2] = new Vector2f(3,3);
uv[3] = new Vector2f(0,3);

should show the texture as a 3x3 grid.

The problem is that it only shows the texture once at the 0-1 coordinates and then goes over into a single color.
I think that i have to change some parameters in the material to fix this problem, but i couldnt find out what i need to change.

I would be really happy if someone here could help me out.

A thought process for the future:

“I wonder if I can get the texture to wrap instead of truncate. Let’s check the javadoc for Texture…”

“Hmm… this wrap mode things seems like it work…”