@archvisioninc/canvas 3.2.5 → 3.2.6

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.
@@ -1227,7 +1227,7 @@ export const updateLighting = inboundData => {
1227
1227
  } = position;
1228
1228
  const angleRad = rotation * Math.PI / 180;
1229
1229
  const distance = light?.distance || Math.sqrt(Math.pow(Math.abs(x), 2) + Math.pow(Math.abs(y), 2) + Math.pow(Math.abs(z), 2));
1230
- light.position = newVector(distance * Math.cos(angleRad), 5, distance * Math.sin(angleRad));
1230
+ light.position = newVector(distance * Math.cos(angleRad), distance * Math.tanh(angleRad), distance * Math.sin(angleRad));
1231
1231
  light.setDirectionToTarget(newVector(0, 0, 0));
1232
1232
  light.rotation = rotation;
1233
1233
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archvisioninc/canvas",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "private": false,
5
5
  "main": "dist/Canvas.js",
6
6
  "module": "dist/Canvas.js",
@@ -1220,7 +1220,7 @@ export const updateLighting = inboundData => {
1220
1220
  const { x, y, z } = position;
1221
1221
  const angleRad = (rotation * Math.PI) / 180
1222
1222
  const distance = light?.distance || Math.sqrt(Math.pow(Math.abs(x), 2) + Math.pow(Math.abs(y), 2) + Math.pow(Math.abs(z), 2));
1223
- light.position = newVector(distance * Math.cos(angleRad), 5, distance * Math.sin(angleRad));
1223
+ light.position = newVector(distance * Math.cos(angleRad), distance * Math.tanh(angleRad), distance * Math.sin(angleRad));
1224
1224
  light.setDirectionToTarget(newVector(0, 0, 0));
1225
1225
  light.rotation = rotation;
1226
1226
  }