fix: edit the specs

This commit is contained in:
alban 2024-01-27 22:25:36 +01:00
parent d9e53bb67c
commit 441ce80711
1 changed files with 28 additions and 23 deletions

View File

@ -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<GeometricalShape>
- 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 <Xmin,Xmax,Ymin,Ymax>
PhysicsEngine
PhysicsEngineConfig
ParticlesList
RenderEngine
RenderEngineConfig
Config
- ParticlesGroups: vec<<Particle>
- RedisConf
- PhysicsEngine
- RedisConfig
- PhysicsEngineConfig
- RenderEngineConfig
// future feature
OSCConfig
- OSCCache
- OSCServer <IP,Port>
@ -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