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

Builds: Introduce three.tsl.js #29948

Draft
wants to merge 6 commits into
base: dev
Choose a base branch
from
Draft

Builds: Introduce three.tsl.js #29948

wants to merge 6 commits into from

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Nov 23, 2024

Related issue: #29644 (comment)

Description

  • Introduce three/tsl build to import maps. The new file is three.tsl.js. ( TSL )
  • Introduce three/webgl to import maps. ( Core + WebGPURenderer + Nodes )
  • Update all examples and depedencies.

Example

import { RenderTarget, Texture, Vector2, QuadMesh, NodeMaterial, TempNode } from 'three/webgpu';

import { If, Loop, int, Break, sqrt, sign, mix } from 'three/tsl';

@mrdoob I think both unnoticed already have a TSL.js file in the lib, what do you think if we follow the second option Three.TSL.js for the build?

@sunag sunag added this to the r171 milestone Nov 23, 2024
Copy link

github-actions bot commented Nov 23, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.13
79
339.13
79
+0 B
+0 B
WebGPU 483.69
134.01
481.83
133.9
-1.86 kB
-111 B
WebGPU Nodes 483.16
133.9
481.3
133.8
-1.86 kB
-105 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 464.59
111.96
464.59
111.96
+0 B
+0 B
WebGPU 550.99
149.23
550.99
149.23
+0 B
+0 B
WebGPU Nodes 506.87
138.94
506.87
138.94
+0 B
+0 B

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