@Override
    public Object handleExtension(GltfLoader loader, String parentName, JsonElement parent, JsonElement extension, Object input) throws IOException {
        if (!(input instanceof Texture2D)) {
            logger.log(Level.WARNING, "KHR_texture_transform extension added on an unsupported element, the loaded scene result will be unexpected.");
        }
        Mesh mesh = loader.fetchFromCache("mesh", 0, Mesh.class);
        if (mesh != null) {
            Matrix3f translation = new Matrix3f();
            Matrix3f rotation = new Matrix3f();
            Matrix3f scale = new Matrix3f();
            Integer texCoord = getAsInteger(parent.getAsJsonObject(), "texCoord");
            texCoord = texCoord != null ? texCoord : 0;
            JsonObject jsonObject = extension.getAsJsonObject();
            if (jsonObject.has("offset")) {
                JsonArray jsonArray = jsonObject.getAsJsonArray("offset");
                translation.set(0, 2, jsonArray.get(0).getAsFloat());
                translation.set(1, 2, jsonArray.get(1).getAsFloat());                    
            }
            if (jsonObject.has("rotation")) {
                float rad = jsonObject.get("rotation").getAsFloat();
                rotation.set(0, 0, (float) Math.cos(rad));
                rotation.set(0, 1, (float) Math.sin(rad));
                rotation.set(1, 0, (float) -Math.sin(rad));
                rotation.set(1, 1, (float) Math.cos(rad));
            }                
            if (jsonObject.has("scale")) {
                JsonArray jsonArray = jsonObject.getAsJsonArray("scale");
                scale.set(0, 0, jsonArray.get(0).getAsFloat());
                scale.set(1, 1, jsonArray.get(1).getAsFloat());
            }     
            if (jsonObject.has("texCoord")) {
                texCoord = jsonObject.get("texCoord").getAsInt(); // it overrides the parent's texCoord value
            }                 
            Matrix3f transform = translation.mult(rotation).mult(scale);
            Mesh meshLast = loader.fetchFromCache("textureTransformData", 0, Mesh.class);
            Map<Integer, Matrix3f> transformMap = loader.fetchFromCache("textureTransformData", 1, HashMap.class);
            if (mesh != meshLast || (transformMap != null && transformMap.get(texCoord) == null)) {
                // at this point, we're processing a new mesh or the same mesh as before but for a different UV set
                if (mesh != meshLast) { // it's a new mesh
                    loader.addToCache("textureTransformData", 0, mesh, 2);
                    if (transformMap == null) {
                        transformMap = new HashMap<>(); // initialize transformMap
                        loader.addToCache("textureTransformData", 1, transformMap, 2);
                    } else {
                        transformMap.clear(); // reset transformMap
                    }
                }
                transformMap.put(texCoord, transform); // store the transformation matrix applied to this UV set
                uvTransform(mesh, transform, getVertexBufferType("TEXCOORD_" + texCoord));
                logger.log(Level.FINE, "KHR_texture_transform extension successfully applied."); 
            }
            else {
                // at this point, we're processing the same mesh as before for an already transformed UV set
                Matrix3f transformLast = transformMap.get(texCoord);
                if (!transform.equals(transformLast)) {
                    logger.log(Level.WARNING, "KHR_texture_transform extension: use of different texture transforms for the same mesh's UVs is not supported, the loaded scene result will be unexpected.");
                }
            }
            return input;
        }
        else {
            throw new AssetLoadException("KHR_texture_transform extension applied to a null mesh.");
        }
    }
Scale/rotate/translate UV coordinates based on a transformation matrix.
Code adapted from scaleTextureCoordinates(Vector2f) in jme3-core/src/main/java/com/jme3/scene/Mesh.java
@param mesh The mesh holding the UV coordinates
@param transform The matrix containing the scale/rotate/translate transformations
@param verType The vertex buffer type from which to retrieve the UV coordinates
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/TextureTransformExtensionLoader.java