export function handleLHover(targetPoint) {
  // if(Object.keys(targetPoint).includes('enableHover') && !targetPoint.enableHover)return;
  if (this.tag3CSS2DObj.element.style.opacity != '1') {
    // 保存进入状态
    this._saveState();
    // this.clearTagsObj();
    // 全局临时标记该选中的模型;
    this.targetPoint = targetPoint;
    const worldPosition = new this.THREE.Vector3();
    //获取附着点的世界坐标系
    targetPoint.getWorldPosition(worldPosition);
    this._checkAnimation(worldPosition);

    // 设置标签位置
    this.tag3CSS2DObj.position.set(
      worldPosition.x,
      worldPosition.y,
      worldPosition.z
    );
    this.isControlOrbit(false);
    this.position = worldPosition;
    if (/tr$/.test(targetPoint.name)) {
      this.tag3CSS2DObj.translateX(3);
      this.tag3CSS2DObj.translateZ(10);
      this.tag3CSS2DObj.translateY(-5);
      intoAnimation.call(this);
    } else if (/tl$/.test(targetPoint.name)) {
      this.tag3CSS2DObj.translateX(-3);
      this.tag3CSS2DObj.translateZ(10);
      this.tag3CSS2DObj.translateY(-5);
      intoAnimation.call(this);
    } else if (/tc$/.test(targetPoint.name)) {
      this.tag3CSS2DObj.translateX(0);
      this.tag3CSS2DObj.translateZ(10);
      this.tag3CSS2DObj.translateY(-6);
      intoAnimation.call(this);
    } else if (/br$/.test(targetPoint.name)) {
      this.tag3CSS2DObj.translateX(2);
      this.tag3CSS2DObj.translateZ(10);
      this.tag3CSS2DObj.translateY(3);
      intoAnimation.call(this);
    } else if (/bl$/.test(targetPoint.name)) {
      this.tag3CSS2DObj.translateX(-2);
      this.tag3CSS2DObj.translateZ(10);
      this.tag3CSS2DObj.translateY(3);
      intoAnimation.call(this);
    }
    this.scene.add(this.tag3CSS2DObj);
    // 返回给编辑组件的回调函数
    this.editDev(targetPoint)
  }
}

function intoAnimation() {
  this.tag3CSS2DObj.element.style.opacity = "1";
  this.tag3CSS2DObj.element.style.display = "block";
}

