realism 0.0.3

A high-performance, production-ready scene management crate for Rust game engines
Documentation
# Realism


**Realism** is a high-performance, production-ready scene management crate for Rust game engines. It is designed to scale to tens of thousands of entities with minimal overhead, leveraging data-oriented design principles.

## Author


- **Saptak Santra**

## Features (Planned/In-Progress)


- **🚀 High Performance**: 
    - Cache-coherent **Generational Indices** for entity handles (no UUID lookups).
    - **Sparse Set** component storage for O(1) add/remove and fast iteration.
    - Dirty-flag **Transform Hierarchy** with batched propagation.
- **🌲 Spatial Partitioning**:
    - Dynamic **Octree** for efficient frustum culling and spatial queries. (Phase 2)
- **💾 Scene Management**:
    - JSON + GLB scene format support. (Phase 3)
    - Prefab system with overrides. (Phase 3)

## Installation


Add this to your `Cargo.toml`:

```toml
[dependencies]
realism = "0.0.1"
```

## Example


```rust
use realism::{EntityStorage, ComponentStorage, EntityId};
use realism::transform::{Transform, HierarchyStorage, propagate_all};

fn main() {
    let mut entities = EntityStorage::new();
    let mut transforms = ComponentStorage::<Transform>::new();
    let mut hierarchy = HierarchyStorage::new();

    // Spawn an entity
    let root = entities.spawn();
    transforms.insert(root, Transform::from_xyz(0.0, 1.0, 0.0));

    // Spawn a child
    let child = entities.spawn();
    hierarchy.attach(child, root);

    // Propagate transforms
    propagate_all(&hierarchy, &mut transforms, &entities);
}
```

## License


This project is licensed under the [Apache License 2.0](LICENSE) - see the [LICENSE](LICENSE) file for details.

```
Copyright 2025 Saptak Santra

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```