editor: structure build-start/end cues + menu hover/click SFX (#378)
* wip sfx * wip audios * feat(editor): structure build-start/end cues + menu hover/click SFX Sound design pass for the build/items experience: - Split structure-build into a start cue (draft begins) and end cue (commit). Wall/fence fire start on the first click; slab/ceiling/zone tick start on every non-closing vertex; roof on the first corner. - Doors and windows now use the structure-end cue on place + move; shelves use item-place instead. - New menu_hover (round-robin retired in favour of a single sample) and menu_click cues wired to the Build/Items main categories, item-catalog tiles, the icon rail / tab bar, and the bottom action menu (via the shared ActionButton). - Refresh item_pick / item_place / item_rotate samples; drop the now-unused numbered menu_hover variations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(editor): silence forEach return lint in updateSFXVolumes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(editor): convert SFX wavs to mp3 to shrink assets Re-encode all SFX samples as 128kbps mp3 (~94% smaller, transparent for short UI cues) and point the player at the .mp3 sources. Drops the .wav originals; the freshly converted item_pick/place/rotate.mp3 override the older committed mp3s. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
8f2e5678e8
commit
1419709131
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
|
||||
import { MaterialPaintPanel, useEditor } from '@pascal-app/editor'
|
||||
import { MaterialPaintPanel, triggerSFX, useEditor } from '@pascal-app/editor'
|
||||
import Image from 'next/image'
|
||||
import { useCallback, useEffect, useRef } from 'react'
|
||||
import {
|
||||
@@ -131,7 +131,11 @@ export function BuildTab() {
|
||||
? 'bg-primary/10 ring-1 ring-primary/50'
|
||||
: 'bg-muted/40 opacity-70 grayscale hover:bg-muted hover:opacity-100 hover:grayscale-0',
|
||||
)}
|
||||
onClick={() => handleTypeClick(type)}
|
||||
onClick={() => {
|
||||
triggerSFX('sfx:menu-click')
|
||||
handleTypeClick(type)
|
||||
}}
|
||||
onMouseEnter={() => triggerSFX('sfx:menu-hover')}
|
||||
type="button"
|
||||
>
|
||||
<Image
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user