File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -107,23 +107,33 @@ class LightsNode extends Node {
107107 }
108108
109109 /**
110- * Overwrites the default {@link Node#customCacheKey} implementation by including the
111- * light IDs into the cache key.
110+ * Overwrites the default {@link Node#customCacheKey} implementation by including
111+ * light data into the cache key.
112112 *
113113 * @return {number } The custom cache key.
114114 */
115115 customCacheKey ( ) {
116116
117- const lightIDs = [ ] ;
117+ const hashData = [ ] ;
118118 const lights = this . _lights ;
119119
120120 for ( let i = 0 ; i < lights . length ; i ++ ) {
121121
122- lightIDs . push ( lights [ i ] . id ) ;
122+ const light = lights [ i ] ;
123+
124+ hashData . push ( light . id ) ;
125+
126+ if ( light . isSpotLight === true ) {
127+
128+ const hashValue = ( light . map !== null ) ? light . map . id : - 1 ;
129+
130+ hashData . push ( hashValue ) ;
131+
132+ }
123133
124134 }
125135
126- return hashArray ( lightIDs ) ;
136+ return hashArray ( hashData ) ;
127137
128138 }
129139
You can’t perform that action at this time.
0 commit comments