DarthSharkie / Apel-Mod

Apel is a library that brings particle animations to the table with flexible behaviour and a clean developer interface. It promises also lots of predefined shapes & paths to help the developer on their particle scene
Other
0 stars 0 forks source link

ParticleObjects should allow both rotation and offset in constructor, or neither. #32

Closed DarthSharkie closed 4 months ago

DarthSharkie commented 5 months ago

It's inconsistent to allow rotation in the constructor when offset isn't present. Given that both are Vector3f, though, telescoping constructors becomes a problem, since it's impossible to tell whether the lone Vector3f refers to the rotation or the offset. It feels awkward to construct an object and immediately set more properties that weren't available (offset, interceptors, etc.).

Builders would solve this problem!

DarthSharkie commented 4 months ago

Resolved with move to builders. Fixed in https://github.com/GitBrincie212/Apel-Mod/commit/a80858080ba102e827ff2acf14f71d5e7c057254.