Skip to content

Draw the live 3D room once per animation frame - #291

Merged
ctoth merged 1 commit into
masterfrom
perf/visual-render
Nov 29, 2026
Merged

ctoth merged 1 commit into
masterfrom
perf/visual-render

Conversation

@ctoth

@ctoth ctoth commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

The dollhouse wheel handler could draw twice for one event. OrbitControls emitted a change during the camera update, then the handler drew the view again. Both paths ran the composer and placed the room labels.

Camera input now updates immediately and requests one draw at the next animation frame. Joint motion advances before that draw and requests another frame until it reaches its final pose. The room also redraws when it resizes, the scene or selection changes, the eye camera moves, or the lighting bake finishes. The last drawn room retains its materials until its replacement has rendered.

In headless Edge with the sample layout at 480 × 320, five wheel events dispatched together produced ten composer draws on master and one on this branch. All ten baseline draws occurred inside the input handlers. The single draw on this branch occurred after they returned.

Regression coverage exercises the production wheel handler, idle state, bake completion, superseded rooms, teardown, and the intermediate and final poses of animated joints.

@ctoth
ctoth merged commit bab3e98 into master Nov 29, 2026
2 checks passed
@ctoth
ctoth deleted the perf/visual-render branch November 29, 2026 05:25
github-actions Bot pushed a commit that referenced this pull request Nov 29, 2026
Draw the live 3D room once per animation frame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant