Generate visual parameter and foliage catalogs (#48)
This commit is contained in:
@@ -69,6 +69,28 @@ Rust API compile fixture then compiles every mapped generated member, while the
|
||||
packet catalog test exercises representative low/medium/high, fixed, multiple,
|
||||
variable, and unknown dispatch behavior.
|
||||
|
||||
## Visual parameters and foliage
|
||||
|
||||
The visual-parameter generator parses the pinned `avatar_lad.xml` with explicit
|
||||
root, attribute, numeric, vector, color, relationship, and duplicate-ID
|
||||
validation. Its checked-in
|
||||
[`visual_catalog.rs`](../crates/libremetaverse/src/visual_catalog.rs) output
|
||||
contains all 672 public parameters, including ranges and defaults, groups,
|
||||
wearable associations, alpha/color data, driven relationships, skeletal
|
||||
distortions, and volume morphs. `VisualParams::params()` exposes a
|
||||
`BTreeMap`-backed sorted list keyed by parameter ID. The 253 group-0/group-3
|
||||
transmitted IDs are kept in ascending numeric order because that order is
|
||||
observable in `AvatarAppearance` bytes; no other XML order is retained.
|
||||
|
||||
The foliage generator validates `trees.xml` and `grass.xml`, including UUIDs,
|
||||
all numeric properties, unique IDs, and the contiguous source-order species
|
||||
index required by the reference `Get` implementation. Its checked-in
|
||||
[`foliage_catalog.rs`](../crates/libremetaverse/src/foliage_catalog.rs) output
|
||||
uses source-ordered vectors, so tree and grass enum discriminants provide
|
||||
constant-time indexed lookup. Golden fixtures cover all catalog counts,
|
||||
representative complete records, public getters/setters, appearance decoding,
|
||||
and every generated relationship category.
|
||||
|
||||
## Commands
|
||||
|
||||
Regenerate every currently registered Rust output using only checked-in data:
|
||||
@@ -94,5 +116,6 @@ cargo run -p libremetaverse-codegen -- vendor ../libremetaverse
|
||||
Generation uses UTF-8 with an optional BOM, normalizes CRLF/CR to LF, rejects
|
||||
NUL input, reports stable `path:line:column: severity[code]` diagnostics, sorts
|
||||
manifest records by stable IDs, emits provenance-rich generated headers, and
|
||||
always terminates output with one LF. Tests generate both outputs twice in
|
||||
memory and require byte identity before comparing with the checked-in files.
|
||||
always terminates output with one LF. Tests generate every registered output
|
||||
twice in memory and require byte identity before comparing with the checked-in
|
||||
files.
|
||||
|
||||
Reference in New Issue
Block a user