Refactor TODO comments to clarify future enhancements for model material manipulation and texture application

This commit is contained in:
MayaTheShy
2025-11-16 21:46:55 -05:00
parent 27db9dbe30
commit d415213c5d

View File

@@ -169,29 +169,21 @@ impl Reify for BridgeState {
match Model::direct(&model_path) { match Model::direct(&model_path) {
Ok(model) => { Ok(model) => {
// TODO: Apply color tint to the model // TODO(starworld): Apply color tint to the model's materials when StardustXR asteroids API supports it.
// The asteroids Model element doesn't expose material manipulation yet. // See https://github.com/StardustXR/asteroids/issues/1 (example issue link)
// This would require:
// 1. Loading the model's materials
// 2. Multiplying base color by the tint color
// 3. Re-applying the modified materials
// For now, we just log the color for debugging.
if node.color != [1.0, 1.0, 1.0, 1.0] { if node.color != [1.0, 1.0, 1.0, 1.0] {
eprintln!("[bridge/reify] Node {} has color tint: RGBA({:.2}, {:.2}, {:.2}, {:.2}) - NOT YET APPLIED", eprintln!("[bridge/reify] Node {} has color tint: RGBA({:.2}, {:.2}, {:.2}, {:.2}) - NOT YET APPLIED (API limitation, see TODO)",
id, node.color[0], node.color[1], node.color[2], node.color[3]); id, node.color[0], node.color[1], node.color[2], node.color[3]);
} }
// TODO(starworld): When material API is available, set model material color here.
// TODO: Apply texture from texture_url // For now, this is a no-op.
// Similar to color, texture application requires material manipulation.
// This would involve: // TODO: Apply texture from texture_url (pending API)
// 1. Downloading the texture if it's an HTTP URL
// 2. Loading it as a texture resource
// 3. Applying it to the model's materials
if !node.texture_url.is_empty() { if !node.texture_url.is_empty() {
eprintln!("[bridge/reify] Node {} has texture URL: {} - NOT YET APPLIED", eprintln!("[bridge/reify] Node {} has texture URL: {} - NOT YET APPLIED (API limitation)",
id, node.texture_url); id, node.texture_url);
} }
Some(model.build()) Some(model.build())
} }
Err(e) => { Err(e) => {