feat: unified element inspector with navigation panels and sceneView store#43
Open
feat: unified element inspector with navigation panels and sceneView store#43
Conversation
✅ Deploy Preview for cnotv-generative-art ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Merge TexturesPanel and PropertiesPanel into a single ElementsPanel with inline expandable rows for all scene elements - Replace composable-based texture group state with a Pinia store for global reactivity and DevTools visibility - Add camera preset selector, recording controls, and schema properties directly inside expanded element rows - Move useSceneConfig next to SceneEditor and useGlobalSceneConfig next to ScenePanel (single-consumer composables co-located) - Register ForestGame illustration areas as inspectable elements - Remove Show Ground/Sky checkboxes (replaced by Eye toggle buttons) - Set DrawPath initial loop=false and follow speed=10 - Fix deepMerge to recurse only when override value is a plain object - Add state management guidelines (Pinia vs composables) to code style rules Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2a62c04 to
dcfe11c
Compare
…ram bugs
- Convert usePanels, useViewPanels, useCameraConfig, useDebugScene,
useElementProperties, useViewConfig to Pinia stores in src/stores/
- Fix openPanel("properties") → openPanel("elements") in SceneEditor
so Elements panel opens correctly after texture group upload
- Remove queryStore double-push cycle in App.vue that caused URL
query params to be pushed twice on every panel state change
- Update all view and component imports to use new store APIs
- Add URL query param tests to panels.test.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eArea upload fixed - GlobalNavigation: make Config button always visible, remove Scene button - ConfigPanel: add sceneConfig SchemaControls below view config - App.vue: remove ScenePanel usage and queryStore double-push cycle - ElementsPanel: replace hidden file inputs with triggerFileUpload() outside dialog context - Remove deprecated SASS @import from utilities.scss and PanelContainer.vue Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix panel opening via direct store mutation (initRouteSync not called in tests)
- Use document.body.querySelector('.sheet-content') instead of #left-panels prefix
- Tests: scene elements list/clear reactivity, texture group show/hide reactivity
- Tests: Add Texture Area button creates file input and calls onAddNewGroup handler
- Fix all existing E2E tests that relied on URL-based panel opening
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move every arbitrary measurement, color, transition, and opacity to named SCSS variables grouped by category at the top of the style block. Also update code-style.md to mandate this pattern for all components. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…wport The change listener on orbit controls only synced camera position — the orbit target drifted silently whenever the user panned/rotated in the viewport, causing the panel to show stale values and UI updates to reset the target to [0,0,0]. - Add syncActiveSlotOrbitTarget to cameraConfig store (same pattern as syncActiveSlotPosition — updates store without triggering onUpdate loop) - Call it in SceneEditor's orbitControls change listener alongside syncActiveSlotPosition - Add unit tests for both sync functions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract ElementItem, ElementCamera, ElementGroup from ElementsPanel - Add elementUtilities for icon/color helpers - Add CSS custom properties to _variables.scss (panel tokens, spacing, fonts) - Enforce CSS custom properties rule in code-style.md - Add git workflow rules (fetch+rebase, never merge) to testing.md - Fix panels.ts: capture useRoute/useRouter in initRouteSync to avoid TypeError outside setup context - Remove query params on panel close (undefined) instead of setting false - Reduce ForestGame idle animation speed 4x - Nav bar: canvas shifts on hover via CSS :has() (not just when panels open) - Add texture upload integration test in ElementsPanel.browser.test.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r closed panels Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…baRunner elements - Add IconButton component wrapping shadcn Button with sm/md/lg sizes via CSS tokens - Rewrite ElementGroup and TexturesPanel with full BEM and no Tailwind utilities - Add element type modifier classes and TextureArea description to ElementsPanel - Add no-Tailwind-in-components rule to code-style.md - GoombaRunner: replace count with density, fix cloud/hill z-ordering, add FallingElement interface for shared fall animation, group cloud/hill as ElementGroups - SceneEditor: show TextureArea type for grouped elements, split lights registration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extract shared scene setup boilerplate into a reusable Pinia store. Views now pass a SetupConfig and the store handles element property registration, panel population, Three.js mapping, texture group management, and lifecycle cleanup. PanelsTest reduced from ~310 lines to ~45 lines. - Create src/stores/sceneView.ts with init/initTextureGroups/cleanup - Move groupMeshes.ts to src/utils/ for shared access - Add threeObjectUpdaters.ts for lint-compliant Three.js mutations - Implement full texture group CRUD (add/remove/toggle/wireframe) - Use preset configs (clouds, trees) for PanelsTest texture groups - Rename decals preset to trees Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Right panels now stack in a single column sharing available height instead of wrapping into multiple columns. Each panel has a collapsible header with chevron toggle — collapsed panels shrink to just the header bar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove per-panel overflow scrolling so each panel takes its natural height. Only the panel container scrolls when content exceeds viewport. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove width: 100% (flex column children stretch automatically) and add overflow: hidden to prevent action buttons from spilling outside the element group boundary on narrow panels. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…throttling - Add filter bar to ElementsPanel with icon toggles for camera, light, ground, sky, mesh, and textureArea categories - Extract getElementCategory and ELEMENT_CATEGORIES to elementUtilities - Expose clock (THREE.Clock) in DefineSetupContext instead of getElapsed - Implement framerate throttling in animation loop using accumulator pattern - Add ForestGame texture area registration with playMode and mesh caching - PanelsTest uses defineSetup with spinning cube and clock.getElapsedTime() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…gle-all, fix ForestGame freeze - Always populate camera/ground/lights/sky config with SCENE_DEFAULTS - Register ambient-light and directional-light as separate element properties - Add select all/none toggle button to element filter bar - Fix ForestGame per-frame freeze by lazy-capturing orbit ref with toRaw() - Swap Elements and Config button order in GlobalNavigation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e mesh cache - Add showElements to ViewPanelsConfig to control auto-opening elements panel - ForestGame uses showElements: false to skip auto-open - Debounce texture area and group regeneration (150ms) for smooth slider interaction - Optimize buildAreaMeshCache to single-pass over scene.children Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Reset textureAreaBackgrounds on restart (were stuck in falling state) - Clear loggedCollisions on restart to prevent stale collision detection - Refresh elements panel after game reset via onReset callback - Apply NearestFilter to ground texture for sharper pixel art look Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… GoombaRunner Adds opacity and speed controls in the elements panel for texture area groups. Opacity changes apply immediately to all meshes in the group. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ementGroup ElementGroup requires groups to exist in textureGroupsStore to render action buttons, texture previews, and schema controls. Register cloud and hill groups with their textures and handlers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28
Summary
playModeflag preventing per-frame reactive overheadKey Changes
src/stores/sceneView.ts— central Pinia store:init(),initTextureGroups(),registerTextureAreas(),cleanup(), reactive config sections, default Three.js update handlers, mesh cachingsrc/stores/panels.ts— migrated from composable to Pinia store with query param syncsrc/stores/textureGroups.ts— Pinia store for texture group state and handlerssrc/stores/elementProperties.ts— element property registration/selection storesrc/stores/debugScene.ts— scene elements store with visibility/remove handlerssrc/stores/cameraConfig.ts— camera preset slots and configurationsrc/stores/viewConfig.ts/sceneConfig.ts— view and scene configuration storessrc/components/panels/ElementsPanel.vue— unified panel with ElementItem, ElementGroup, ElementCamera sub-componentssrc/components/panels/ElementGroup.vue— texture group UI with variants, wireframe toggle, schema controlssrc/components/panels/GenericPanel.vue— collapsible panel wrappersrc/components/IconButton.vue— reusable icon button componentsrc/utils/groupMeshes.ts— shared mesh generation utilities (moved from SceneEditor)src/views/Tools/PanelsTest/PanelsTest.vue— demo view using sceneView store withdefineSetupfor timeline animationsrc/views/Games/ForestGame/— registers texture areas with full configControls schema, playMode for performancesrc/views/Tools/SceneEditor/— refactored with extracteduseSceneConfigand shared config schemasTest Plan
pnpm test:unit)pnpm lint)🤖 Generated with Claude Code