@archvisioninc/canvas 3.2.7 → 3.2.8

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.
@@ -1212,7 +1212,7 @@ export const updateLighting = inboundData => {
1212
1212
  if (distance !== undefined) {
1213
1213
  const rotation = light?.rotation || 0;
1214
1214
  const angleRad = rotation * Math.PI / 180;
1215
- light.position = newVector(distance * Math.cos(angleRad), 5, distance * Math.sin(angleRad));
1215
+ light.position = newVector(distance * Math.cos(angleRad), distance * Math.tanh(angleRad), distance * Math.sin(angleRad));
1216
1216
  light.setDirectionToTarget(newVector(0, 0, 0));
1217
1217
  light.distance = distance;
1218
1218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archvisioninc/canvas",
3
- "version": "3.2.7",
3
+ "version": "3.2.8",
4
4
  "private": false,
5
5
  "main": "dist/Canvas.js",
6
6
  "module": "dist/Canvas.js",
@@ -1210,7 +1210,7 @@ export const updateLighting = inboundData => {
1210
1210
  if (distance !== undefined) {
1211
1211
  const rotation = light?.rotation || 0;
1212
1212
  const angleRad = (rotation * Math.PI) / 180
1213
- light.position = newVector(distance * Math.cos(angleRad), 5, distance * Math.sin(angleRad));
1213
+ light.position = newVector(distance * Math.cos(angleRad), distance * Math.tanh(angleRad), distance * Math.sin(angleRad));
1214
1214
  light.setDirectionToTarget(newVector(0, 0, 0));
1215
1215
  light.distance = distance;
1216
1216
  }