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 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) - 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 1. Clone lj_rust_template and edit draw.rs
2. add lj_particle library crate 2. add lj_particle library crate
3. edit the draw function 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 ## Library struct/objects
Particle Particle
- CentralPoint - PhysicsBody
- Shape : Square, Triangle, Circle, 3DSphere : Trait<GeometricalShape> - Shape : Square, Triangle, Circle, 3DSphere
- UserData // custom ex: life decay, seed, created_at, frequency - UserData // custom ex: life decay, seed, created_at, frequency
- Group - Group
- PhysicsBody
Point2D
- coordinates(x,y)
- velocity(x,y)
- color(r,g,b)
BoundingBox2D <Xmin,Xmax,Ymin,Ymax>
PhysicsEngine PhysicsEngine
PhysicsEngineConfig PhysicsEngineConfig
ParticlesList
RenderEngine
RenderEngineConfig
Config Config
- ParticlesGroups: vec<<Particle> - ParticlesGroups: vec<<Particle>
- RedisConf - RedisConfig
- PhysicsEngine - PhysicsEngineConfig
- RenderEngineConfig
// future feature
OSCConfig OSCConfig
- OSCCache - OSCCache
- OSCServer <IP,Port> - OSCServer <IP,Port>
@ -64,9 +74,11 @@ OSCConfig
```rust ```rust
/***
An idea of the crate API
***/
use LJParticleSystem as ParticleSystem; use LJParticleSystem as ParticleSystem;
use LJBoundingBox as BoundingBox;
use LJClippingBox as ClippingBox;
use LJRedilysis as Redilysis; use LJRedilysis as Redilysis;
use Rapier as PhysicsEngine; 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