Javascript中的shot函数已损坏,图像未显示

Javascript中的shot函数已损坏,图像未显示,javascript,aframe,virtual-reality,Javascript,Aframe,Virtual Reality,我有这个密码 var场景; 函数start(){ 场景=$('a-scene')[0]; console.log(“场景准备就绪”,场景); } 注册表组件(“开始游戏”{ 初始化:开始 }); 功能射击(子弹、瞄准){ var newBullet=$(bullet.clone(); newBullet.attr('visible','true'); 变量bulletPos=$(bullet.attr('position'); var目标=aim.x+''+bulletPos.y+''+aim

我有这个密码

var场景;
函数start(){
场景=$('a-scene')[0];
console.log(“场景准备就绪”,场景);
}
注册表组件(“开始游戏”{
初始化:开始
});
功能射击(子弹、瞄准){
var newBullet=$(bullet.clone();
newBullet.attr('visible','true');
变量bulletPos=$(bullet.attr('position');
var目标=aim.x+''+bulletPos.y+''+aim.z;
attr('animation','property:position;to:'+target+';dur:5000');
$(场景).append(newBullet);
}
函数shot(){
var bullet=this.data;
$(this.el).on('click',函数(evt){
var aim=evt.detail.intersection.point;
射击(子弹、瞄准);
});
}
AFRAME.register组件(“shoot”{
模式:{
类型:“选择器”
},
初始:射击
});

植物大战僵尸

我制作了一个代码片段,它给出了控制台错误,你能修复它们吗?它缺少.mtl