@onerjs/core 8.47.2 → 8.47.3

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/Meshes/mesh.js CHANGED
@@ -3398,7 +3398,7 @@ export class Mesh extends AbstractMesh {
3398
3398
  // Physics
3399
3399
  //TODO implement correct serialization for physics impostors.
3400
3400
  if (this.getScene()._getComponent(SceneComponentConstants.NAME_PHYSICSENGINE)) {
3401
- const impostor = this.getPhysicsImpostor();
3401
+ const impostor = this.getPhysicsImpostor?.();
3402
3402
  if (impostor) {
3403
3403
  serializationObject.physicsMass = impostor.getParam("mass");
3404
3404
  serializationObject.physicsFriction = impostor.getParam("friction");
@@ -3439,7 +3439,7 @@ export class Mesh extends AbstractMesh {
3439
3439
  // Physics
3440
3440
  //TODO implement correct serialization for physics impostors.
3441
3441
  if (this.getScene()._getComponent(SceneComponentConstants.NAME_PHYSICSENGINE)) {
3442
- const impostor = instance.getPhysicsImpostor();
3442
+ const impostor = instance.getPhysicsImpostor?.();
3443
3443
  if (impostor) {
3444
3444
  serializationInstance.physicsMass = impostor.getParam("mass");
3445
3445
  serializationInstance.physicsFriction = impostor.getParam("friction");