dmah42 / dart-box2d

Box2D for Dart
http://dart-lang.github.io/dart-box2d/
34 stars 5 forks source link

Upgrade to latest vector_math release #30

Closed johnmccutchan closed 10 years ago

johnmccutchan commented 10 years ago

Require vector_math 1.4.2 Fix benchmark_runner to be compatible with Dart 1.0 Switch from vector_math to vector_math_64 (gives speedup).

dmah42 commented 10 years ago

Looks like there's some conflicts - did you pull the latest?

I thought I already had everything 1.0 compatible...

johnmccutchan commented 10 years ago

My bad, I was working on a stale checkout. Should be good now.

dmah42 commented 10 years ago

does the 64-bit version add the speedup to 32-bit machines as well?

if so, why not just have the 64-bit version?

johnmccutchan commented 10 years ago

The 64 is in reference to Float64List. It will result in a speedup on both 32-bit and 64-bit machines.

The reason vector_math has both is that WebGL only accepts Float32Lists.

dmah42 commented 10 years ago

sounds good. so if someone wants to use webgl and box2d, they're going to have to translate the vector types between the two? so they'd be dependent on both versions.. will that work?

johnmccutchan commented 10 years ago

Of course. Dart supports loading libraries with prefixes to avoid class name conflicts.

dmah42 commented 10 years ago

and the cost of translating from Float64List to Float32List is an expense that we just have to take, but is presumably less than the constant single/double conversion happening right now. ok :)