@galacean/engine-loader 0.0.0-experimental-2.0-game.13 → 0.0.0-experimental-2.0-game.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -6845,6 +6845,14 @@ var SceneLoader = /*#__PURE__*/ function(Loader) {
6845
6845
  if (fog.fogDensity != undefined) scene.fogDensity = fog.fogDensity;
6846
6846
  if (fog.fogColor != undefined) scene.fogColor.copyFrom(fog.fogColor);
6847
6847
  }
6848
+ // parse physics
6849
+ var physics = data.scene.physics;
6850
+ // PhysicsScene has a native backing only when the engine was created with a physics backend.
6851
+ // Keep scene files loadable for render-only engines by ignoring serialized physics settings there.
6852
+ if (physics && engine._physicsInitialized) {
6853
+ if (physics.gravity != undefined) scene.physics.gravity.copyFrom(physics.gravity);
6854
+ if (physics.fixedTimeStep != undefined) scene.physics.fixedTimeStep = physics.fixedTimeStep;
6855
+ }
6848
6856
  // Post Process
6849
6857
  var postProcessData = data.scene.postProcess;
6850
6858
  if (postProcessData) {