private static void checkImage(Image image) {
//        if (image.getDepth() != 1)
//            throw new IllegalArgumentException("3D/Array images not allowed");

        if (image.getWidth() != image.getHeight()) {
            throw new IllegalArgumentException("Image width and height must be the same");
        }

        if (image.getMultiSamples() != 1) {
            throw new IllegalArgumentException("Multisample textures not allowed");
        }
    }
Create a sky using the given cubemap or spheremap texture.

@param assetManager from which to load materials
@param textureName the path to the texture asset to use
@param envMapType see {@link EnvMapType}
@return a new spatial representing the sky, ready to be attached to the
scene graph
jme3-core/src/main/java/com/jme3/util/SkyFactory.java