editor: add resize SFX while dragging resize handles#437
Merged
Conversation
Register a `resize` sound effect (three round-robin variations with pitch/pan jitter and an 80ms gap) and emit it from the linear/radial resize drag handler whenever the snapped+clamped value steps, so width / length / depth / radius / height drags tick as the size changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
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.
What does this PR do?
Adds a resize sound effect that plays while dragging a node's resize handles.
resizeSFX insfx-player.ts— three round-robin variations (resize_0/1/2.mp3) with pitch/pan jitter, reduced volume, and an 80ms minimum gap so a sustained drag reads as texture rather than a machine-gun tone (mirrors thegridSnapapproach).sfx:resizeevent + mapping insfx-bus.ts.sfx:resizefrom the linear/radial resize drag handler innode-arrow-handles.tsxonly when the snapped + clamped value actually changes, so the cue ticks on real size steps (width / length / depth / radius / wall + chimney height) instead of every sub-pixel pointer jitter. Rotation handles keep their existingitem-rotatecue.How to test
bun devand open the editor.Screenshots / screen recording
N/A — audio change; no visual diff. (Happy to attach a screen recording with sound if useful.)
Checklist
bun devbun checkto verify)mainbranchNote
Low Risk
Editor-only audio and a narrow emit guard on the existing resize drag path; no auth, data, or scene persistence changes.
Overview
Adds resize tick audio while dragging linear and radial resize handles (width, length, depth, radius, wall/chimney height trackers), without changing rotation handles.
A new
sfx:resizeevent is registered in the SFX bus and backed by aresizesound insfx-player— three round-robin clips, quieter volume, pitch/pan jitter, and an 80ms minimum gap (same idea as grid snap) so fast drags sound like stepped texture instead of a steady tone.In
LinearArrow’s resizemovehandler, the cue fires only when the snapped and clamped dimension value changes, so ticks align with real size steps rather than sub-pixel pointer movement.Reviewed by Cursor Bugbot for commit 9bfbcc9. Bugbot is set up for automated code reviews on this repo. Configure here.