docs: finalize task-2 comparison report and capability mapping

This commit is contained in:
divyap 2026-03-30 23:39:39 +05:30
parent 17069ca8b8
commit 91d55fdc90

View File

@ -1,60 +1,74 @@
# Task: [Feature Name] # Task 2 Report: [Texture / Visual Surface Change]
## Objective ## Objective
What is the feature trying to do? Apply a texture or change the surface appearance of an object interactively.
## Vanilla three.js ## Vanilla Three.js
-Possible: Yes / Partial / No - Possible: **Yes**
-Notes: - Notes: Requires using `TextureLoader` to load assets and manually assigning the texture to the material's `map` property.
-Key concepts: - Key concepts: `THREE.TextureLoader`, `Asset URL Management`, `Material Map`.
-Complexity: Easy / Medium / Hard - Complexity: **Easy but verbose** (Needs explicit code for every asset loader).
## R3F ## R3F
-Possible: Yes / Partial / No - Possible: **Yes**
-Notes: - Notes: Highly efficient. The `useLoader` hook (with `TextureLoader`) handles asset loading declaratively and integrates with React Suspense.
-What R3F abstracted: - What R3F abstracted: `Loading callbacks`, `Declarative asset loading`, `Suspense integration`.
-Complexity: Easy / Medium / Hard - Complexity: **Easy** (Very concise, 1-2 lines of code).
## Thob Page Builder ## Thob Page Builder
-Possible: Yes / Partial / No - Possible: **Yes**
-Notes: - Notes: **Significantly faster** than code-based approaches for simple asset application. You simply select a file or link a URL in the UI, and the mesh updates instantly.
-Builder steps: - Builder steps: `Canvas > Mesh > Material > Map > Browse/URL`.
-Complexity: Easy / Medium / Hard - Complexity: **Minimal** (Completely No-Code).
## Comparison Summary ## Comparison Summary
-Possible in all 3? Yes / Partial / No - Possible in all 3? **Yes**.
- Key abstraction difference:
- Vanilla = imperative asset handling
- R3F = declarative asset loading
- Thob = UI-driven asset configuration
- Main differences: - Main differences:
-Where Thob is better: - **Vanilla**: Gives full control, but requires several lines of code for a single texture.
- **R3F**: The fastest way to write complex texture logic with simple code.
- **Thob**: The fastest overall for visual users. No code required for initial mapping.
- Where Thob is better: **Applying a visual asset that you already have.**
- Where Thob is weaker: - Where Thob is weaker:
- **Asset error handling**. When a texture fails (like CORS/404 errors), its harder to debug than in code.
- **Limited flexibility for complex material setups**. Applying different textures to different faces of a single object is not straightforward compared to code-based approaches.
- What feels awkward or unclear: - What feels awkward or unclear:
- The CORS issues for external assets make it difficult to link textures that aren't already in the Thob library.
## Limitation Type (if any) ## Limitation Type (if any)
- [ ] Editor UX limitation - [ ] Editor UX limitation
-[ ] Runtime limitation - [x] Runtime limitation (CORS/URL fetching)
- [ ] Schema / data model limitation - [ ] Schema / data model limitation
- [ ] Component limitation - [ ] Component limitation
- [ ] Event system limitation - [ ] Event system limitation
-[ ] Asset pipeline limitation - [ ] Property binding limitation
- [x] Asset pipeline limitation
- [ ] Unknown / needs investigation - [ ] Unknown / needs investigation
## Workaround ## Workaround
-Is there a workaround? - Is there a workaround? **Yes**. Ensure all assets are uploaded directly to the Thob project rather than linking from external URLs to avoid CORS blocks.
-If yes, what is it?
## Suggested Improvement ## Suggested Improvement
-What should improve in Thob? - What should improve in Thob? **Improve the asset importer** to handle external URL fetching with a proxy to avoid CORS blocks. Provide more descriptive "Map Loading" feedback in the UI.
- Is it: - Is it:
-editor - editor (Yes)
-runtime - runtime (Yes)
-component - component (No)
-UX - UX (Yes)
-schema/data - schema/data (Yes)
## Difficulty Estimate ## Difficulty Estimate
-Easy / Medium / Hard - **Easy**
## Business Value ## Business Value
-Low / Medium / High - **High** (Asset application is a core part of 3D design workflows).
## Recommendation ## Recommendation
Should Thob support this better? Why? Thob is already **strong** in texture application. The speed advantage over R3F and Vanilla is clear for visual workflows. To make it production-ready, it should improve external asset handling and support more flexible material configurations.