|
@@ -169,7 +169,7 @@
|
|
|
const cachedAttributes = currentState.attributes;
|
|
|
const geometryAttributes = geometry.attributes;
|
|
|
|
|
|
- if ( Object.keys( cachedAttributes ).length !== Object.keys( geometryAttributes ).length ) return true;
|
|
|
+ let attributesNum = 0;
|
|
|
|
|
|
for ( const key in geometryAttributes ) {
|
|
|
|
|
@@ -182,8 +182,12 @@
|
|
|
|
|
|
if ( cachedAttribute.data !== geometryAttribute.data ) return true;
|
|
|
|
|
|
+ attributesNum ++;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+ if ( currentState.attributesNum !== attributesNum ) return true;
|
|
|
+
|
|
|
if ( currentState.index !== index ) return true;
|
|
|
|
|
|
return false;
|
|
@@ -194,6 +198,7 @@
|
|
|
|
|
|
const cache = {};
|
|
|
const attributes = geometry.attributes;
|
|
|
+ let attributesNum = 0;
|
|
|
|
|
|
for ( const key in attributes ) {
|
|
|
|
|
@@ -210,9 +215,12 @@
|
|
|
|
|
|
cache[ key ] = data;
|
|
|
|
|
|
+ attributesNum ++;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
currentState.attributes = cache;
|
|
|
+ currentState.attributesNum = attributesNum;
|
|
|
|
|
|
currentState.index = index;
|
|
|
|