@onerjs/core 8.37.5 → 8.37.6

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
@@ -2034,7 +2034,7 @@ export class Mesh extends AbstractMesh {
2034
2034
  renderingMesh.hasThinInstances ||
2035
2035
  (!!this._userInstancedBuffersStorage && !subMesh.getMesh()._internalAbstractMeshDataInfo._actAsRegularMesh);
2036
2036
  const instanceDataStorage = this._instanceDataStorage;
2037
- const material = subMesh.getMaterial();
2037
+ const material = scene.materialsEnabled ? subMesh.getMaterial() : scene.defaultMaterial;
2038
2038
  if (!material) {
2039
2039
  if (oldCamera) {
2040
2040
  oldCamera.maxZ = oldCameraMaxZ;