File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -214,12 +214,12 @@ function getOrCreateColorTextureCoordinates(
214214 if ( useMagnitude ) {
215215 let sum = 0 ;
216216 for ( let compIdx = 0 ; compIdx < numComps ; ++ compIdx ) {
217- const compValue = inputV [ inputIdx + compIdx ] ;
217+ const compValue = Number ( inputV [ inputIdx + compIdx ] ) ;
218218 sum += compValue * compValue ;
219219 }
220220 scalarValue = Math . sqrt ( sum ) ;
221221 } else {
222- scalarValue = inputV [ inputIdx + component ] ;
222+ scalarValue = Number ( inputV [ inputIdx + component ] ) ;
223223 }
224224 if ( useLogScale ) {
225225 scalarValue = Math . log10 ( scalarValue ) ;
Original file line number Diff line number Diff line change @@ -198,12 +198,12 @@ function getOrCreateColorTextureCoordinates(
198198 if ( useMagnitude ) {
199199 let sum = 0 ;
200200 for ( let compIdx = 0 ; compIdx < numComps ; ++ compIdx ) {
201- const compValue = inputV [ inputIdx + compIdx ] ;
201+ const compValue = Number ( inputV [ inputIdx + compIdx ] ) ;
202202 sum += compValue * compValue ;
203203 }
204204 scalarValue = Math . sqrt ( sum ) ;
205205 } else {
206- scalarValue = inputV [ inputIdx + component ] ;
206+ scalarValue = Number ( inputV [ inputIdx + component ] ) ;
207207 }
208208 if ( useLogScale ) {
209209 scalarValue = Math . log10 ( scalarValue ) ;
You can’t perform that action at this time.
0 commit comments