-
-
Notifications
You must be signed in to change notification settings - Fork 999
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
@remotion/noise #1401
@remotion/noise #1401
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Awesome, you nailed even the details! 🙌 Quality work! - const noise = createNoise2D('my-seed')(px, frame)
+ const noise = noise2D('my-seed', px, frame) And cache the expensive initialization via WeakMap. |
Thanks @JonnyBurger. I'm glad you liked it. Also, I'd actually consider to leave both implementations: In first case scenario, user wants to use it on the go: const n1p1 = noise2D('seed-1', x1, y1);
const n1p2 = noise2D('seed-1', x2, y2);
const n2p1 = noise2D('seed-2', x1, y1);
const n2p2 = noise2D('seed-2', x2, y2); But on the other hand I think it would be helpful to have the ability to just create the "instanced" noise function which doesn't require const myNoise = createNoise2D('my-seed');
const p1 = myNoise(x1, y1);
const p2 = myNoise(x2, y2); |
@satelllte No action required on your side I think, I'll confirm that by tomorrow and get it shipped myself! I like it more if there is just one way of doing it, also to make it easier to teach in the future. I prefer the pure functional way over the two-step and think that sometimes the seed is redundant is an okay tradeoff. But if you strongly believe I should not change it, I have an open ear. |
@JonnyBurger thanks Jonny. As you wish, it's your repo :) |
Thanks for understanding! Tried to simplify the example as well, to hopefully make it easy to grasp what noise is all about. I see you contributed to simplex-noise as well, this is awesome! Ready to ship 🚀 Thanks a lot for this super excellent PR 🙌 |
@satelllte Do you remember how long you spent on this issue? BTW, going to also make a Twitter post about it an honor your packages once I have time to prepare all the announcements 😄 |
@JonnyBurger I think it's about a day or so. Cool, thank you! |
About
@remotion/noise
package #1395New docs pages
IssueHunt Summary
Referenced issues
This pull request has been submitted to:
@remotion/noise
package