From 36a9fbbb095e129834c35596819b4c0cbb868308 Mon Sep 17 00:00:00 2001 From: anshk Date: Fri, 27 Mar 2026 20:10:11 +0530 Subject: [PATCH] chore: added task note for task2 --- Week-1/Task-2/TaskNotes.md | 99 +++++++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 38 deletions(-) diff --git a/Week-1/Task-2/TaskNotes.md b/Week-1/Task-2/TaskNotes.md index e8be752..e452a6c 100644 --- a/Week-1/Task-2/TaskNotes.md +++ b/Week-1/Task-2/TaskNotes.md @@ -1,60 +1,83 @@ -# Task: [Feature Name] +# Task: Parent-Child-Grandchild Hierarchy (Sun -> Earth -> Moon) ## 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 --Possible: Yes / Partial / No --Notes: --Key concepts: --Complexity: Easy / Medium / Hard +- Possible: Yes +- 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: Scene graph hierarchy, transform inheritance, local transform pivots with `Object3D`, frame-time based animation. +- Complexity: Easy ## R3F --Possible: Yes / Partial / No --Notes: --What R3F abstracted: --Complexity: Easy / Medium / Hard +- Possible: Yes +- Notes: Implemented the same hierarchy with nested JSX nodes and `group` refs in `useFrame` for orbit updates. +- What R3F abstracted: Declarative tree for parent/child relationships, lifecycle/render loop integration with `useFrame`, less boilerplate for setup. +- Complexity: Easy ## Thob Page Builder --Possible: Yes / Partial / No --Notes: --Builder steps: --Complexity: Easy / Medium / Hard +- Possible: Partial (based on Task 1 behavior) +- 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: + 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 --Possible in all 3? Yes / Partial / No --Main differences: --Where Thob is better: --Where Thob is weaker: --What feels awkward or unclear: +- Possible in all 3? Partial +- Main differences: + - Vanilla gives explicit and predictable control over every transform. + - R3F keeps the same predictability with easier hierarchy expression. + - 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) --[ ] Editor UX limitation --[ ] Runtime limitation --[ ] Schema / data model limitation --[ ] Component limitation --[ ] Event system limitation --[ ] Asset pipeline limitation --[ ] Unknown / needs investigation +- [x] Editor UX limitation +- [x] Runtime limitation +- [ ] Schema / data model limitation +- [x] Component limitation +- [ ] Event system limitation +- [ ] Asset pipeline limitation +- [ ] Unknown / needs investigation ## Workaround --Is there a workaround? --If yes, what is it? +- Is there a workaround? + - No ## Suggested Improvement --What should improve in Thob? --Is it: - -editor - -runtime - -component - -UX - -schema/data +- 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: + - editor + - runtime + - component + - UX ## Difficulty Estimate --Easy / Medium / Hard +Medium ## Business Value --Low / Medium / High +High ## Recommendation -Should Thob support this better? Why? \ No newline at end of file +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. \ No newline at end of file