def makeVertexTemplatesFromJsonModel(fromVertices, toVertices, uv):
    """
    This is similar to makeVertexTemplates but is a more convenient
    when reading off of the json model files.
    :param fromVertices: from
    :param toVertices:   to
    :param uv:           keywords uv map
    :return:             template for a cube
    """
    xmin = fromVertices[0] / 16.
    xmax = toVertices[0] / 16.
    ymin = fromVertices[1] / 16.
    ymax = toVertices[1] / 16.
    zmin = fromVertices[2] / 16.
    zmax = toVertices[2] / 16.
    return numpy.array([
        # FaceXIncreasing:
        [[xmax, ymin, zmax, uv["east"][0], uv["east"][3], 0x0b],
         [xmax, ymin, zmin, uv["east"][2], uv["east"][3], 0x0b],
         [xmax, ymax, zmin, uv["east"][2], uv["east"][1], 0x0b],
         [xmax, ymax, zmax, uv["east"][0], uv["east"][1], 0x0b],
        ],

        # FaceXDecreasing:
        [[xmin, ymin, zmin, uv["west"][0], uv["west"][3], 0x0b],
         [xmin, ymin, zmax, uv["west"][2], uv["west"][3], 0x0b],
         [xmin, ymax, zmax, uv["west"][2], uv["west"][1], 0x0b],
         [xmin, ymax, zmin, uv["west"][0], uv["west"][1], 0x0b]],


        # FaceYIncreasing:
        [[xmin, ymax, zmin, uv["up"][0], uv["up"][1], 0x11],  # ne
         [xmin, ymax, zmax, uv["up"][0], uv["up"][3], 0x11],  # nw
         [xmax, ymax, zmax, uv["up"][2], uv["up"][3], 0x11],  # sw
         [xmax, ymax, zmin, uv["up"][2], uv["up"][1], 0x11]],  # se

        # FaceYDecreasing:
        [[xmin, ymin, zmin, uv["down"][0], uv["down"][3], 0x08],
         [xmax, ymin, zmin, uv["down"][2], uv["down"][3], 0x08],
         [xmax, ymin, zmax, uv["down"][2], uv["down"][1], 0x08],
         [xmin, ymin, zmax, uv["down"][0], uv["down"][1], 0x08]],

        # FaceZIncreasing:
        [[xmin, ymin, zmax, uv["south"][0], uv["south"][3], 0x0d],
         [xmax, ymin, zmax, uv["south"][2], uv["south"][3], 0x0d],
         [xmax, ymax, zmax, uv["south"][2], uv["south"][1], 0x0d],
         [xmin, ymax, zmax, uv["south"][0], uv["south"][1], 0x0d]],

        # FaceZDecreasing:
        [[xmax, ymin, zmin, uv["north"][0], uv["north"][3], 0x0d],
         [xmin, ymin, zmin, uv["north"][2], uv["north"][3], 0x0d],
         [xmin, ymax, zmin, uv["north"][2], uv["north"][1], 0x0d],
         [xmax, ymax, zmin, uv["north"][0], uv["north"][1], 0x0d],
        ],

    ])

    This is similar to makeVertexTemplates but is a more convenient
    when reading off of the json model files.
    :param fromVertices: from
    :param toVertices:   to
    :param uv:           keywords uv map
    :return:             template for a cube
    
renderer.py