[PR #757] [CLOSED] Startup stage 2b: split block assets into block data and render assets (#712) #2784

Closed
opened 2026-11-02 15:59:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/757
Author: @rdbtCVS
Created: 10/17/2026
Status: ❌ Closed

Base: main ← Head: t3code/08bad3fd-2b


📝 Commits (2)

  • 7f1cf15 Startup: keep the title's atlas and panorama in one UI bundle (#712)
  • 977a3e1 Startup: split block assets into block data and render assets (#712)

📊 Changes

81 files changed (+439 additions, -322 deletions)

View changed files

📝 crates/horizon-client/examples/arrow_probe.rs (+3 -2)
📝 crates/horizon-client/examples/auto_jump_probe.rs (+3 -2)
📝 crates/horizon-client/examples/block_particles_fixture.rs (+2 -0)
📝 crates/horizon-client/examples/breaking_fixture.rs (+3 -1)
📝 crates/horizon-client/examples/chunk_bench.rs (+3 -0)
📝 crates/horizon-client/examples/model_library_bench.rs (+3 -2)
📝 crates/horizon-client/examples/resource_memory.rs (+5 -3)
📝 crates/horizon-client/examples/scene_collision_probe.rs (+3 -2)
📝 crates/horizon-client/examples/scene_motion_probe.rs (+3 -2)
📝 crates/horizon-client/examples/section_mesh_fixture.rs (+7 -3)
📝 crates/horizon-client/examples/streaming_bench.rs (+3 -0)
📝 crates/horizon-client/src/assets.rs (+18 -25)
📝 crates/horizon-client/src/entities.rs (+2 -1)
📝 crates/horizon-client/src/game.rs (+115 -80)
📝 crates/horizon-client/src/game/advancements.rs (+3 -3)
📝 crates/horizon-client/src/game/advancements_screen.rs (+9 -9)
📝 crates/horizon-client/src/game/armor_stands.rs (+3 -3)
📝 crates/horizon-client/src/game/beacon.rs (+11 -5)
📝 crates/horizon-client/src/game/boats.rs (+1 -0)
📝 crates/horizon-client/src/game/books.rs (+3 -3)

...and 61 more files

📄 Description

Stage 2 of #712, sub-step 2b: split the world's block bundle into a block-data part and a render part, so the two can be loaded and threaded independently in 2c. Pure refactor, no behaviour change.

Stacked on #747 (2a), which is stacked on #740 (stage 1). Cross-repo PRs cannot target a fork branch, so this diff also shows 2a and stage 1 until they merge.

What changed

  • assets::Assets now holds only the data world generation and collisions need: registry, properties, material_states, blocks_fluid_flow.
  • New assets::RenderAssets holds the block models and baked sprites: sprite pixels/size/layers/animations/mips, model_catalog, model_library, model_placements, model_gallery.
  • RenderAssets::load(root, &Assets) reads the models and sprites over an existing registry. Assets::reload keeps its meaning (same blocks, another resource root's models/sprites) and now returns RenderAssets.
  • PackResources, WorkerContext, MeshTables::new, Mesher and World::test_scene carry the render bundle alongside the data.
  • Call sites, tests and examples updated. No new crates.

Verification

  • cargo test -p horizon-client --locked: 913 passed.
  • cargo clippy -p horizon-client --tests --examples --locked -- -D warnings: clean.
  • tools/pr_ready.py --base origin/main: pass (rustfmt, clippy, tests, public tree; Cargo.lock unchanged).
  • Offscreen smoke: horizon-client --offscreen --frames 3 exit 0.

Contributes to #712.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/757 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `t3code/08bad3fd-2b` --- ### 📝 Commits (2) - [`7f1cf15`](https://github.com/horizon-rust/horizon/commit/7f1cf151c1798c18929c0ef97930a8c3cd649063) Startup: keep the title's atlas and panorama in one UI bundle (#712) - [`977a3e1`](https://github.com/horizon-rust/horizon/commit/977a3e12ba3d51e1cb81266c19da8521b87aaf0e) Startup: split block assets into block data and render assets (#712) ### 📊 Changes **81 files changed** (+439 additions, -322 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/arrow_probe.rs` (+3 -2) 📝 `crates/horizon-client/examples/auto_jump_probe.rs` (+3 -2) 📝 `crates/horizon-client/examples/block_particles_fixture.rs` (+2 -0) 📝 `crates/horizon-client/examples/breaking_fixture.rs` (+3 -1) 📝 `crates/horizon-client/examples/chunk_bench.rs` (+3 -0) 📝 `crates/horizon-client/examples/model_library_bench.rs` (+3 -2) 📝 `crates/horizon-client/examples/resource_memory.rs` (+5 -3) 📝 `crates/horizon-client/examples/scene_collision_probe.rs` (+3 -2) 📝 `crates/horizon-client/examples/scene_motion_probe.rs` (+3 -2) 📝 `crates/horizon-client/examples/section_mesh_fixture.rs` (+7 -3) 📝 `crates/horizon-client/examples/streaming_bench.rs` (+3 -0) 📝 `crates/horizon-client/src/assets.rs` (+18 -25) 📝 `crates/horizon-client/src/entities.rs` (+2 -1) 📝 `crates/horizon-client/src/game.rs` (+115 -80) 📝 `crates/horizon-client/src/game/advancements.rs` (+3 -3) 📝 `crates/horizon-client/src/game/advancements_screen.rs` (+9 -9) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+3 -3) 📝 `crates/horizon-client/src/game/beacon.rs` (+11 -5) 📝 `crates/horizon-client/src/game/boats.rs` (+1 -0) 📝 `crates/horizon-client/src/game/books.rs` (+3 -3) _...and 61 more files_ </details> ### 📄 Description Stage 2 of #712, sub-step **2b**: split the world's block bundle into a **block-data** part and a **render** part, so the two can be loaded and threaded independently in 2c. Pure refactor, no behaviour change. > Stacked on #747 (2a), which is stacked on #740 (stage 1). Cross-repo PRs cannot target a fork branch, so this diff also shows 2a and stage 1 until they merge. ## What changed - `assets::Assets` now holds only the data world generation and collisions need: `registry`, `properties`, `material_states`, `blocks_fluid_flow`. - New `assets::RenderAssets` holds the block models and baked sprites: sprite pixels/size/layers/animations/mips, `model_catalog`, `model_library`, `model_placements`, `model_gallery`. - `RenderAssets::load(root, &Assets)` reads the models and sprites over an existing registry. `Assets::reload` keeps its meaning (same blocks, another resource root's models/sprites) and now returns `RenderAssets`. - `PackResources`, `WorkerContext`, `MeshTables::new`, `Mesher` and `World::test_scene` carry the render bundle alongside the data. - Call sites, tests and examples updated. No new crates. ## Verification - `cargo test -p horizon-client --locked`: 913 passed. - `cargo clippy -p horizon-client --tests --examples --locked -- -D warnings`: clean. - `tools/pr_ready.py --base origin/main`: pass (rustfmt, clippy, tests, public tree; `Cargo.lock` unchanged). - Offscreen smoke: `horizon-client --offscreen --frames 3` exit 0. Contributes to #712. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:59:01 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2784
No description provided.