Updated to work with new Dart and new three.Dart versions.

Simple update and usage of math for better precision