Skip to content

Commit

Permalink
fixes initial sun positioning according to Environment Configuration (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodeTherapy authored Aug 8, 2024
1 parent 1d785e6 commit 0de551e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/3d-web-client-core/src/rendering/composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,13 @@ export class Composer {
}
if (typeof this.environmentConfiguration?.sun?.azimuthalAngle === "number") {
sunValues.sunPosition.sunAzimuthalAngle = this.environmentConfiguration.sun.azimuthalAngle;
this.sun?.setAzimuthalAngle(this.environmentConfiguration.sun.azimuthalAngle);
this.sun?.setAzimuthalAngle(
this.environmentConfiguration.sun.azimuthalAngle * (Math.PI / 180),
);
}
if (typeof this.environmentConfiguration?.sun?.polarAngle === "number") {
sunValues.sunPosition.sunPolarAngle = this.environmentConfiguration.sun.polarAngle;
this.sun?.setPolarAngle(this.environmentConfiguration.sun.polarAngle);
this.sun?.setPolarAngle(this.environmentConfiguration.sun.polarAngle * (Math.PI / 180));
}
}

Expand Down

0 comments on commit 0de551e

Please sign in to comment.