Browse Source

changed to use ongenerate in texture transform extension code

Kacey Coley 7 years ago
parent
commit
1e1d570823
1 changed files with 1 additions and 8 deletions
  1. 1 8
      serializers/src/glTF/2.0/Extensions/KHR_texture_transform.ts

+ 1 - 8
serializers/src/glTF/2.0/Extensions/KHR_texture_transform.ts

@@ -92,14 +92,7 @@ module BABYLON.GLTF2.Exporter.Extensions {
                 proceduralTexture.setTexture("textureSampler", babylonTexture);
                 proceduralTexture.setMatrix("textureTransformMat", babylonTexture.getTextureMatrix());
 
-                if (!proceduralTexture.isReady()) {
-                    proceduralTexture._effect.onCompiled = () => {
-                        proceduralTexture.render();
-                        resolve(proceduralTexture);
-                    }
-                }
-                else {
-                    proceduralTexture.render();
+                proceduralTexture.onGenerated = () => {
                     resolve(proceduralTexture);
                 }
             });