PCoA_output/emperor_qiime2_jacc/275f2778-beaf-4710-81c8-e9fac8a27d99/data/js/draw.js
/**
   *
   * @class EmperorArrowHelper
   *
   * Subclass of THREE.ArrowHelper to make raycasting work on the line and cone
   * children.
   *
   * For more information about the arguments, see the [online documentation]
   * {@link https://threejs.org/docs/#api/helpers/ArrowHelper}.
   * @return {EmperorArrowHelper}
   * @extends THREE.ArrowHelper
   *
   */
@class EmperorArrowHelper
Subclass of THREE.ArrowHelper to make raycasting work on the line and cone
children.


@class EmperorArrowHelper Subclass of THREE . ArrowHelper to make raycasting work on the line and cone children .
function EmperorArrowHelper(dir, origin, length, color, headLength,
                              headWidth, name) {
    THREE.ArrowHelper.call(this, dir, origin, length, color, headLength,
                           headWidth);
    var pad, MIN = 16, paddedName = name;
    this.name = name;
    this.line.name = this.name;
    this.cone.name = this.name;
    if (this.name.length < MIN) {
      pad = Math.round((MIN - this.name.length) / 2);
      paddedName = paddedName.padStart(paddedName.length + pad);
      paddedName = paddedName.padEnd(paddedName.length + pad);
    }
    this.label = makeLabel(this.cone.position.toArray(), paddedName, color);
    this.add(this.label);
    return this;
  }
function EmperorArrowHelper ( dir , origin , length , color , headLength , headWidth , name ) { THREE . ArrowHelper . call ( this , dir , origin , length , color , headLength , headWidth ) ; var pad , MIN = 16 , paddedName = name ; this . name = name ; this . line . name = this . name ; this . cone . name = this . name ; if ( this . name . length < MIN ) { pad = Math . round ( ( MIN - this . name . length ) / 2 ) ; paddedName = paddedName . padStart ( paddedName . length + pad ) ; paddedName = paddedName . padEnd ( paddedName . length + pad ) ; } this . label = makeLabel ( this . cone . position . toArray ( ) , paddedName , color ) ; this . add ( this . label ) ; return this ; }
@class EmperorArrowHelper
 Subclass of THREE.ArrowHelper to make raycasting work on the line and cone
 children.
@class EmperorArrowHelper Subclass of THREE . ArrowHelper to make raycasting work on the line and cone children .
// 16 is roughly the number of characters in "Axis 1 (XX.xx %)" /*
     * If the text's lenght is small it will be rendered as a blurry sprite by
     * padding with spaces we ensure the length allows for a decent resolution.
     */