|
@@ -1,5 +1,27 @@
|
|
|
import { Color, Matrix3, Matrix4, Vector2, Vector3, Vector4 } from 'three';
|
|
|
|
|
|
+export const getCacheKey = ( object ) => {
|
|
|
+
|
|
|
+ let cacheKey = '{';
|
|
|
+
|
|
|
+ if ( object.isNode === true ) {
|
|
|
+
|
|
|
+ cacheKey += `uuid:"${ object.uuid }",`;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ for ( const property of getNodesKeys( object ) ) {
|
|
|
+
|
|
|
+ cacheKey += `${ property }:${ object[ property ].getCacheKey() },`;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ cacheKey += '}';
|
|
|
+
|
|
|
+ return cacheKey;
|
|
|
+
|
|
|
+};
|
|
|
+
|
|
|
export const getNodesKeys = ( object ) => {
|
|
|
|
|
|
const props = [];
|