@babylonjs/core 6.47.0 → 6.48.0

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.
Files changed (67) hide show
  1. package/Buffers/buffer.align.d.ts +3 -3
  2. package/Buffers/buffer.align.js +1 -1
  3. package/Buffers/buffer.align.js.map +1 -1
  4. package/Engines/Native/nativeInterfaces.d.ts +1 -0
  5. package/Engines/Native/nativeInterfaces.js.map +1 -1
  6. package/Engines/engine.js +9 -9
  7. package/Engines/engine.js.map +1 -1
  8. package/Engines/engineFeatures.d.ts +2 -2
  9. package/Engines/engineFeatures.js.map +1 -1
  10. package/Engines/nativeEngine.d.ts +1 -0
  11. package/Engines/nativeEngine.js +21 -1
  12. package/Engines/nativeEngine.js.map +1 -1
  13. package/Engines/nullEngine.js +1 -1
  14. package/Engines/nullEngine.js.map +1 -1
  15. package/Engines/thinEngine.d.ts +5 -3
  16. package/Engines/thinEngine.js +53 -43
  17. package/Engines/thinEngine.js.map +1 -1
  18. package/Engines/webgpuEngine.js +1 -1
  19. package/Engines/webgpuEngine.js.map +1 -1
  20. package/Loading/sceneLoader.js +2 -1
  21. package/Loading/sceneLoader.js.map +1 -1
  22. package/Materials/Node/Blocks/posterizeBlock.js +1 -0
  23. package/Materials/Node/Blocks/posterizeBlock.js.map +1 -1
  24. package/Maths/index.d.ts +1 -0
  25. package/Maths/index.js +1 -0
  26. package/Maths/index.js.map +1 -1
  27. package/Maths/math.vector.functions.d.ts +22 -0
  28. package/Maths/math.vector.functions.js +28 -0
  29. package/Maths/math.vector.functions.js.map +1 -0
  30. package/Meshes/Node/Blocks/debugBlock.d.ts +1 -1
  31. package/Meshes/Node/Blocks/debugBlock.js +16 -2
  32. package/Meshes/Node/Blocks/debugBlock.js.map +1 -1
  33. package/Meshes/Node/Blocks/geometryPosterizeBlock.js +26 -1
  34. package/Meshes/Node/Blocks/geometryPosterizeBlock.js.map +1 -1
  35. package/Meshes/mesh.js +12 -0
  36. package/Meshes/mesh.js.map +1 -1
  37. package/Misc/khronosTextureContainer2Worker.js +1 -1
  38. package/Misc/khronosTextureContainer2Worker.js.map +1 -1
  39. package/NOTICE.md +10 -0
  40. package/Particles/IParticleSystem.d.ts +3 -1
  41. package/Particles/IParticleSystem.js.map +1 -1
  42. package/Particles/particleSystem.d.ts +1 -1
  43. package/Particles/particleSystem.js +17 -1
  44. package/Particles/particleSystem.js.map +1 -1
  45. package/Particles/thinParticleSystem.d.ts +5 -3
  46. package/Particles/thinParticleSystem.js +6 -4
  47. package/Particles/thinParticleSystem.js.map +1 -1
  48. package/Physics/v2/Plugins/havokPlugin.js +3 -1
  49. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  50. package/Physics/v2/physicsBody.d.ts +6 -1
  51. package/Physics/v2/physicsBody.js +7 -0
  52. package/Physics/v2/physicsBody.js.map +1 -1
  53. package/XR/features/WebXRAbstractFeature.d.ts +2 -1
  54. package/XR/features/WebXRAbstractFeature.js +3 -2
  55. package/XR/features/WebXRAbstractFeature.js.map +1 -1
  56. package/XR/features/WebXRControllerPointerSelection.d.ts +10 -0
  57. package/XR/features/WebXRControllerPointerSelection.js +41 -20
  58. package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
  59. package/XR/features/WebXRControllerTeleportation.d.ts +1 -0
  60. package/XR/features/WebXRControllerTeleportation.js +7 -2
  61. package/XR/features/WebXRControllerTeleportation.js.map +1 -1
  62. package/assetContainer.js +1 -1
  63. package/assetContainer.js.map +1 -1
  64. package/assets/Basis/basis_transcoder.js +24 -0
  65. package/assets/Draco/draco_decoder_gltf.js +35 -0
  66. package/assets/Draco/draco_wasm_wrapper_gltf.js +116 -0
  67. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ import { Vector2, Vector3, Vector4 } from "../../../Maths/math.vector.js";
