code: function () {
          if (!this.vertexCount) {
              return;
          }
  
          if (!this.isUniqueVertex()) {
              this.generateUniqueVertex();
          }
  
          var attributes = this.attributes;
          var array = attributes.barycentric.value;
          var indices = this.indices;
          // Already existed;
          if (array && array.length === indices.length * 3) {
              return;
          }
          array = attributes.barycentric.value = new Float32Array(indices.length * 3);
  
          for (var i = 0; i < (indices ? indices.length : this.vertexCount / 3);) {
              for (var j = 0; j < 3; j++) {
                  var ii = indices ? indices[i++] : (i * 3 + j);
                  array[ii * 3 + j] = 1;
              }
          }
          this.dirty();
      }
docs: Generate barycentric coordinates for wireframe draw.