ikaruga Posted January 16, 2022 Share Posted January 16, 2022 (edited) To clarify, I'm not looking for anything complex or hyper realistic. As far as I can tell, there are *libraries* for this behavior. Ex: https://github.com/topics/flocking But these are too complex. I seem to recall years ago there were process.js examples of simple code for particle simulation of flocking behavior. Something like that is what I'm looking for. Thanks! Update: ended up implementing the above example in Typescript and pixi.js: https://gist.github.com/frankandrobot/e93be4b3af781f779a26be096201d348 Edited January 17, 2022 by ikaruga added solution Quote Link to comment Share on other sites More sharing options...
ikaruga Posted January 16, 2022 Author Share Posted January 16, 2022 (edited) Looks like I found the code I remembered: https://processing.org/examples/flocking.html **But...** it seems highly specific to processing.js. Does anyone know of something similar but JS specific? Edited January 16, 2022 by ikaruga Quote Link to comment Share on other sites More sharing options...
ikaruga Posted January 17, 2022 Author Share Posted January 17, 2022 Ended up implementing the processing example in Typescript and Pixi.js. This code is mostly pixi.js agnostic with the exception of using the Point class... https://gist.github.com/frankandrobot/e93be4b3af781f779a26be096201d348 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.