docs: formalize thob builder observations for week 2 task 2 (earth/moon)

This commit is contained in:
divyap 2026-04-13 16:11:06 +05:30
parent a6e31bdfe0
commit b69935ef5e

View File

@ -1,22 +1,22 @@
# Thob Builder Notes: Task 2 - Texture Switcher # Thob Observations: Task 2 - Texture Switcher
## Overview ### Thob Observations from Task Notes
Implemented a planetary texture switcher (Earth/Moon) using a `RadioGroup` for the UI and the built-in `MaterialVariant` system for texture swapping. * **Possible**: Yes, Swapping between planetary textures (Earth/Moon) using a `RadioGroup` for selection.
* **Implementation used**: Hierarchical UI setup using a `RadioGroup` paired with a `For` loop to generate selectable items. Texture mapping was achieved by linking the `RadioGroup` state to a `MaterialVariant` node controlling the `map` property of the sphere.
* **What worked as expected**: High-resolution textures (Earth/Moon) mapped correctly to the Sphere geometry without UV distortion. The logical flow from UI selection to 3D texture update was instantaneous.
* **Main limitation observed**: Managing multiple textures in a loop requires specific binding syntax (like `$context.item_currentItem.id`) which is a "guessing game" without integrated docs.
* **Builder flow used**: Layers Panel (Node Hierarchy) -> Properties Panel (Texture Loading) -> UI Component Library (RadioGroup).
* **Complexity**: Medium-High. The complexity increases as you move from simple color swaps to multiple asset-based texture swaps in a logical loop.
* **Main limitation signals**: An extreme volume of `GetBindingData... method already registered` warnings appearing in clusters every time a new texture is selected.
* **Workaround status**: Successfully implemented using 100% native builder components.
## Visual Observations ### Console Warnings/Errors Seen (Deduplicated) and Probable Meaning
- **Texture Resolution**: The builder handles texture mapping on a sphere smoothly. 1. **Redundant Binding Registration**: `GetBindingData... method already registered`.
- **UI Interaction**: Using a `RadioGroup` feels more natural for a configurator pattern compared to a single toggle button. * *Probable Meaning*: This happens during UI interactions with the **For-loop**. It suggests that the builder is trying to re-calculate the bindings for all loop items every time the selection changes.
2. **Hydration & State Initialization**: `No HydrateFallback` and `uncontrolled to controlled` warnings.
* *Probable Meaning*: Standard startup noise from the builder engine when it begins matching the interactive UI to the 3D scene state.
3. **Resource Persistence**: `404 Not Found` for builder paths.
* *Probable Meaning*: Occurs when the builder tries to reference an asset or thumbnail before it has finished processing in the media library.
## Technical Observations (Console Logs) ### Overall Read
During development in the builder, several warnings and errors were observed: Task 2 proves that Thob can handle high-quality asset swapping (Texture mapping) efficiently. The visual result is professional and production-ready. However, the background warnings during loop interactions indicate that the data-binding layer needs optimization to handle multiple options cleanly.
- **404 Errors**: `GET https://builder.thob.studio/builder/... 404 (Not Found)`.
- **Method Registration**: `GetBindingData... method already registered`. This appears repeatedly in the logs during the preview phase.
- **Hydration Warnings**: `No HydrateFallback element provided to render during initial hydration`.
- **Component State**: `undefined is changing from uncontrolled to controlled`. This suggests a potential issue in how the builder manages internal component state when switching variants via `RadioGroup`.
## Builder Workflow
- **Node Hierarchy**: The UI was structured using a `RadioGroup` -> `For` loop -> `RadioGroupItem` layout, demonstrating high-level UI component support in the builder.
- **State Linking**: Connecting the `RadioGroup` selection to the `MaterialVariant` property was straightforward in the properties panel.
## Conclusion
The Thob Builder's `RadioGroup` component is a strong candidate for professional configurators. The process of linking textures to UI elements is intuitive and requires zero code. However, the runtime console warnings should be investigated to ensure production stability.