瀏覽代碼

Patch 29 (#10)

* Update what's new.md
aWeirdo 6 年之前
父節點
當前提交
5a096044e1
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 2 0
      dist/preview release/what's new.md
  2. 4 2
      src/Engines/engine.ts

+ 2 - 0
dist/preview release/what's new.md

@@ -15,6 +15,7 @@
 
 ### Engine
 - Added preprocessors for shaders to improve how shaders are compiled for WebGL1/2 or WebGPU ([Deltakosh](https://github.com/deltakosh/))
+- Added enterPointerlock and exitPointerlock (Separated from enterFullscreen) ([aWeirdo](https://github.com/aWeirdo/))
 
 ### Inspector
 - Added support for `ShadowGenerator` ([Deltakosh](https://github.com/deltakosh/))
@@ -42,5 +43,6 @@
 - A scene's input manager not adding key listeners when the canvas is already focused ([Poolminer](https://github.com/Poolminer))
 - Runtime animation `goToFrame` when going back in time now correctly triggers future events when reached ([zakhenry](https://github.com/zakhenry))
 - Fixed bug in Ray.intersectsTriangle where the barycentric coordinates `bu` and `bv` being returned is actually `bv` and `bw`. ([bghgary](https://github.com/bghgary))
+- Do not call onError when creating a texture when falling back to another loader ([TrevorDev](https://github.com/TrevorDev))
 
 ## Breaking changes

+ 4 - 2
src/Engines/engine.ts

@@ -4240,7 +4240,8 @@ export class Engine {
                     customFallback = true;
                     excludeLoaders.push(loader);
                     Tools.Warn((loader.constructor as any).name + " failed when trying to load " + texture.url + ", falling back to the next supported loader");
-                    this.createTexture(urlArg, noMipmap, texture.invertY, scene, samplingMode, null, null, buffer, texture, undefined, undefined, excludeLoaders);
+                    this.createTexture(urlArg, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture, undefined, undefined, excludeLoaders);
+                    return;
                 }
             }
 
@@ -4249,7 +4250,8 @@ export class Engine {
                     texture.onLoadedObservable.remove(onLoadObserver);
                 }
                 if (Tools.UseFallbackTexture) {
-                    this.createTexture(Tools.fallbackTexture, noMipmap, texture.invertY, scene, samplingMode, null, null, buffer, texture);
+                    this.createTexture(Tools.fallbackTexture, noMipmap, texture.invertY, scene, samplingMode, null, onError, buffer, texture);
+                    return;
                 }
             }