PointLightHelper constructor

PointLightHelper(
  1. dynamic light,
  2. dynamic sphereSize,
  3. Color color
)

Implementation

factory PointLightHelper(light, sphereSize, Color color) {
  var geometry = SphereGeometry(sphereSize, 4, 2);
  var material = MeshBasicMaterial(
      {"wireframe": true, "fog": false, "toneMapped": false});

  var _plh = PointLightHelper.create(geometry, material);

  _plh.light = light;
  _plh.light.updateMatrixWorld(false);

  _plh.color = color;
  _plh.matrix = _plh.light.matrixWorld;
  _plh.matrixAutoUpdate = false;

  _plh.update();
  return _plh;

  /*
	// TODO: delete this comment?
	const distanceGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 );
	const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );

	this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );
	this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );

	const d = light.distance;

	if ( d === 0.0 ) {

		this.lightDistance.visible = false;

	} else {

		this.lightDistance.scale.set( d, d, d );

	}

	this.add( this.lightDistance );
	*/
}