perf(demos/face_mirror): merge wireframe Lines into one LineSegments - #368
Merged
Conversation
salmanmkc
force-pushed
the
demos/face-mirror-polish
branch
from
June 15, 2026 03:59
a7e7164 to
f9e77c1
Compare
Previously the wireframe was 134 separate THREE.Line objects, one per edge, which meant 134 draw calls per frame just for the face mesh. Merging into a single THREE.LineSegments with one shared BufferGeometry collapses that to 1 draw call and 1 needsUpdate flag per detection. Missing landmarks collapse the edge to a zero-length segment so we don't render stale (0, 0, 0) tails to the origin.
dli7319
force-pushed
the
demos/face-mirror-polish
branch
from
June 15, 2026 17:32
f9e77c1 to
39b7bf5
Compare
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.
the demo had one
THREE.Lineper edge of the face mesh, ~134 draw calls per frame just for the wireframe. merged into a singleTHREE.LineSegmentssharing one BufferGeometry. one draw call, one needsUpdate flag per detection.missing landmarks collapse to a zero-length segment so we don't render stale tails to the origin.
related: #366 (worker), #367 (BVH). all independent file-wise. spatial-HUD bar-fill anchoring is its own PR.