toScreenPosition (obj, anchorPoint) {
    if (!obj) { return undefined; }
    if (!this.renderer || !this.camera) {
      if (!this.renderer) {
        Console.error('Attempted to generate screen position using RendererUtils without a renderer. Make sure to setRenderer() before toScreenPosition');
      }
      if (!this.camera) {
        Console.error('Attempted to generate screen position using RendererUtils without a camera. Make sure to setCamera() before toScreenPosition');
      }
      return undefined;
    }

    // Get the x,y center position
    let vector = new THREE.Vector3();

    // First set the vector to the object matrix
    vector.setFromMatrixPosition(obj.matrixWorld);

    vector = this.vectorToScreenPosition(vector);
    // Get the width/height of the object
    obj.updateMatrixWorld();
    const boundingBox = new THREE.Box3();
    boundingBox.setFromObject(obj);

    const objectWidth = (boundingBox.max.x - boundingBox.min.x) * this.scale;
    const objectHeight = (boundingBox.max.y - boundingBox.min.y) * this.scale;

    let x;
    let y;
    if (!anchorPoint) {
      ({ x, y } = vector);
    } else if (anchorPoint === 'TL') {
      x = vector.x - (objectWidth / 2);
      y = vector.y - (objectHeight / 2);
    } else if (anchorPoint === 'BL') {
      x = vector.x - (objectWidth / 2);
      y = vector.y + (objectHeight / 2);
    }

    return {
      x: x,
      y: y,
      width: objectWidth,
      height: objectHeight
    };
  }
Translate the location of a THREE.Object3D rendered by the Three.js renderer in screen coordinates
relative to the renderer's dom element

@param  {Object} obj The THREE.js Object3D() to calculate screen dimensions for
@param  {string} [anchorPoint] The anchor point to map to screen coordinates; Undefined is middle, TL or BL
@returns {Dimensions} The x,y anchor point and the width and height of the object