public void readCameras() throws IOException {
        if (cameras == null) {
            return;
        }
        for (int i = 0; i < cameras.size(); i++) {
            // Can't access resolution here... actually it's a shame we can't access settings from anywhere.
            // users will have to call resize on the camera.
            Camera cam = new Camera(1, 1);

            JsonObject camObj = cameras.get(i).getAsJsonObject();
            String type = getAsString(camObj, "type");
            assertNotNull(type, "No type defined for camera");
            JsonObject camData = camObj.getAsJsonObject(type);
            if (type.equals("perspective")) {
                float aspectRatio = getAsFloat(camData, "aspectRation", 1f);
                Float yfov = getAsFloat(camData, "yfov");
                assertNotNull(yfov, "No yfov for perspective camera");
                Float zNear = getAsFloat(camData, "znear");
                assertNotNull(zNear, "No znear for perspective camera");
                Float zFar = getAsFloat(camData, "zfar", zNear * 1000f);

                cam.setFrustumPerspective(yfov * FastMath.RAD_TO_DEG, aspectRatio, zNear, zFar);
                cam = customContentManager.readExtensionAndExtras("camera.perspective", camData, cam);

            } else {
                Float xmag = getAsFloat(camData, "xmag");
                assertNotNull(xmag, "No xmag for orthographic camera");
                Float ymag = getAsFloat(camData, "ymag");
                assertNotNull(ymag, "No ymag for orthographic camera");
                Float zNear = getAsFloat(camData, "znear");
                assertNotNull(zNear, "No znear for orthographic camera");
                Float zFar = getAsFloat(camData, "zfar", zNear * 1000f);
                assertNotNull(zFar, "No zfar for orthographic camera");

                cam.setParallelProjection(true);
                cam.setFrustum(zNear, zFar, -xmag, xmag, ymag, -ymag);

                cam = customContentManager.readExtensionAndExtras("camera.orthographic", camData, cam);
            }
            cam = customContentManager.readExtensionAndExtras("camera", camObj, cam);
            addToCache("cameras", i, cam, cameras.size());
        }
    }
GLTF 2.0 loader
Created by Nehon on 07/08/2017.
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java