Ground mesh unlimited moving

I am having a gltf model of a car. I need to set the car model like to move on the ground texture. I already tried this following this example . But in this the ground mesh is just grid helper. But, I am facing a lagging issue in the ground texture, When I tried this using planegeometry with a texture. I am using following script for ground texture

var groundTexture = new THREE.TextureLoader().load( "models/texture/floor_tiles.jpg" );
groundTexture.wrapS = groundTexture.wrapT = THREE.RepeatWrapping;
groundTexture.repeat.set( 75, 75 );
groundTexture.anisotropy = 64;
groundTexture.encoding = THREE.sRGBEncoding;
var groundMaterial = new THREE.MeshStandardMaterial( { map: groundTexture } );
var mesh = new THREE.Mesh( new THREE.PlaneBufferGeometry( 100, 100 ), groundMaterial );
mesh.position.y =0.0;
mesh.rotation.x = - Math.PI / 2;
mesh.receiveShadow = true;
scene.add( mesh );

But It doesn’t give me a good smooth flow while animating it. I am using following code to animate the floor.

var animate = function () {
requestAnimationFrame( animate );
var time = / 1000;
mesh.position.z = ( time ) % 8;
renderer.render( scene, camera );

How to get this animated floor without lagging?

Why are you mentioning CubeTexture in your topic? According to your code, you are just using a normal texture.

This makes no sense. I’ve never seen a supported value greater than 16. Better use:

groundTexture.anisotropy = renderer.capabilities.getMaxAnisotropy();
1 Like

Is it okay @Mugen87? Actually I am using cubetexture also to make scene looks like within a room

Well, apart from my comments of my previous post I see nothing suspicious. You probably have to demonstrate the performance issue with a live example.