def cube_vertices(position, n):
    """ Return the vertices of the cube at position with size 2*n.

    Note that in `pyglet.window.Window`, x-z plane is the ground plane.
    So here we unpack the position as `(x, z, y)` instead of `(x, y, z)`.

    """
    x, z, y = position

    return [
        # 4 vertices on top face
        x-n, y+n, z-n, x-n, y+n, z+n, x+n, y+n, z+n, x+n, y+n, z-n,
        # on bottom face
        x-n, y-n, z-n, x+n, y-n, z-n, x+n, y-n, z+n, x-n, y-n, z+n,
        # on left face
        x-n, y-n, z-n, x-n, y-n, z+n, x-n, y+n, z+n, x-n, y+n, z-n,
        # on right face
        x+n, y-n, z+n, x+n, y-n, z-n, x+n, y+n, z-n, x+n, y+n, z+n,
        # on front face
        x-n, y-n, z+n, x+n, y-n, z+n, x+n, y+n, z+n, x-n, y+n, z+n,
        # on back face
        x+n, y-n, z-n, x-n, y-n, z-n, x-n, y+n, z-n, x+n, y+n, z-n,
    ]