you can get rid of these JS implementations and use the Vec3 class versions...