@xeokit/xeokit-sdk 2.6.68 → 2.6.69

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xeokit/xeokit-sdk",
3
- "version": "2.6.68",
3
+ "version": "2.6.69",
4
4
  "description": "3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision",
5
5
  "module": "./dist/xeokit-sdk.es.js",
6
6
  "main": "./dist/xeokit-sdk.cjs.js",
@@ -4951,9 +4951,10 @@ const math = {
4951
4951
 
4952
4952
  // Calculate clip space coordinates, which will be in range
4953
4953
  // of x=[-1..1] and y=[-1..1], with y=(+1) at top
4954
-
4955
- const clipX = 2 * canvasPos[0] / canvas.width - 1; // Calculate clip space coordinates
4956
- const clipY = 1 - 2 * canvasPos[1] / canvas.height;
4954
+ // clientWidth/Height needs to be used in case canvas.width/height is scaled down,
4955
+ // but not reflecting client dimensions (e.g. when using FastNavPlugin)
4956
+ const clipX = 2 * canvasPos[0] / canvas.clientWidth - 1; // Calculate clip space coordinates
4957
+ const clipY = 1 - 2 * canvasPos[1] / canvas.clientHeight;
4957
4958
 
4958
4959
  clipToWorld(clipX, clipY, -1, isOrtho, vec4Near);
4959
4960