Open pixelzoom opened 4 years ago
Looks like there are other uses of the dot
import that should be reviewed:
166 return Math.acos( dot.clamp( this.normalized().dot( v.normalized() ), -1, 1 ) );
492 return new dot.Vector2( this.x, this.y );
502 return new dot.Vector4( this.x, this.y, this.z, 1 );
781 return this.setXYZ( dot.Utils.roundSymmetric( this.x ),
782 dot.Utils.roundSymmetric( this.y ),
783 dot.Utils.roundSymmetric( this.z ) );
All the imports seemed used to me, I removed the NOTE that is now covered by the explanation of the ts-expect-error. Also there is still a need for the Quaternion workaround as far as I could see. Anything else @jonathanolson?
The workaround isn't needed, it would just mean we'd have to use dot/js/imports.ts
. So far it seems fine to leave it as-is, but maybe sometime we'll rip off that band-aid?
Cleaned up a few other things above. Look good @zepumph ?
Yes, looks nice, I also made https://github.com/phetsims/dot/issues/118 for when the time is right. Ready to close?
Noted while using Vector3 in Natural Selection, and working on https://github.com/phetsims/dot/issues/100.
In Vector3:
Now that's we're using ES6 modules:
dot.Quaternion
be replaced with an import?