chore: added task note for task2

This commit is contained in:
anshk 2026-03-27 20:10:11 +05:30
parent df80db8a89
commit 36a9fbbb09

View File

@ -1,60 +1,83 @@
# Task: [Feature Name] # Task: Parent-Child-Grandchild Hierarchy (Sun -> Earth -> Moon)
## Objective ## Objective
What is the feature trying to do? The objective was to create a 3-level hierarchy where the Sun is parent, Earth is child, and Moon is grandchild, then validate orbit and self-rotation behavior with clear local vs inherited transforms.
## Vanilla three.js ## Vanilla three.js
-Possible: Yes / Partial / No - Possible: Yes
-Notes: - Notes: Implemented as `solarSystem -> sun -> earthOrbit -> earth -> moonOrbit -> moon`. Earth orbits Sun by rotating `earthOrbit`; Moon orbits Earth by rotating `moonOrbit`; Earth self-rotates on local Y.
-Key concepts: - Key concepts: Scene graph hierarchy, transform inheritance, local transform pivots with `Object3D`, frame-time based animation.
-Complexity: Easy / Medium / Hard - Complexity: Easy
## R3F ## R3F
-Possible: Yes / Partial / No - Possible: Yes
-Notes: - Notes: Implemented the same hierarchy with nested JSX nodes and `group` refs in `useFrame` for orbit updates.
-What R3F abstracted: - What R3F abstracted: Declarative tree for parent/child relationships, lifecycle/render loop integration with `useFrame`, less boilerplate for setup.
-Complexity: Easy / Medium / Hard - Complexity: Easy
## Thob Page Builder ## Thob Page Builder
-Possible: Yes / Partial / No - Possible: Partial (based on Task 1 behavior)
-Notes: - Notes: Parent-child worked in Task 1, but child transform behavior became unstable when editing child position under transformed parent. Task 2 extends this to a deeper hierarchy (parent-child-grandchild), so predictability risk increases.
- Builder steps: - Builder steps:
-Complexity: Easy / Medium / Hard 1. Create Sun mesh.
2. Create Earth as child of Sun.
3. Create Moon as child of Earth (grandchild of Sun).
4. Test parent transform inheritance (Sun move/scale).
5. Test child and grandchild local transforms independently.
- Complexity: Medium
## Comparison Summary ## Comparison Summary
-Possible in all 3? Yes / Partial / No - Possible in all 3? Partial
- Main differences: - Main differences:
-Where Thob is better: - Vanilla gives explicit and predictable control over every transform.
-Where Thob is weaker: - R3F keeps the same predictability with easier hierarchy expression.
-What feels awkward or unclear: - Thob is fast for setup, but deeper nested transform behavior may be harder to trust when local edits are involved.
- Where Thob is better: Fast visual authoring and parenting without code.
- Where Thob is weaker: Transform debugging and local-vs-inherited clarity in deeper hierarchies.
- What feels awkward or unclear: It is not always obvious which transform comes from parent inheritance vs local overrides.
## Evaluation Questions
- Are transforms predictable?
- Vanilla: Yes.
- R3F: Yes.
- Thob: Partially; basic inheritance works, but nested local edits can feel unstable.
- Is it easy to reason about local vs inherited motion?
- Vanilla: Yes, because hierarchy and pivot objects are explicit in code.
- R3F: Yes, because nested JSX mirrors scene graph structure clearly.
- Thob: Not always; editor feedback for transform source is limited.
- Does the builder make hierarchy understandable?
- Partially. Parenting can be created quickly, but understanding and debugging multi-level transform behavior is less transparent than code-based setups.
## Limitation Type (if any) ## Limitation Type (if any)
-[ ] Editor UX limitation - [x] Editor UX limitation
-[ ] Runtime limitation - [x] Runtime limitation
- [ ] Schema / data model limitation - [ ] Schema / data model limitation
-[ ] Component limitation - [x] Component limitation
- [ ] Event system limitation - [ ] Event system limitation
- [ ] Asset pipeline limitation - [ ] Asset pipeline limitation
- [ ] Unknown / needs investigation - [ ] Unknown / needs investigation
## Workaround ## Workaround
- Is there a workaround? - Is there a workaround?
-If yes, what is it? - No
## Suggested Improvement ## Suggested Improvement
- What should improve in Thob? - What should improve in Thob?
- Add clearer transform inspector support for inherited vs local values in nested hierarchies.
- Provide stable multi-level pivot behavior (parent-child-grandchild) when position/scale are edited.
- Add hierarchy visualization and world/local gizmo clarity.
- Is it: - Is it:
- editor - editor
- runtime - runtime
- component - component
- UX - UX
-schema/data
## Difficulty Estimate ## Difficulty Estimate
-Easy / Medium / Hard Medium
## Business Value ## Business Value
-Low / Medium / High High
## Recommendation ## Recommendation
Should Thob support this better? Why? Should Thob support this better? Why?
- Yes. Parent-child-grandchild transform reliability is fundamental for non-trivial 3D scenes and directly affects trust, speed, and correctness for builders making interactive experiences.