feat: common.attachAutoResizer#2534
Draft
iwoplaza wants to merge 2 commits into
Draft
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:
📋 All resultsClick to reveal the results table (353 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.94, 1.93, 4.09, 7.34, 8.71, 10.90, 22.73, 24.99]
line [0.97, 2.02, 4.23, 6.77, 8.74, 11.87, 22.46, 24.74]
line [0.94, 1.96, 4.44, 7.38, 7.98, 11.14, 23.60, 26.51]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.30, 0.59, 0.76, 0.96, 1.30, 1.37, 1.59, 1.72]
line [0.35, 0.53, 0.67, 0.85, 1.14, 1.19, 1.48, 1.64]
line [0.32, 0.58, 0.78, 0.96, 1.33, 1.35, 1.64, 1.77]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.94, 2.36, 4.60, 8.41, 13.62, 27.13, 60.00, 122.95]
line [0.85, 2.04, 4.52, 6.69, 13.22, 26.29, 59.33, 121.18]
line [0.86, 2.07, 4.29, 6.78, 13.51, 27.30, 62.56, 125.22]
|
deluksic
reviewed
May 22, 2026
| observer.observe(canvas, { box: 'content-box' }); | ||
| } | ||
|
|
||
| return () => { |
Contributor
There was a problem hiding this comment.
What do you think about returning a { detach: () => {} } so its self-documenting?
Contributor
There was a problem hiding this comment.
then the rest of the code will read autoResizer.detach()
deluksic
reviewed
May 22, 2026
| export interface AttachAutoResizerOptions { | ||
| root: TgpuRoot; | ||
| canvas: HTMLCanvasElement; | ||
| onResize?(): void; |
Contributor
There was a problem hiding this comment.
onResize will usually want to do something with the new canvas size, so might as well pass it in
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.
No description provided.