_createAxes()

in viewer/src/renderer/AxesRenderer.js [47:95]


  _createAxes() {
    const axisLength = 10;
    const coneLength = axisLength / 5;
    const coneRadius = axisLength / 15;
    const options = {
      coneLength,
      coneRadius,
      cylinderLength: axisLength - coneLength,
      cylinderRadius: 3e-1 * coneRadius,
    };

    const east = this._createAxis(
      Object.assign({}, options, {
        color: 0xff0000,
        euler: [0, 0, -Math.PI / 2],
      }),
    );
    const north = this._createAxis(
      Object.assign({}, options, {
        color: 0x00ff00,
        euler: [0, 0, 0],
      }),
    );
    const up = this._createAxis(
      Object.assign({}, options, {
        color: 0x0088ff,
        euler: [Math.PI / 2, 0, 0],
      }),
    );

    const sphereSegments = 12;
    const origin = new Mesh(
      new SphereGeometry(
        options.cylinderRadius,
        sphereSegments,
        sphereSegments,
      ),
      new MeshPhongMaterial({
        color: 0xffffff,
        flatShading: true,
      }),
    );

    const axes = new Object3D();
    axes.add(east, north, up, origin);
    axes.position.z = -2;

    return axes;
  }