Moving Imported Gltf models

I imported my gltf model and added it to scene but now if i try to move it, it wont work

var blackBox=new THREE.Scene();

  var loader = new THREE.GLTFLoader();

  var x=40;

  var mod =new THREE.Geometry();

  var mixer;

  var clock=new THREE.Clock();

 
//load gltf model
  loader.load('untitled.gltf',function(model)

  {

    mod = model.scene.children[0];

    mixer = new THREE.AnimationMixer( model.scene );

    var action = mixer.clipAction( model.animations[ 0 ] );

        action.play();

        model.scene.rotation.y=6;

      mod.rotation.y=5;

    scene.add( mod );

    

    mod.position.x=4;

   

  },undefined,function(error){console.error(error);});


//set position to x=4
  var rt=function(){

  mod.position.x=-4;

  }
rt();

How can i move the mode around?

A 3D object can’t be of type Geometry or BufferGeometry. It should be an instance of Object3D or derived classes like Mesh, Points or Line. In your case, I would just declared the variable like so:

var mode;

In your animation loop, do this:

if ( mod !== undefined ) mod.position.x=-4;

Also keep in mind that important parts of a basic 3D scene are missing in your code snippet (e.g. a camera and a renderer). I suggest you study the following beginner guide and try it again:

https://threejs.org/docs/index.html#manual/en/introduction/Creating-a-scene