AMereBagatelle / fabricskyboxes

Custom skyboxes mod for Fabric
MIT License
76 stars 22 forks source link

Rotation format improvement #79

Closed FlashyReese closed 1 year ago

FlashyReese commented 1 year ago

Refactor Summary

This PR focuses on improving the rotation system with the following changes:

Breaking Changes

Please note that this refactor will break resource packs that have used the rotationSpeed property. The property has been renamed to rotationSpeedY, and its default value has been changed to 0. Two new fields have been added to control pitch and roll: rotationSpeedX and rotationSpeedZ, which also have a default value of 0. The shouldRotate property has been removed from the properties object. Rotation speed axes are now determined by the rotation object. By default, all rotation speed axes are set to 0, so they won't rotate at all. If your resource pack relies on the shouldRotate property, it will no longer function as expected and will need to be updated accordingly.

Motivation

The motivation behind these changes is to improve the flexibility and functionality of the rotation system, giving users more control over the rotation of skyboxes. By adding separate fields for pitch and roll, users can now have more fine-grained control over the skybox's rotation in a more intuitive way. Additionally, the removal of the hardcoded offset for rotationSpeed will prevent any unintended rotation behavior, making it easier for users to achieve the desired rotation effects while also simplifying and making the system more consistent with its intended usage.

With the removal of the shouldRotate property, users will no longer need to specify it in the properties object. Instead, rotation axes are determined by the rotation object. By default, all rotation speed axes are set to 0, so they won't rotate at all. This simplifies the rotation system and makes it more consistent with its intended usage.

FlashyReese commented 1 year ago

Only merge this when https://github.com/AMereBagatelle/fabricskyboxes/pull/80 is ready.

FlashyReese commented 1 year ago

Some small changes: