Repository navigation
Scoped display flushes, a scoped sync flush, and the revolve shell family name - #31
Merged
Merged
Conversation
Shelling a full-turn revolve is still refused with CoverageGap. The families are now ["restricted analytic shell", "revolved profile"]. A true arc-edged extrusion keeps its family.
Every flush now uses the changed scope. A set of ready shapes replaces readyVersion, so an edit or a received record swaps only the bodies whose record or change set moved, and only displayed bodies call wanted(). The record pool indexes records by shape and keeps idle records in LRU order, and it matches records by identity. The storey acceptance test now times build plus first render together.
…e given bodies A sync flush with bodies meshes only those bodies now. No other body is meshed, swapped or refined; displayed instances of the same shape get the same record. Each given mesh has a current world matrix after the call, so no second scene walk is needed. A disposed body throws Disposed and a wrong input throws InvalidParameter, before anything is meshed. Without bodies, flush behaves as before.
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.
Faster display flushes for large scenes, a scoped sync flush, and a clearer shell refusal for revolves.
a flush swaps only the bodies that changed
Before, every edit and every geometry arrival swapped every live body, so building a large model was quadratic.
changedscope. A set of ready shapes replacesreadyVersion.wanted().storeyBuildAndFirstRenderMs). The total is about 8 % faster; the first render alone is longer, because LOD reads moved out of the build.Swaps per step at 0 / 1,000 / 5,000 live bodies:
updateMatrixWorld, disposeoperatesubtract, dispose 2Cost per body at 4k against 1k: rebuild 1.04x,
settled()after edits 0.79x, dispose with geometry 1.36x.a sync flush that meshes only the given bodies
OpenGeometry.flush({ geometry: 'sync', bodies })meshes and places only the given bodies. No other body is meshed, swapped or refined; displayed instances of the same shape get the same record. Each given mesh has a current world matrix after the call, so no second scene walk is needed. A disposed body throwsDisposedand a wrong input throwsInvalidParameter, before anything is meshed. Withoutbodies,flushbehaves as before. The rules are in the README Display row.With 1,000 or 4,000 bodies waiting for a mesh, a scoped sync of 1 edited body makes 1 tessellation and takes 0.3 to 6 ms; a full sync takes 730 ms and 2,100 ms.
shell of a revolve names the right family
Shelling a full-turn revolve is still refused with
CoverageGap. The families are now["restricted analytic shell", "revolved profile"]. A true arc-edged extrusion keeps its family.Checks
npm run check:full: 20/20 on the branch tip.main.bodiesoption offlush.