createPlane(plane) {
    if (plane.vertices.length == 0) {
      return null;
    }

    const geo = new Geometry();
    // generate vertices
    for (let pt = 0; pt < plane.vertices.length / 3; pt++) {
      geo.vertices.push(
        new Vector3(
          plane.vertices[pt * 3],
          plane.vertices[pt * 3 + 1],
          plane.vertices[pt * 3 + 2]
        )
      );
    }

    // generate faces
    for (let face = 0; face < geo.vertices.length - 2; face++) {
      // this makes a triangle fan, from the first +Y point around
      geo.faces.push(new Face3(0, face + 1, face + 2));
    }

    let material;
    if (this.materials.has(plane.identifier)) {
      // If we have a material stored for this plane already, reuse it
      material = this.materials.get(plane.identifier);
    } else {
      // Otherwise, generate a new color, and assign the color to
      // this plane's ID
      const color = getRandomPaletteColor();
      material = DEFAULT_MATERIAL.clone();
      material.uniforms.backgroundColor.value = color;
      this.materials.set(plane.identifier, material);
    }

    const planeObj = new Mesh(geo, material);

    const mm = plane.modelMatrix;
    planeObj.matrixAutoUpdate = false;
    planeObj.matrix.set(
      mm[0],
      mm[4],
      mm[8],
      mm[12],
      mm[1],
      mm[5],
      mm[9],
      mm[13],
      mm[2],
      mm[6],
      mm[10],
      mm[14],
      mm[3],
      mm[7],
      mm[11],
      mm[15]
    );

    this.add(planeObj);
    return planeObj;
  }
Create and add a new plane visualization based on the given plane.

@param {Object} plane The plane object from WebARonARKit.
@return {number} The number of planes.