1
2
  import { RegisterClass } from "../../../Misc/typeStore.js";
2
3
  import { NodeGeometryBlockConnectionPointTypes } from "../Enums/nodeGeometryConnectionPointTypes.js";
3
4
  import { NodeGeometryBlock } from "../nodeGeometryBlock.js";
@@ -19,6 +20,7 @@ export class GeometryPosterizeBlock extends NodeGeometryBlock {
19
20
  this._linkConnectionTypes(0, 1);
20
21
  this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);
21
22
  this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);
23
+ this._inputs[1].acceptedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);
22
24
  }
23
25
  /**
24
26
  * Gets the current class name
@@ -54,7 +56,30 @@ export class GeometryPosterizeBlock extends NodeGeometryBlock {
54
56
  this.output._storedFunction = (state) => {
55
57
  const source = this.value.getConnectedValue(state);
56
58
  const steps = this.steps.getConnectedValue(state);
57
- return Math.floor((source / (1.0 / steps)) * (1.0 / steps));
59
+ let stepVector = steps;
60
+ if (this.steps.type === NodeGeometryBlockConnectionPointTypes.Float) {
61
+ switch (this.value.type) {
62
+ case NodeGeometryBlockConnectionPointTypes.Vector2:
63
+ stepVector = new Vector2(steps, steps);
64
+ break;
65
+ case NodeGeometryBlockConnectionPointTypes.Vector3:
66
+ stepVector = new Vector3(steps, steps, steps);
67
+ break;
68
+ case NodeGeometryBlockConnectionPointTypes.Vector4:
69
+ stepVector = new Vector4(steps, steps, steps, steps);
70
+ break;
71
+ }
72
+ }
73
+ switch (this.value.type) {
74
+ case NodeGeometryBlockConnectionPointTypes.Vector2:
75
+ return new Vector2((source.x / (1.0 / stepVector.x)) * (1.0 / stepVector.x), (source.y / (1.0 / stepVector.y)) * (1.0 / stepVector.y));
76
+ case NodeGeometryBlockConnectionPointTypes.Vector3:
77
+ return new Vector3((source.x / (1.0 / stepVector.x)) * (1.0 / stepVector.x), (source.y / (1.0 / stepVector.y)) * (1.0 / stepVector.y), (source.z / (1.0 / stepVector.z)) * (1.0 / stepVector.z));
78
+ case NodeGeometryBlockConnectionPointTypes.Vector4:
79
+ return new Vector4((source.x / (1.0 / stepVector.x)) * (1.0 / stepVector.x), (source.y / (1.0 / stepVector.y)) * (1.0 / stepVector.y), (source.z / (1.0 / stepVector.z)) * (1.0 / stepVector.z), (source.w / (1.0 / stepVector.w)) * (1.0 / stepVector.w));
80
+ default:
81
+ return Math.floor((source / (1.0 / steps)) * (1.0 / steps));
82
+ }
58
83
  };
59
84
  return this;
60
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"geometryPosterizeBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryPosterizeBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,iBAAiB;IACzD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAEhC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,MAAM,CAAC,CAAC;QAChG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,MAAM,CAAC,CAAC;IACpG,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,wBAAwB,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAES,WAAW;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACpD,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACnD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAClD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;QAChE,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to posterize a value\r\n * @see https://en.wikipedia.org/wiki/Posterization\r\n */\r\nexport class GeometryPosterizeBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryPosterizeBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"steps\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryPosterizeBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the steps input component\r\n */\r\n public get steps(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.value.isConnected || !this.steps.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const source = this.value.getConnectedValue(state);\r\n const steps = this.steps.getConnectedValue(state);\r\n return Math.floor((source / (1.0 / steps)) * (1.0 / steps));\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryPosterizeBlock\", GeometryPosterizeBlock);\r\n"]}
1
+ {"version":3,"file":"geometryPosterizeBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryPosterizeBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,iBAAiB;IACzD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAEhC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,MAAM,CAAC,CAAC;QAChG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,MAAM,CAAC,CAAC;QAChG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,KAAK,CAAC,CAAC;IACnG,CAAC;I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AAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,EACxD,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,EACxD,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAC3D,CAAC;gBACN;oBACI,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;aACnE;QACL,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,gCAAgC,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to posterize a value\r\n * @see https://en.wikipedia.org/wiki/Posterization\r\n */\r\nexport class GeometryPosterizeBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryPosterizeBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"steps\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].acceptedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryPosterizeBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the steps input component\r\n */\r\n public get steps(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.value.isConnected || !this.steps.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const source = this.value.getConnectedValue(state);\r\n const steps = this.steps.getConnectedValue(state);\r\n let stepVector = steps;\r\n\r\n if (this.steps.type === NodeGeometryBlockConnectionPointTypes.Float) {\r\n switch (this.value.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n stepVector = new Vector2(steps, steps);\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n stepVector = new Vector3(steps, steps, steps);\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n stepVector = new Vector4(steps, steps, steps, steps);\r\n break;\r\n }\r\n }\r\n\r\n switch (this.value.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n return new Vector2((source.x / (1.0 / stepVector.x)) * (1.0 / stepVector.x), (source.y / (1.0 / stepVector.y)) * (1.0 / stepVector.y));\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n return new Vector3(\r\n (source.x / (1.0 / stepVector.x)) * (1.0 / stepVector.x),\r\n (source.y / (1.0 / stepVector.y)) * (1.0 / stepVector.y),\r\n (source.z / (1.0 / stepVector.z)) * (1.0 / stepVector.z)\r\n );\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n return new Vector4(\r\n (source.x / (1.0 / stepVector.x)) * (1.0 / stepVector.x),\r\n (source.y / (1.0 / stepVector.y)) * (1.0 / stepVector.y),\r\n (source.z / (1.0 / stepVector.z)) * (1.0 / stepVector.z),\r\n (source.w / (1.0 / stepVector.w)) * (1.0 / stepVector.w)\r\n );\r\n default:\r\n return Math.floor((source / (1.0 / steps)) * (1.0 / steps));\r\n }\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryPosterizeBlock\", GeometryPosterizeBlock);\r\n"]}
package/Meshes/mesh.js CHANGED
@@ -3016,7 +3016,11 @@ export class Mesh extends AbstractMesh {
3016
3016
  serializationObject.receiveShadows = this.receiveShadows;
3017
3017
  serializationObject.billboardMode = this.billboardMode;
3018
3018
  serializationObject.visibility = this.visibility;
3019
+ serializationObject.alwaysSelectAsActiveMesh = this.alwaysSelectAsActiveMesh;
3019
3020
  serializationObject.checkCollisions = this.checkCollisions;
3021
+ serializationObject.ellipsoid = this.ellipsoid.asArray();
3022
+ serializationObject.ellipsoidOffset = this.ellipsoidOffset.asArray();
3023
+ serializationObject.doNotSyncBoundingInfo = this.doNotSyncBoundingInfo;
3020
3024
  serializationObject.isBlocker = this.isBlocker;
3021
3025
  serializationObject.overrideMaterialSideOrientation = this.overrideMaterialSideOrientation;
3022
3026
  // Parent
@@ -3278,6 +3282,7 @@ export class Mesh extends AbstractMesh {
3278
3282
  mesh.setEnabled(parsedMesh.isEnabled);
3279
3283
  mesh.isVisible = parsedMesh.isVisible;
3280
3284
  mesh.infiniteDistance = parsedMesh.infiniteDistance;
3285
+ mesh.alwaysSelectAsActiveMesh = !!parsedMesh.alwaysSelectAsActiveMesh;
3281
3286
  mesh.showBoundingBox = parsedMesh.showBoundingBox;
3282
3287
  mesh.showSubMeshesBoundingBox = parsedMesh.showSubMeshesBoundingBox;
3283
3288
  if (parsedMesh.applyFog !== undefined) {
@@ -3297,6 +3302,13 @@ export class Mesh extends AbstractMesh {
3297
3302
  mesh.visibility = parsedMesh.visibility;
3298
3303
  }
3299
3304
  mesh.checkCollisions = parsedMesh.checkCollisions;
3305
+ mesh.doNotSyncBoundingInfo = !!parsedMesh.doNotSyncBoundingInfo;
3306
+ if (parsedMesh.ellipsoid) {
3307
+ mesh.ellipsoid = Vector3.FromArray(parsedMesh.ellipsoid);
3308
+ }
3309
+ if (parsedMesh.ellipsoidOffset) {
3310
+ mesh.ellipsoidOffset = Vector3.FromArray(parsedMesh.ellipsoidOffset);
3311
+ }
3300
3312
  if (parsedMesh.overrideMaterialSideOrientation !== undefined) {
3301
3313
  mesh.overrideMaterialSideOrientation = parsedMesh.overrideMaterialSideOrientation;
3302
3314
  }