You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WaveScreenModel defines rotationRange and rotationAmountProperty like this:
constrotationRange=newRange(0,1);// @public - amount the 3d view is rotated. 0 means top view, 1 means side view.this.rotationAmountProperty=newNumberProperty(0,{range: rotationRange});
Besides the fact that something named "rotation amount" should be something like a rotation angle, not some magic constants... This leads to code smell elsewhere. There are numerous places where the magic 0 and 1 are interpreted (sometimes to 1 decimal place, for some reason).
This was addressed by @samreid in REVIEW comments. We stuck with rotationAmountProperty with the same semantics. rotationRange was changed to rotationAmountRange.
Related to code review #259.
WaveScreenModel defines
rotationRange
androtationAmountProperty
like this:Besides the fact that something named "rotation amount" should be something like a rotation angle, not some magic constants... This leads to code smell elsewhere. There are numerous places where the magic 0 and 1 are interpreted (sometimes to 1 decimal place, for some reason).
WaveScreenModel:
WaveScreenView:
WaterDropLayer:
WaveMeterNode:
And my personal favorite, Perspective3DNode:
I think you'd be way better off if you:
(1) rename ViewType to ViewpointEnum, with values TOP and SIDE
(2) ditch
rotationRange
androtationAmountProperty
(3) define
viewpointProperty
in WaveScreenModel:Then made changed your logic to make decisions based on whether
viewpointProperty.value
is TOP or SIDE. E.g. in WaveScreenView:WaveScreenView:
The text was updated successfully, but these errors were encountered: