@pirireis/webglobeplugins 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -164,10 +164,10 @@ class Logic {
|
|
|
164
164
|
createAttributeLoader(startPotision2DBufferObj, startPotision3DBufferObj, endPosition2DBufferObj, endPosition3DBufferObj, dashRatioBufferObj, dashOpacityBufferObj, colorBufferObj) {
|
|
165
165
|
const divisor = 1;
|
|
166
166
|
return new AttributeLoader(this.gl, [
|
|
167
|
-
{ bufferAndReadInfo: startPotision2DBufferObj, index: 0, size: 2, options: { divisor } },
|
|
168
|
-
{ bufferAndReadInfo: startPotision3DBufferObj, index: 1, size: 3, options: { divisor } },
|
|
169
|
-
{ bufferAndReadInfo: endPosition2DBufferObj, index: 2, size: 2, options: { divisor } },
|
|
170
|
-
{ bufferAndReadInfo: endPosition3DBufferObj, index: 3, size: 3, options: { divisor } },
|
|
167
|
+
{ bufferAndReadInfo: startPotision2DBufferObj, index: 0, size: 2, options: { divisor, escapeValues: [NaN, NaN] } },
|
|
168
|
+
{ bufferAndReadInfo: startPotision3DBufferObj, index: 1, size: 3, options: { divisor, escapeValues: [NaN, NaN, NaN] } },
|
|
169
|
+
{ bufferAndReadInfo: endPosition2DBufferObj, index: 2, size: 2, options: { divisor, escapeValues: [NaN, NaN] } },
|
|
170
|
+
{ bufferAndReadInfo: endPosition3DBufferObj, index: 3, size: 3, options: { divisor, escapeValues: [NaN, NaN, NaN] } },
|
|
171
171
|
{ bufferAndReadInfo: dashRatioBufferObj, index: 4, size: 1, options: { divisor, escapeValues: [escapeValue] } },
|
|
172
172
|
{ bufferAndReadInfo: dashOpacityBufferObj, index: 5, size: 1, options: { divisor, escapeValues: [escapeValue] } },
|
|
173
173
|
{ bufferAndReadInfo: colorBufferObj, index: 6, size: 4, options: { divisor, escapeValues: [escapeValue, escapeValue, escapeValue, escapeValue] } }
|
|
@@ -483,7 +483,7 @@ function getGlStates(gl) {
|
|
|
483
483
|
function roundTo7(n) {
|
|
484
484
|
// Keep at most 7 digits after the decimal (degrees), then quantize to float32
|
|
485
485
|
// to match GPU attribute precision and make identity comparisons stable.
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
return Math.fround(n);
|
|
486
|
+
const rounded = Math.round(n * 1e7) / 1e7;
|
|
487
|
+
return Math.fround(rounded);
|
|
488
|
+
// return Math.fround(n);
|
|
489
489
|
}
|