我正在使用Netbeans 8.2。在JavaScript中使用变量时,其中一些在最初显示为绿色后会变为黑色。为什么会这样?
插入此行时,camera
以绿色显示:
this.camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
添加此行时,两个camera
实例都会变黑:
this.camera.position.z = 5;
其他变量的行为不一样,但是在执行类似操作时保持绿色:
this.scene = new THREE.Scene();
this.scene.add( cube );