As I delve into learning three.js, I've encountered an issue with THREE.MeshLambertMaterial();
. The error message reads:
this.setValues is not a function
This error originates from the following section in the three.js source code:
three.js
THREE.MeshLambertMaterial = function ( parameters ) {
THREE.Material.call( this );
this.type = 'MeshLambertMaterial';
this.color = new THREE.Color( 0xffffff ); // diffuse
this.map = null;
this.lightMap = null;
this.lightMapIntensity = 1.0;
this.aoMap = null;
this.aoMapIntensity = 1.0;
this.emissive = new THREE.Color( 0x000000 );
this.emissiveIntensity = 1.0;
this.emissiveMap = null;
this.specularMap = null;
this.alphaMap = null;
this.envMap = null;
this.combine = THREE.MultiplyOperation;
this.reflectivity = 1;
this.refractionRatio = 0.98;
this.wireframe = false;
this.wireframeLinewidth = 1;
this.wireframeLinecap = 'round';
this.wireframeLinejoin = 'round';
this.skinning = false;
this.morphTargets = false;
this.morphNormals = false;
--> this.setValues( parameters );
};
The error seems to be triggered by this line of code in my JavaScript file:
graphics.js
var sphereMaterial = THREE.MeshLambertMaterial(
{color: 0x55B663});
Has anyone faced this issue before or have any insights on what might be causing it?