Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate 1D noise? #16

Open
finscn opened this issue Sep 10, 2017 · 7 comments
Open

How to generate 1D noise? #16

finscn opened this issue Sep 10, 2017 · 7 comments

Comments

@finscn
Copy link

finscn commented Sep 10, 2017

How to generate 1D noise by simplex-noise.js ?

Thanks.

@jwagner
Copy link
Owner

jwagner commented Sep 19, 2017

simplex-noise.js does not have a function specifically for 1D noise. You could use the 2D one just along one axis and fix the other one or derive one from the code if performance is a concern.

@finscn
Copy link
Author

finscn commented Sep 20, 2017

@jwagner , thanks for your reply . Why simplex-noise don't support "1D noise" ? Is '1D noise' is hard to implement ? or it's useless in real world ?
Is '1D noise' in your plan ? ( I hope so , please )

@jwagner
Copy link
Owner

jwagner commented Sep 20, 2017

It's not hard to implement but simplex noise (as in the algorithm) is mostly useful in dimensions.
For the 1D case you can just simply linearly interpolate. The main reason it's not in the library is that I didn't have a need for it. What are you trying to do with 1D noise?

@finscn
Copy link
Author

finscn commented Sep 21, 2017

I need it in my web game. I like this lib , but because 1D , I have to use another one . it's so sad.

@paulrobello
Copy link

1D noise is useful for generating a terrain height map for 2d side view games like the popular Worms series.

@finscn
Copy link
Author

finscn commented Apr 23, 2019

Is there any news about 1D ?

@jwagner
Copy link
Owner

jwagner commented May 4, 2019

@finscn for now just use 2D while fixing 1 variable. It's not optimal performance wise but for the vast majority of 1d use cases it should do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants