Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ not (
| binary_id(=or-maps::what_the_interior_rules_say_of_the_install)
| binary_id(=or-maps::what_the_rules_say_of_the_install)
| binary_id(=or-media::bink_audio_matches_ffmpeg)
| binary_id(=or-particle::a_particle_list_edit_saves_and_reopens)
| binary_id(=or-particle-model::a_particle_list_edit_saves_and_reopens)
| (binary_id(=or-particles) & (
test(/^import::tests::/)
))
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ publication (R66g, R66h).
| `crates/foundation/` | or-job, or-test-support, or-transport |
| `crates/io/` | or-io, or-io-macros, or-io-verify, or-kraken, or-media |
| `crates/title/` | or-title |
| `crates/domain/` | or-addonped, or-content, or-depends, or-editor, or-interchange, or-maps, or-particle, or-particles, or-plugin, or-project, or-source, or-wardrobe, or-weapons, or-world, or-world-gta5, or-world-gta6, or-worlds |
| `crates/domain/` | or-addonped, or-content, or-depends, or-editor, or-interchange, or-maps, or-particle-model, or-particles, or-plugin, or-project, or-source, or-wardrobe, or-weapons, or-world, or-world-gta5, or-world-gta6, or-world-registry |
| `crates/runtime/` | or-anim, or-renderer, or-simulation |
| `crates/tools/` | or-cli (`openrage-cli`), or-loader (`openrage-loader`), or-shader-front, or-shader-tool, xtask |
| `src/` | the `openrage` app, which also builds the `openrage-cli` binary |
Expand All @@ -150,7 +150,7 @@ publication (R66g, R66h).
`or-title`; code that needs only the bytes goes in `or-io`, but a new decoder
of a file's audio or video goes in `or-media`, where code ported from an open
implementation keeps its licence out of `or-io`.
- Edges that stay absent: `or-anim` → `or-particle` (the playback clock is
- Edges that stay absent: `or-anim` → `or-particle-model` (the playback clock is
`or-transport`).
- The app owns egui integration; `or-renderer` has no egui dependency.
- Adding a title is one `GameProfile` impl and one registry line
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ members = [
"crates/domain/or-editor",
"crates/domain/or-interchange",
"crates/domain/or-plugin",
"crates/domain/or-particle",
"crates/domain/or-particle-model",
"crates/domain/or-particles",
"crates/domain/or-maps",
"crates/domain/or-project",
Expand All @@ -52,7 +52,7 @@ members = [
"crates/domain/or-world",
"crates/domain/or-world-gta5",
"crates/domain/or-world-gta6",
"crates/domain/or-worlds",
"crates/domain/or-world-registry",

# Things that run: evaluated, simulated, drawn.
"crates/runtime/or-anim",
Expand Down Expand Up @@ -215,7 +215,7 @@ or-depends = { path = "crates/domain/or-depends" }
or-editor = { path = "crates/domain/or-editor" }
or-interchange = { path = "crates/domain/or-interchange" }
or-plugin = { path = "crates/domain/or-plugin" }
or-particle = { path = "crates/domain/or-particle" }
or-particle-model = { path = "crates/domain/or-particle-model" }
or-particles = { path = "crates/domain/or-particles" }
or-maps = { path = "crates/domain/or-maps" }
or-project = { path = "crates/domain/or-project" }
Expand All @@ -227,7 +227,7 @@ or-weapons = { path = "crates/domain/or-weapons" }
or-world = { path = "crates/domain/or-world" }
or-world-gta5 = { path = "crates/domain/or-world-gta5" }
or-world-gta6 = { path = "crates/domain/or-world-gta6" }
or-worlds = { path = "crates/domain/or-worlds" }
or-world-registry = { path = "crates/domain/or-world-registry" }
or-title = { path = "crates/title/or-title" }
or-renderer = { path = "crates/runtime/or-renderer" }
or-cli = { path = "crates/tools/or-cli" }
Expand Down Expand Up @@ -311,7 +311,7 @@ or-anim = { workspace = true, features = ["gta6"] }
or-depends.workspace = true
or-editor.workspace = true
or-interchange.workspace = true
or-particle.workspace = true
or-particle-model.workspace = true
# The container keys of a `.openrage-proj`, and the paths it stores, which
# `openrage-cli project` reads and writes the same way.
or-project.workspace = true
Expand Down Expand Up @@ -339,7 +339,7 @@ or-world.workspace = true
# forms a script takes a position in.
or-world-gta5.workspace = true
or-world-gta6.workspace = true
or-worlds.workspace = true
or-world-registry.workspace = true
# Cancellation and progress-as-data, shared with `or-cli`. The app does depend
# on `or-cli`, to host the `openrage-cli` binary; `or-job` keeps the job model
# out of that edge.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Dependencies run one way: foundation → io → title → domain → runtime →
|---|---|---|
| app | the editor and the `openrage-cli` entry point | [src](src) |
| [runtime](crates/runtime) | what is evaluated, simulated or drawn | or-anim, or-renderer, or-simulation |
| [domain](crates/domain) | what is edited, and what a project builds | or-project, or-source, or-content, or-wardrobe, or-addonped, or-weapons, or-maps, or-particles, or-particle, or-world, or-world-gta5, or-world-gta6, or-worlds, or-depends, or-interchange, or-editor, or-plugin |
| [domain](crates/domain) | what is edited, and what a project builds | or-project, or-source, or-content, or-wardrobe, or-addonped, or-weapons, or-maps, or-particles, or-particle-model, or-world, or-world-gta5, or-world-gta6, or-world-registry, or-depends, or-interchange, or-editor, or-plugin |
| [title](crates/title) | a game install: editions, archives, DLC order | or-title |
| [io](crates/io) | file formats, archives, media decoders | or-io, or-io-macros, or-io-verify, or-kraken, or-media |
| [foundation](crates/foundation) | building blocks that know no format | or-job, or-transport, or-test-support |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "or-particle"
name = "or-particle-model"
version.workspace = true
edition.workspace = true
authors.workspace = true
Expand All @@ -10,7 +10,7 @@ description = "The particle editor's model: the effect / emitter / particle rule

[dependencies]
serde.workspace = true
# Jenkins hashing lives below this crate now. `or_particle::rage` re-exports it so
# Jenkins hashing lives below this crate now. `or_particle_model::rage` re-exports it so
# existing callers are unaffected; see that module for why it moved.
or-io.workspace = true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# or-particle
# or-particle-model

The particle editor's model: the effect, emitter and particle rule hierarchy of an open `.ypt`.

It sits over the owned records `or-io` declares for a `.ypt` and shows them as the editor does: behaviours, domains, keyframes and evolutions. `or_particle::list` finds rules by name, and adds, renames and removes them.
It sits over the owned records `or-io` declares for a `.ypt` and shows them as the editor does: behaviours, domains, keyframes and evolutions. `or_particle_model::list` finds rules by name, and adds, renames and removes them.

⚠ Not [or-particles](../or-particles), which is particle effects as content of a project.

- Layer: domain.
- Start at [src/lib.rs](src/lib.rs).
- Tests: `just test-crate or-particle`.
- Tests: `just test-crate or-particle-model`.
- How the preview plays one: [Particle_Preview.md](../../../docs/features/Particle_Preview.md).
- Reference: [Crate_Reference.md](../../../docs/reference/Crate_Reference.md#domain-crates).
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use or_io::decl::{File, OwnedOrKeyed, Resource, View};
use or_io::gta5::particle::PtxFxList;
use or_particle::list;
use or_particle_model::list;
use or_test_support::{shared_corpus_root, Corpus, TARGET_GEN8};

/// Every Legacy corpus `.ypt`, laid out as the editor edits it.
Expand Down
2 changes: 1 addition & 1 deletion crates/domain/or-particles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ sha2.workspace = true
tempfile.workspace = true
or-test-support.workspace = true
# The editor's calls that make the small lists the suites build sources from.
or-particle.workspace = true
or-particle-model.workspace = true
# The mounted install the particle files are measured on.
or-title.workspace = true
2 changes: 1 addition & 1 deletion crates/domain/or-particles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The particles engine: the particle effects a person streams into the game, as co

`effects.json` is the assets of a pack, each the source of a `.ypt`: its rules as one document, its textures as exact DDS files and its models kept whole. The crate says what is wrong as rules, what the effects contribute to a build's plan, and reads a build back to verify it. `openrage-cli particles` runs it with no window.

⚠ Not [or-particle](../or-particle), which is the editor's model of one open effects list. This crate is the kind of content a project holds.
⚠ Not [or-particle-model](../or-particle-model), which is the editor's model of one open effects list. This crate is the kind of content a project holds.

- Layer: domain; a kind of content of [or-project](../or-project).
- Start at [src/lib.rs](src/lib.rs).
Expand Down
2 changes: 1 addition & 1 deletion crates/domain/or-particles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! `openrage-cli particles` runs it without the editor.
//!
//! The source of a `.ypt` is `or_source::particles`: its rules as one document, its textures as exact DDS files and its models kept whole.
//! `or-particle` is the editor's model of an open list, and this crate is the kind of content a project holds.
//! `or-particle-model` is the editor's model of an open list, and this crate is the kind of content a project holds.
//!
//! ⚠ **Nothing here says an effect plays in game.** A build says that every file it wrote reloads through the readers, which is all
//! that can be measured without running GTA V.
Expand Down
2 changes: 1 addition & 1 deletion crates/domain/or-particles/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ pub fn mount(root: &Path) -> Option<MountedGame> {

/// A `.ypt` with the effect `effect`, firing one emitter rule and one particle rule, and no texture.
pub fn a_ypt(name: &str, effect: &str) -> Vec<u8> {
or_particle::sample::list_of(name, &[effect])
or_particle_model::sample::list_of(name, &[effect])
}
2 changes: 1 addition & 1 deletion crates/domain/or-source/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ or-io = { workspace = true, features = ["authoring", "bc7-encode", "meta"] }
# A model source is a glb, which this reads and writes.
or-interchange.workspace = true
# The layout a particle list is laid out in before it is written as a source or compiled from one.
or-particle.workspace = true
or-particle-model.workspace = true
serde.workspace = true
serde_json.workspace = true
# The JSON Schemas of asset.json, textures.json, drawable.json and dictionary.json.
Expand Down
12 changes: 6 additions & 6 deletions crates/domain/or-source/src/particles/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,23 @@ pub fn write<T: DrawableTarget>(list: &PtxFxList<T>) -> Value {
document.insert(
"effect_rules".into(),
Value::Array(
or_particle::list::effect_rules(list)
or_particle_model::list::effect_rules(list)
.map(Json::write)
.collect(),
),
);
document.insert(
"emitter_rules".into(),
Value::Array(
or_particle::list::emitter_rules(list)
or_particle_model::list::emitter_rules(list)
.map(Json::write)
.collect(),
),
);
document.insert(
"particle_rules".into(),
Value::Array(
or_particle::list::particle_rules(list)
or_particle_model::list::particle_rules(list)
.map(Json::write)
.collect(),
),
Expand All @@ -124,7 +124,7 @@ pub fn read<T: DrawableTarget>(document: &Value) -> Result<PtxFxList<T>, Fault>
&r.name
})?;
ask_for_the_maps(&mut list);
or_particle::list::canonical(&mut list);
or_particle_model::list::canonical(&mut list);
Ok(list)
}

Expand All @@ -142,11 +142,11 @@ fn ask_for_the_maps<T: DrawableTarget>(list: &mut PtxFxList<T>) {
}];
}
};
for rule in or_particle::list::effect_rules_mut(list) {
for rule in or_particle_model::list::effect_rules_mut(list) {
if let Some(l) = rule.evolution_list.as_deref_mut() {
stale(l);
}
for event in or_particle::list::events_mut(rule) {
for event in or_particle_model::list::events_mut(rule) {
if let Some(l) = event.base.evolution_list.as_deref_mut() {
stale(l);
}
Expand Down
8 changes: 4 additions & 4 deletions crates/domain/or-source/src/particles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ where
if !refusals.is_empty() {
return Err(refusals.into_iter().map(Problem::new).collect());
}
or_particle::list::canonical(&mut list);
or_particle_model::list::canonical(&mut list);

let origin = Origin {
how: How::Extracted,
Expand Down Expand Up @@ -243,7 +243,7 @@ where
))]
})?;
let mut back = back;
or_particle::list::canonical(&mut back);
or_particle_model::list::canonical(&mut back);
match first_difference(list, &back) {
None => Ok(()),
Some(what) => Err(vec![Problem::new(format!(
Expand Down Expand Up @@ -482,9 +482,9 @@ where
.map_err(|e| vec![Problem::new(format!("the source does not compile: {e}"))])?;
let mut after = PtxFxList::<T>::from_bytes(ypt)
.map_err(|e| vec![Problem::new(format!("cannot read the list: {e}"))])?;
or_particle::list::canonical(&mut after);
or_particle_model::list::canonical(&mut after);
let mut before = before;
or_particle::list::canonical(&mut before);
or_particle_model::list::canonical(&mut before);
if first_difference(&before, &after).is_none() {
return Ok(());
}
Expand Down
2 changes: 1 addition & 1 deletion crates/domain/or-source/src/particles/records.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! A record's text is an object of its members, and the members a document does not state are the ones the declaration holds only
//! as runtime words, or that follow from the others: the lists naming a rule's behaviours (they follow from the classes), the map
//! of an evolution list (it follows from the values it names), and the pointers an event or a spawner holds at a rule it names
//! (they follow from the name, once the list is laid out with [`or_particle::list::canonical`]).
//! (they follow from the name, once the list is laid out with [`or_particle_model::list::canonical`]).
//!
//! `mismatches` holds every record to the declaration: a member the declaration shows and neither list names is reported, and so is a
//! name the declaration lacks.
Expand Down
Loading
Loading