docs: added Task notes for task3

This commit is contained in:
anshk 2026-03-30 20:21:29 +05:30
parent d9742132c0
commit 0397b444bf

View File

@ -1,37 +1,95 @@
# Task: [Feature Name] # Task: Duplicate Object / Duplicate Group
## Objective ## Objective
What is the feature trying to do? Duplicate an object and, if possible, duplicate a grouped structure.
## Test File Split
- Vanilla object duplication test: `main.js`
- Vanilla group duplication test: `group.js`
- R3F object duplication test: `src/App.jsx`
- R3F group duplication test: `src/Group.jsx`
- Run object test: default route
- Command (Vanilla object): `npm run dev:object` or `yarn dev:object`
- Command (Vanilla group): `npm run dev:group` or `yarn dev:group`
## Vanilla three.js ## Vanilla three.js
-Possible: Yes / Partial / No - Possible: Yes
- Notes: - Notes:
- Object duplication is in `main.js` using mesh clone.
- Group duplication is in `group.js` using `THREE.Group()` and group clone.
- Transforms preserved: Yes, duplicate keeps copied transform values and can be moved independently after duplication.
- Structure preserved: Yes, child hierarchy is preserved when duplicating a group.
- Linked or independent: Mostly independent transforms, but geometry and material are shared by default unless explicitly cloned.
- UX clean: Yes for developers, but requires code understanding.
- Key concepts: - Key concepts:
-Complexity: Easy / Medium / Hard - Object3D clone behavior
- Shared vs cloned geometry and material
- Complexity: Easy
## R3F ## R3F
-Possible: Yes / Partial / No - Possible: Yes
- Notes: - Notes:
- Object duplication is in `src/App.jsx` using repeated meshes with shared geometry/material.
- Group duplication is in `src/Group.jsx` by rendering the grouped component twice.
- Transforms preserved: Yes, each instance has its own position, rotation, and scale.
- Structure preserved: Yes, component tree/group structure is preserved.
- Linked or independent: Instance transforms are independent; geometry/material may be shared or isolated depending on how props/instances are created.
- UX clean: Yes, declarative and easier to scale.
- What R3F abstracted: - What R3F abstracted:
-Complexity: Easy / Medium / Hard - Imperative clone calls become declarative repeated components/instances.
- Complexity: Easy
## Thob Page Builder ## Thob Page Builder
-Possible: Yes / Partial / No - Possible: Yes
- Notes: - Notes:
- There is a shortcut to duplicate objects.
- Observed behavior: duplicate creates a completely different object that cannot be linked to the original, unlike vanilla and R3F patterns where sharing/linking behavior can be controlled.
- Duplicate group behavior: Same as single object duplication, a complete copy is made with no linking.
- Transforms preserved: Yes.
- Structure preserved: Yes, as copy- paste duplication.
- Linked or independent: Independent only, with no linking behavior available.
- UX clean: Mixed. Shortcut is quick, but behavior is confusing because linked duplication is not possible.
- Builder steps: - Builder steps:
-Complexity: Easy / Medium / Hard - Create an object
- Use duplicate shortcut
- Duplicate a grouped structure and verify it is a full independent copy
- Complexity: Medium
## What to Observe
- Are transforms preserved?
- Vanilla: Yes
- R3F: Yes
- Thob: Yes
- Does duplication preserve structure?
- Vanilla: Yes
- R3F: Yes
- Thob: Yes, as full copy- paste duplication
- Does the duplicate remain linked or independent?
- Vanilla: Transform- independent, data can be shared by default unless cloned
- R3F: Transform- independent, sharing depends on implementation
- Thob: Independent only, no linking behavior
- Is the UX clean?
- Vanilla: Technical but predictable
- R3F: Clean and scalable
- Thob: Fast shortcut, but ambiguous result for duplication semantics
## Comparison Summary ## Comparison Summary
-Possible in all 3? Yes / Partial / No - Possible in all 3? Yes
- Main differences: - Main differences:
- Vanilla and R3F give clear control over sharing vs independence.
- Thob duplicate shortcut creates separate objects and does not support linked behavior.
- Where Thob is better: - Where Thob is better:
- Fast editor action for simple duplication
- Where Thob is weaker: - Where Thob is weaker:
- No linked duplication model
- No linked group duplication model
- What feels awkward or unclear: - What feels awkward or unclear:
- No option to keep duplicates linked for synchronized edits
## Limitation Type (if any) ## Limitation Type (if any)
-[ ] Editor UX limitation - [x] Editor UX limitation
- [ ] Runtime limitation - [ ] Runtime limitation
-[ ] Schema / data model limitation - [x] Schema / data model limitation
- [ ] Component limitation - [ ] Component limitation
- [ ] Event system limitation - [ ] Event system limitation
- [ ] Asset pipeline limitation - [ ] Asset pipeline limitation
@ -39,22 +97,25 @@ What is the feature trying to do?
## Workaround ## Workaround
- Is there a workaround? - Is there a workaround?
- Yes
- If yes, what is it? - If yes, what is it?
- Use reusable components/prefabs and instantiate multiple independent copies.
- If linked behavior is required, use explicit shared data/component references where supported.
## Suggested Improvement ## Suggested Improvement
- What should improve in Thob? - What should improve in Thob?
-Is it: - Add explicit duplicate modes: independent duplicate and linked duplicate.
- Add reliable deep group duplication with clear hierarchy preview.
- it Is:
- editor - editor
-runtime
-component
-UX
- schema/data - schema/data
- UX
## Difficulty Estimate ## Difficulty Estimate
-Easy / Medium / Hard - Medium
## Business Value ## Business Value
-Low / Medium / High - High
## Recommendation ## Recommendation
Should Thob support this better? Why? Yes. Thob should support both independent and linked duplication because currently duplication works as copy-paste only, which limits synchronized workflows.