google / vector_math.dart

A vector math package for 2D and 3D applications
https://pub.dev/packages/vector_math
Other
311 stars 78 forks source link

Deprecate and remove the `SimplexNoise` classes #270

Open devoncarew opened 2 years ago

devoncarew commented 2 years ago

We plan to deprecate and remove the SimplexNoise classes (both the vector_math and vector_math_64 library versions). Some details and discussion are here: https://github.com/google/vector_math.dart/issues/269.

From investigation, we believe there's little to no use of this API (we couldn't find any existing uses). For people who had been using this API however, it could be worth investigating whether the https://pub.dev/packages/fast_noise package could serve as a replacement.

The deprecation will happen shortly, in this current major version of vector_math. We'd then follow-up with the removal; that could either happen in the current major version (2.0.0) or in a rev'd version (3.0.0), depending on which we determine is least breaking to the ecosystem.

devoncarew commented 2 years ago

Deprecation done in https://github.com/google/vector_math.dart/pull/271.

unicomp21 commented 2 years ago

Why did we do this?!

devoncarew commented 2 years ago

The reasons are laid out in the issue referenced in the first comment here. To briefly in-line that:

We expect existing uses can either migrate to https://pub.dev/packages/fast_noise (or perhaps to a new ecosystem maintained package specific to SimplexNoise).

spydon commented 1 year ago

From investigation, we believe there's little to no use of this API (we couldn't find any existing uses).

You can't have done a very thorough investigation if you didn't even look at Flame which is the package with the most pub likes that depend on vector_math (and uses simplex_noise). :smile:

But we understand your reasons, we'll either migrate or roll our own simplex noise. The fast_noise package hasn't seen any activity in almost two years though so I hope that will get maintenance when needed.

devoncarew commented 1 year ago

You can't have done a very thorough investigation if you didn't even look at Flame which is the package with the most pub likes that depend on vector_math (and uses simplex_noise). 😄

Ah - see the comment here: https://github.com/google/vector_math.dart/issues/269#issuecomment-1217087673. The usage from flame was initially hidden by a bug in our api usage tool.

But we understand your reasons, we'll either migrate or roll our own simplex noise. The fast_noise package hasn't seen any activity in almost two years though so I hope that will get maintenance when needed.

If you do develop or find a reasonable replacement, please do link it back here; thanks!

unicomp21 commented 1 year ago

SimplexNoise is a staple for game programming, right? vector_math was originally created for game programming? While John McCutchan understands game programming, I guess nobody else on the dart team understands game programming? Either way, is there an argument, for at a minimum, putting SimplexNoise in it's own standard dart package? With webassembly on the horizon, game programmers will likely want to use dart in combination with webgpu for game programming? At this point, we will likely want simplex noise implementations for both webgpu and cpu?

unicomp21 commented 1 year ago

https://github.com/stegu/psrdnoise

spydon commented 1 year ago

Either way, is there an argument, for at a minimum, putting SimplexNoise in it's own standard dart package?

You can use the fast_noise package, no need to create a new package with the deprecated class.