I am building a small 3D-application where the user can scale a cube, which has a TextureMaterial applied, to any size.
Its a wall with a wood-like texture. But when the wall is scaled, the texture is scaling with the size of the CubeGeometry. But i like the texture to keep its original dimensions and just repeat on the surface when the size of the cube is beeing changed.
My question is:
Is there a build in way in away3d 4 which i can use to prevent the texturematerial from being scaled with its mesh? - and how?
... or do i have to scale the material down, as the mesh is being scaled up and how would i do that?
The Code looks like this:
[Embed(source="assets/wood_texture_01.png")]
private var Texture_01:Class;
var texture1:Texture2DBase = new BitmapTexture(new Texture_01().bitmapData);
var cubeMaterial:TextureMaterial = new TextureMaterial(texture1, true, true, true);
var wall:CubeGeometry = new CubeGeometry(100, 100, 10);
var newMesh:Mesh = new Mesh(wall, cubeMaterial);
thanks for your help in advance