From 441ce807112224dabef514120adfac5e32da0cb3 Mon Sep 17 00:00:00 2001 From: alban Date: Sat, 27 Jan 2024 22:25:36 +0100 Subject: [PATCH] fix: edit the specs --- README.md | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 7b10fa0..c67cd30 100644 --- a/README.md +++ b/README.md @@ -25,38 +25,48 @@ This library should allow users to define their own particle behaviours - Handle user custom particle properties (ex: decay, frequency, personality, etc.) - Handle additional drawings for the current frame due to custom events (ex: segment between two particles) -## New project +## How to use in a project 1. Clone lj_rust_template and edit draw.rs 2. add lj_particle library crate 3. edit the draw function -4. draw +4. compile +## Fundamental Features +- [ ] Use a 3D physics engine +- [ ] Provide hooks to create and update the simulation (onInit, onTick, onCollide, etc.) +- [ ] Render using box clipping for out of bound particles points +- [ ] Use an out-of-simulation list of additional points +- [ ] Render to STDOUT or Redis + +## Future Features + +- [ ] Use a 2D physics engine +- [ ] Use attractors/repulsors objects +- [ ] Use OSC to update configuration ## Library struct/objects Particle -- CentralPoint -- Shape : Square, Triangle, Circle, 3DSphere : Trait +- PhysicsBody +- Shape : Square, Triangle, Circle, 3DSphere - UserData // custom ex: life decay, seed, created_at, frequency - Group -- PhysicsBody -Point2D -- coordinates(x,y) -- velocity(x,y) -- color(r,g,b) - -BoundingBox2D PhysicsEngine PhysicsEngineConfig -ParticlesList + +RenderEngine +RenderEngineConfig + Config - ParticlesGroups: vec< -- RedisConf -- PhysicsEngine +- RedisConfig +- PhysicsEngineConfig +- RenderEngineConfig +// future feature OSCConfig - OSCCache - OSCServer @@ -64,9 +74,11 @@ OSCConfig ```rust +/*** + An idea of the crate API +***/ + use LJParticleSystem as ParticleSystem; -use LJBoundingBox as BoundingBox; -use LJClippingBox as ClippingBox; use LJRedilysis as Redilysis; use Rapier as PhysicsEngine; @@ -163,10 +175,3 @@ U -> C "/program/$c/$n" ``` -## Features - -- [ ] save to redis -- [ ] Use a 2D physics engine -- [ ] Use attractors/repulsors objects -- [ ] Use a 3D physics engine -- [ ] Use OSC to update configuration