|
|
@@ -173,6 +173,7 @@ class NodeMaterialObserver {
|
|
|
geometry: {
|
|
|
id: geometry.id,
|
|
|
attributes: this.getAttributesData( geometry.attributes ),
|
|
|
+ indexId: geometry.index ? geometry.index.id : null,
|
|
|
indexVersion: geometry.index ? geometry.index.version : null,
|
|
|
drawRange: { start: geometry.drawRange.start, count: geometry.drawRange.count }
|
|
|
},
|
|
|
@@ -232,7 +233,8 @@ class NodeMaterialObserver {
|
|
|
const attribute = attributes[ name ];
|
|
|
|
|
|
attributesData[ name ] = {
|
|
|
- version: attribute.version
|
|
|
+ id: attribute.id,
|
|
|
+ version: attribute.version,
|
|
|
};
|
|
|
|
|
|
}
|
|
|
@@ -423,8 +425,9 @@ class NodeMaterialObserver {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if ( storedAttributeData.version !== attribute.version ) {
|
|
|
+ if ( storedAttributeData.id !== attribute.id || storedAttributeData.version !== attribute.version ) {
|
|
|
|
|
|
+ storedAttributeData.id = attribute.id;
|
|
|
storedAttributeData.version = attribute.version;
|
|
|
return false;
|
|
|
|
|
|
@@ -435,11 +438,14 @@ class NodeMaterialObserver {
|
|
|
// check index
|
|
|
|
|
|
const index = geometry.index;
|
|
|
+ const storedIndexId = storedGeometryData.id;
|
|
|
const storedIndexVersion = storedGeometryData.indexVersion;
|
|
|
+ const currentIndexId = index ? index.id : null;
|
|
|
const currentIndexVersion = index ? index.version : null;
|
|
|
|
|
|
- if ( storedIndexVersion !== currentIndexVersion ) {
|
|
|
+ if ( storedIndexId !== currentIndexId || storedIndexVersion !== currentIndexVersion ) {
|
|
|
|
|
|
+ storedGeometryData.id = currentIndexId;
|
|
|
storedGeometryData.indexVersion = currentIndexVersion;
|
|
|
return false;
|
|
|
|