GLTF adding a MeshBasicMaterial to a GLTF

So I have an animated GLTF file thatI was able to load. I want to add the MeshBasicMaterial to it, but I am not able to… I was able to it this way with the OBJ loader but all I am getting is " TypeError: object.traverse is not a function".

`const assetLoader = new GLTFLoader();
let mixer;
assetLoader.load(‘assets/xWing.blend.glb’, function(object){
const model = object.scene;
mixer = new THREE.AnimationMixer(model);
object.animations.forEach((clip) => {mixer.clipAction(clip).play(); });

const material = new THREE.MeshBasicMaterial({
color: 0x00FF41,
wireframe: true

object.traverse( function ( child ) {
if ( child.isMesh ) child.material=material;
} );


model.traverse, not object.traverse.