sebavan 5 anos atrás
pai
commit
64b66b18ac
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      src/Loading/Plugins/babylonFileLoader.ts

+ 4 - 4
src/Loading/Plugins/babylonFileLoader.ts

@@ -39,7 +39,7 @@ export var _BabylonLoaderRegistered = true;
  * Unfortunately in ES6, we need to manually inject them into the plugin.
  * Unfortunately in ES6, we need to manually inject them into the plugin.
  * So you could set this variable to your engine import to make it work.
  * So you could set this variable to your engine import to make it work.
  */
  */
-export var PhysicsEngine: any = undefined;
+export var LoaderInjectedPhysicsEngine: any = undefined;
 
 
 var parseMaterialById = (id: string, parsedData: any, scene: Scene, rootUrl: string) => {
 var parseMaterialById = (id: string, parsedData: any, scene: Scene, rootUrl: string) => {
     for (var index = 0, cache = parsedData.materials.length; index < cache; index++) {
     for (var index = 0, cache = parsedData.materials.length; index < cache; index++) {
@@ -710,11 +710,11 @@ SceneLoader.RegisterPlugin({
             if (parsedData.physicsEnabled) {
             if (parsedData.physicsEnabled) {
                 var physicsPlugin;
                 var physicsPlugin;
                 if (parsedData.physicsEngine === "cannon") {
                 if (parsedData.physicsEngine === "cannon") {
-                    physicsPlugin = new CannonJSPlugin(undefined, undefined, PhysicsEngine);
+                    physicsPlugin = new CannonJSPlugin(undefined, undefined, LoaderInjectedPhysicsEngine);
                 } else if (parsedData.physicsEngine === "oimo") {
                 } else if (parsedData.physicsEngine === "oimo") {
-                    physicsPlugin = new OimoJSPlugin(undefined, PhysicsEngine);
+                    physicsPlugin = new OimoJSPlugin(undefined, LoaderInjectedPhysicsEngine);
                 } else if (parsedData.physicsEngine === "ammo") {
                 } else if (parsedData.physicsEngine === "ammo") {
-                    physicsPlugin = new AmmoJSPlugin(undefined, PhysicsEngine, undefined);
+                    physicsPlugin = new AmmoJSPlugin(undefined, LoaderInjectedPhysicsEngine, undefined);
                 }
                 }
                 log = "\tPhysics engine " + (parsedData.physicsEngine ? parsedData.physicsEngine : "oimo") + " enabled\n";
                 log = "\tPhysics engine " + (parsedData.physicsEngine ? parsedData.physicsEngine : "oimo") + " enabled\n";
                 //else - default engine, which is currently oimo
                 //else - default engine, which is currently oimo