Our fundamental math types (Cartesian, matrices, quaternions, etc.) have prototype and non-prototype functions, e.g., u.add(v) and Cartesian3.add(u, v).
I think I advocated, perhaps even insisted on this at some point. However, after maintaining and using these types, including using them from web workers, I’d like us to drop the prototype versions. They are redundant, more code to doc, more code to test, more API for users to understand, and aren’t usable from web workers when the prototype is lost and other cases when we don’t know if we have a Cartesian3, for example. I also haven’t found them to make code any cleaner. I’d rather all the consuming code be consistent and there be less code for these fundamental types. Err, I’d have to see it in the profiler, but the prototype functions could be a tad slower since they generally delegate to the non-prototype functions.
I don’t necessarily want to do this right away (but soon and swift is best), but would just like to submit an issue.
Thoughts?
Patrick