Browse Source

Merge pull request #7012 from syntheticmagus/constructorForUnderlyingNativeEngine

Construct underlying engine for NativeEngine
David Catuhe 5 years ago
parent
commit
6c5ee74cb3
2 changed files with 3 additions and 3 deletions
  1. 1 1
      dist/preview release/what's new.md
  2. 2 2
      src/Engines/nativeEngine.ts

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

@@ -174,7 +174,7 @@
 - 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))
 - Context loss should not cause PBR materials to render black or instances to stop rendering ([TrevorDev](https://github.com/TrevorDev))
-- Only cast pointer ray input when pointer is locked in webVR ([TrevorDev](https://github.com/TrevorDev))
+- Only cast pointer ray input when pointer is locked in WebVR ([TrevorDev](https://github.com/TrevorDev))
 - Fix Right Hand coordinates with directional lights and shadows, hemispheric lights and spot lights ([CedricGuillemet](https://github.com/CedricGuillemet))
 - Avoid using default utility layer in gizmo manager to support multiple scenes ([TrevorDev](https://github.com/TrevorDev))
 - Fix bug when adding and removing observers in quick succession ([sable](https://github.com/thscott))

+ 2 - 2
src/Engines/nativeEngine.ts

@@ -170,11 +170,11 @@ class NativeTexture extends InternalTexture {
 }
 
 /** @hidden */
-declare var nativeEngine: INativeEngine;
+declare var _native: any;
 
 /** @hidden */
 export class NativeEngine extends Engine {
-    private readonly _native: INativeEngine = nativeEngine;
+    private readonly _native: INativeEngine = new _native.Engine();
 
     public getHardwareScalingLevel(): number {
         return 1.0;