Skip to content

Commit b34f2c7

Browse files
munozcofinetjul
authored andcommitted
fix(Mapper): add BigInt support in Mapper and Mapper2D
1 parent 1b45543 commit b34f2c7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/Rendering/Core/Mapper/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

Sources/Rendering/Core/Mapper2D/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)