Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PassNode: Clean up. #29733

Merged
merged 1 commit into from
Oct 23, 2024
Merged

PassNode: Clean up. #29733

merged 1 commit into from
Oct 23, 2024

Conversation

linbingquan
Copy link
Contributor

Related issue: #XXXX

Reduce the compression packing volume.

Description

{
  // before
  getPreviousTextureNode(e="output"){let t=this._previousTextureNodes[e];return void 0===t&&(void 0===this._textureNodes[e]&&this.getTextureNode(e),this._previousTextureNodes[e]=t=vp(new LN(this,e,!0)),this._previousTextureNodes[e].updateTexture()),t}

  // after
  getPreviousTextureNode(e="output"){let t=this._previousTextureNodes[e];return void 0===t&&(void 0===this._textureNodes[e]&&this.getTextureNode(e),t=vp(new VN(this,e,!0)),t.updateTexture(),this._previousTextureNodes[e]=t),t}
}

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 691.57
171.41
691.57
171.41
+0 B
+0 B
WebGPU 818.68
220.78
818.64
220.78
-44 B
-1 B
WebGPU Nodes 818.19
220.64
818.15
220.64
-44 B
-1 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 463.72
112.16
463.72
112.16
+0 B
+0 B
WebGPU 539.55
145.72
539.51
145.72
-44 B
-5 B
WebGPU Nodes 495.55
135.53
495.51
135.53
-44 B
-3 B

@sunag sunag added this to the r170 milestone Oct 23, 2024
@sunag sunag merged commit 226a9ed into mrdoob:dev Oct 23, 2024
12 checks passed
@linbingquan linbingquan deleted the dev-passnode branch October 24, 2024 01:57
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.

2 participants